What is Backbone.js?
Backbone.js gives structure to web applications by providing 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.
1.Introduce
Models and Views
Collections
API Integration
Backbone is pre-configured to sync with a RESTful API. Simply create a new Collection with the url of your resource endpoint:
var Books = Backbone.Collection.extend({ url: '/books' });
The Collection and Model components together form a direct mapping of REST resources using the following methods:
GET /books/ .... collection.fetch(); POST /books/ .... collection.create(); GET /books/1 ... model.fetch(); PUT /books/1 ... model.save(); DEL /books/1 ... model.destroy();
2.PPT: BackboneJS 介绍.pptx