Posts

Showing posts from November, 2013

Angular JS – Part 1

Angular JS is used for MV* (Controller, Presenter, ViewModel) frameworks. Can use JQuery/Zepto. Angular is comprehensive. Partial Templates Updating the data Routing Testable Extends HTML vocabulary Forward Thinking Web components Object.Observe Angular Architecture: Supports two-way binding Dirty Checking Dependency Injection Angular Components: Controllers Views/Directives Directive – Use to extend the HTML. Services Basics: "ng_controller" attribute is used to specify the controller part in HTML. "$scope" is a special field using by Angular, which will pass the values to controller. "Angular Seed" is zip file, while will work as starting point of the application.[Skeleton of the angular application]. Download this for quick bootstrap. Controller create Scope(primary responsibility) which have two way communication with Views. Views use the values in scope and the events use the functions...

Backbone JS

Provides models with key-value binding and custom events, collections, and connects it all to your existing API over a RESTful JSON interface. Used for SPA(Single page applications) like Gmail, Facebook, Twitter. Client Side JS: Routers Models Views Collection Advantages: Fast Highly interactive Scalable Disadvantages: Cannot be indexed by search engines(without extra work) Difficult to test Security issues( security must be enforce by the server) Required Dependencies: Underscore.js (Functional support for Javascript) JQuery/zerto (zepto is only for modern browsers, DOM manipulation & AJAX) Understanding: Backbone.Model is used to create object. Use Get(), Set(0 method to change property values. Need to create a model Object by extending Backbone.Model, and need to pass it to a view that extended from Backbone.View. Models: Models hold the application data. The Purpose of models Models form the core of the applic...