Backbonejs
- 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.
- 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)
- 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.
- 10. The View or Controller…
Connect View and Model/Collection
Delegate DOM events
Subscribs Model/Collection change events
- 12. The Routing-engine
Useful to initiate application state
ex: window.location.hash = “start”;
Enable go back/forward browser functionality.
Makes application states bookmarkable!