No application structure • No clear distinction between app logic and ui • Hard to test and maintain Typical js project at the end Tuesday, October 30, 12
models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.” backbonejs.org Tuesday, October 30, 12
data, views and routers in a succinct manner • Provide DOM, model and collection synchronization • Extensive eventing system What is Backbone.js? Tuesday, October 30, 12
system for events • Agnostic about templating frameworks • Underscore template is default • Works with Handlebars, Mustache too What is Backbone.js? Tuesday, October 30, 12
Don’t contain any markup for your app • Contains presenter logic for models (MVP, MVVM) • Uses templates for markup (underscore, mustache, handlebars, jQuery templates) Tuesday, October 30, 12
to define events • Automatically limits to view’s scope • Don’t bind anything via jQuery • This way you will don’t have zombie callbacks Tuesday, October 30, 12
for any server operations (via models and collections). • Default implementation is 100% compatible with the Ruby on Rails RESTful JSON api. • Override if you need to customize the communication with the server. • Plug any backend easily. Even Socket.io! Tuesday, October 30, 12