NextGen Technology upgrade – Synerizip - Sandeep Kamble.

Slides:



Advertisements
Similar presentations
MVVM/MVC in Client-side SPA var subTitle = { value: ‘Single page application approaches and usage’, speaker1: ‘Stanimir Todorov, Product Developer Infragistics’,
Advertisements

ExtJS 4.0 JavaScript MVC Framework. Who ExtJS is provided by Sencha ( o Sencha Touch o GWT o CSS Animator o IO (Cloud Data Management)
Chapter 9 Introduction to the Document Object Model (DOM) JavaScript, Third Edition.
Chapter 11 ASP.NET JavaScript, Third Edition. 2 Objectives Learn about client/server architecture Study server-side scripting Create ASP.NET applications.
LHCbPR V2 Sasha Mazurov, Amine Ben Hammou, Ben Couturier 5th LHCb Computing Workshop
JQuery. What is jQuery? jQuery is a fast, small, and feature-rich JavaScript library that simplifies HTML document traversing and manipulation event handling.
XML on the Web: is it still relevant? O'Neil D. Delpratt.
Fundamentals, DOM, Events, AJAX, UI Doncho Minkov Telerik Corporation
CST JavaScript Validating Form Data with JavaScript.
Agenda What is AJAX? What is jQuery? Demonstration/Tutorial Resources Q&A.
JQuery CS 268. What is jQuery? From their web site:
User Interface Design using jQuery Mobile CIS 136 Building Mobile Apps 1.
JavaScript & jQuery the missing manual Chapter 11
Dr. Azeddine Chikh IS444: Modern tools for applications development.
Chapter 5 Java Script And Forms JavaScript, Third Edition.
Server-side Scripting Powering the webs favourite services.
Building a UI with Zen Pat McGibbon –Sales Engineer.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
JavaScript, Fourth Edition Chapter 12 Updating Web Pages with AJAX.
Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 4-1 of…
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
Review IDIA 619 Spring 2013 Bridget M. Blodgett. HTML A basic HTML document looks like this: Sample page Sample page This is a simple sample. HTML user.
Lecture 19 Web Application Frameworks Boriana Koleva Room: C54
DIRECTOR + BACKBONE = :) JANESSA DET – LEAD FRONT-END THEFUTURE.FM.
Multi-Part Requests/ Parent & Child Service Items.
Chapter 8 Cookies And Security JavaScript, Third Edition.
Introduction to Entity Framework Part 2 CRUD Scaffolding Tom Perkins NTPCUG.
JavaScript, Fourth Edition
INTRODUCTION TO JAVASCRIPT AND DOM Internet Engineering Spring 2012.
Murach’s ASP.NET 4.0/VB, C1© 2006, Mike Murach & Associates, Inc.Slide 1.
INTRODUCTION TO HTML5 Using jQuery with HTML5. Introducing jQuery  Although it is not a part of any W3C or WHATWG specification, jQuery performs an important.
Introduction to JavaScript 41 Introduction to Programming the WWW I CMSC Winter 2004 Lecture 17.
JavaScript, Fourth Edition Chapter 5 Validating Form Data with JavaScript.
Caching Chapter 12. Caching For high-performance apps Caching: storing frequently-used items in memory –Accessed more quickly Cached Web Form bypasses:
.  A multi layer architecture powered by Spring Framework, ExtJS, Spring Security and Hibernate.  Taken advantage of Spring’s multi layer injection.
Rails & Ajax Module 5. Introduction to Rails Overview of Rails Rails is Ruby based “A development framework for Web-based applications” Rails uses the.
Ajax XMod for Dummies Building DNN Ajax Modules Without Programming Dave McMullen SoCal DNN Users Group 2/7/07 –
INTEGRATION OF BACKBONE.JS WITH SPRING 3.1. Agenda New Features and Enhancements in Spring 3.1 What is Backbone.js and why I should use it Spring 3.1.
Asynchronous Javascript And XML AJAX : an introduction UFCEUS-20-2 : Web Programming.
 Registry itself is easy and straightforward in implementation  The objects of registry are actually complicated to store and manage  Objects of Registry.
+ BackBone.js By. Phil Sheperd. + What is BackBone BackBone is a Javascript Framework How is this different From jQuery or Prototype? Libraries vs Framework.
Unleash the Power of jQuery Learning & Development Team Telerik Software Academy.
Chapter 16: Ajax-Enabled Rich Internet Applications with XML and JSON TP2543 Web Programming Mohammad Faidzul Nasrudin.
Preface IIntroduction Objectives I-2 Course Overview I-3 1Oracle Application Development Framework Objectives 1-2 J2EE Platform 1-3 Benefits of the J2EE.
RESTful Web Services What is RESTful?
Presentation.
AJAX. Overview of Ajax Ajax is not an API or a programming language Ajax aims to provide more responsive web applications In normal request/response HTTP.
Rich Internet Applications 2. Core JavaScript. The importance of JavaScript Many choices open to the developer for server-side Can choose server technology.
CHAPTER 8 AJAX & JSON WHAT IS AJAX? Ajax lets you…
Text INTRODUCTION TO ASP.NET. InterComm Campaign Guidelines CONFIDENTIAL Simply Server side language Simplified page development model Modular, well-factored,
PostBack  When an initial request for a page (a Web Form) is received by ASP.NET, it locates and loads the requested Web Form (and if necessary compiles.
Web Technology (NCS-504) Prepared By Mr. Abhishek Kesharwani Assistant Professor,UCER Naini,Allahabad.
Virtual techdays INDIA │ 9-11 February 2011 SESSION TITLE Kamala Rajan S │ Technical Manager, Marlabs.
Introduction to JavaScript MIS 3502, Spring 2016 Jeremy Shafer Department of MIS Fox School of Business Temple University 2/2/2016.
 ASP.NET provides an event based programming model that simplifies web programming  All GUI applications are incomplete without enabling actions  These.
AJAX CS456 Fall Examples Where is AJAX used? Why do we care?
ASP.Net ICallback Vijayalakshmi G M Senior Trainer Binary Spectrum.
Modern Development Technologies in SharePoint SHAREPOINT SATURDAY OMAHA APRIL, 2016.
The New Face of ASP.NET ASP.NET MVC, Razor, and jQuery Ido Flatow | Senior Architect | Sela | This session is.
Wes Preston DEV 202. Audience: Info Workers, Dev A deeper dive into use-cases where client-side rendering (CSR) and SharePoint’s JS Link property can.
JQuery form submission CIS 136 Building Mobile Apps 1.
How to consume a RESTful service using jQuery. Introduction  In this post we see how to consume the RESTful service described in the post Design a RESTful.
Ext JS - Direct Bridging The Gap A DMSBT Presentation By Timothy Chandler.
Open Solutions for a Changing World™ Eddy Kleinjan Copyright 2005, Data Access WordwideNew Techniques for Building Web Applications June 6-9, 2005 Key.
AJAX and REST.
CMPE 280 Web UI Design and Development October 24 Class Meeting
JavaScript Introduction
WPS - your story so far Seems incredible complicated, already
Web Client Side Technologies Raneem Qaddoura
Chengyu Sun California State University, Los Angeles
Presentation transcript:

NextGen Technology upgrade – Synerizip - Sandeep Kamble

Agenda  Single Page Applications (SPAs)  Introduction to Backbone  Why Backbone?  Backbone MVC  Model  View  Collections  Backbone Sync  Backbone Events  Sample web app “KinoEdu” Synerzip Softech Pvt. Ltd. 2

Single Page Applications  Only one web page  Resources are dynamically loaded and added to the page as necessary, usually in response to user actions  The page does not reload at any point in the process, nor does control transfer to another page  Use of JavaScript to generate content on the fly and quickly.  Examples are Gmail, Twitter… Problems for developers  Large JS web apps became pretty messy really quick  More free-hanging and unrelated blocks of code  Lacks of structure it’s hard to maintain Synerzip Softech Pvt. Ltd. 3

Introduction to Backbone  JavaScript library that adds structure to your client-side code  MVC framework (MV*)  Models with key-value binding and custom events  Collections with a rich API of enumerable functions  Views with declarative event handling  Connects it all to your existing API over a RESTful JSON interface Synerzip Softech Pvt. Ltd. 4

Why Backbone?  A MVC pattern to keep code clean  A client side template to easily render view elements  A better way to manage events and callbacks  A way to preserve browser’s back button  Light weight  Code is more maintainable  Is a mature, popular library  Large development community Synerzip Softech Pvt. Ltd. 5

Backbone MVC Synerzip Softech Pvt. Ltd. 6 & Collection RESTful API

Get started with Backbone  Backbone.js has dependency on underscoreJS and jQuery.  Add Backbone Synerzip Softech Pvt. Ltd. 7

Models  Represent your data  For simplification it can be considered as single record  Stores data in JSON format  Data can be created, validated, destroyed, and saved to the server  Any change in data triggers a “change” event Synerzip Softech Pvt. Ltd. 8

Define Synerzip Softech Pvt. Ltd. 9 var courseModel = Backbone.Model.extend({ // default – default attribute values for model. defaults : { icon: " C ", name: "New Course Name", description : "New Course Description" } }); var course = new courseModel({ name : "HTML5", description : "HTML5 Fundamentals" });

Methods  Set  Set multiple attributes  Get  toJSON Synerzip Softech Pvt. Ltd. 10 course.set(“name”, “Backbone MVC”); course.set({“name”: “Backbone MVC”, “description”: “Backbone in details”}); course.get(“name”); // Backbone MVC course.toJSON(); // {“name”: “Backbone MVC”, “description”: “Backbone in details”}

Views  It renders HTML [with the help of template as per need]  Can be used with any JavaScript templating library  Manages DOM events  Acts like a Controller  Connected to data in Model or Collection  Responds to change event of Model to update itself Synerzip Softech Pvt. Ltd. 11

Define Synerzip Softech Pvt. Ltd. 12 var AppView = Backbone.View.extend({ // el - stands for element. Every view has a element associate with it to render HTML content. el: '#container', // id of existing Element in the DOM // It's the first function called when this view it's instantiated. initialize: function(){ this.render(); }, events: { "click.clear":“clearData" }, render: function(){ this.$el.html("Hello World clear "); }, clearData: function(){ this.$el.html(“”); } });

Basic Properties  view.el Reference a DOM at all times. view.el get created from the tagName e.g. tagName:”span”/“li” It is possible to assign className, id and attributes properties to view.el. If none of these are specified, then this.el is an empty div since by default tagName is “div”.  view.$el it’s a cached jQuery object of the view’s element (view.el).  Initialize/construtor Here you have the option to pass parameters that will be attached to a model, collection or view.el.  render In this function, you inject the markup into the elements. Synerzip Softech Pvt. Ltd. 13

Collections  Ordered sets of models  Can fetch data from a given URL  Triggers events like add/remove/reset  Can sort models if you define a comparator function Synerzip Softech Pvt. Ltd. 14

Define Synerzip Softech Pvt. Ltd. 15 var courseCollection = Backbone.Collection.extend({ model: courseModel, //url - restFul API url to get courses url: “/courses”, //parse – success callback to fetch(), parse the JSON data and locate actual data array to be loaded in the collection parse: function(data){ //data = {“total”:20, “courses”: [{..c1...},{…c2…}…]} return data.courses; } }); var courses = new courseCollection; courses.fetch(); //load data from 

Backbone Sync  Is the function that Backbone calls every time it attempts to read or save a model to the server  By default, it uses jQuery.ajax to make a RESTful JSON request  The default sync handler maps CRUD to REST like so:  create → POST /collection {your-app.com/courses}  read → GET /collection[/id] {your-app.com/courses[/2]}  update → PUT /collection/id {your-app.com/courses/2}  delete → DELETE /collection/id {your-app.com/course/2} Synerzip Softech Pvt. Ltd. 16

Backbone Events  Events is a module that can be mixed in to any object  Gives object the ability to bind and trigger custom named events  Events do not have to be declared before they are bound, and may take passed arguments. Synerzip Softech Pvt. Ltd. 17 var myObject = {}; _.extend( myObject, Backbone.Events); myObject.on("alert", function(msg) { alert("Triggered " + msg); }); myObject.trigger("alert", "an event");

Sample web app “KinoEdu”  Create a sample web app “KinoEdu” using backboneJS, requireJS, underscroreJS and JQuery  Steps Basic setup with RequireJS Create Course Model and View Course Collection and display all courses Search functionality Toggle Course View to display all courses as ‘Grid’ or as ‘List’ Create Course Edit Course Synerzip Softech Pvt. Ltd. 18

References     Synerzip Softech Pvt. Ltd. 19

Synerzip Softech Pvt. Ltd. 20 Questions ???

Thank You !!! Synerzip Softech Pvt. Ltd. 21