Backbonejs

429 views

Published on

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
429
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
11
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Backbonejs

  1. 1. Backbone.js Client-side MVC framework
  2. 2. Backbone.js is… Model/View/Controller Javascript framework Structure provider RESTful JSON Connector Hash-Routing engine Event-driven LightWeight (6.3kb packed & gzipped) Hard dependency on Underscore (http://underscorejs.org/)
  3. 3. Backbone.js is not… DOM selector Effect tool kit All in one package
  4. 4. Benefit ? Backbone provides an easy way to organize your code by its MVC pattern. Easy to create an one page application. Focus on one thing.
  5. 5. The Model
  6. 6. The Model Easy to auto generate Holds data better then the DOM Throws data change event (add, delete, sync, sort …) Can connect to a URL to populate from or persist to server (Follow CRUD method or need to override sync function)
  7. 7. The Collection
  8. 8. The Collection Easy to auto generate For bulk handling model objects Throw data change event . Can connect to a URL to populate from server. Query functions.
  9. 9. The View
  10. 10. The View or Controller… Connect View and Model/Collection Delegate DOM events Subscribs Model/Collection change events
  11. 11. The Routing-engine
  12. 12. The Routing-engine Useful to initiate application state ex: window.location.hash = “start”; Enable go back/forward browser functionality. Makes application states bookmarkable!
  13. 13. Demo : Todo Backbone.js official example
  14. 14. Q&A

×