Explain Backbone

1.What is the Backbone?

Backbone supplies structure to JavaScript-heavy 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 application over a RESTful JSON interface.

Backbone provides a clean way to surgically separate your data from your presentation. The model that works with the data is only concerned with synchronizing with a server while the view’s primary duty is listening to changes to the subscribed model and rendering the HTML.

2.What is Model?

Models are the heart of any JavaScript application, containing the interactive data as well as a large part of the logic surrounding it: conversions, validations, computed properties, and access control.

3.What is View?

Backbone views are used to reflect what your applications' data models look like. They are also used to listen to events and react accordingly.

4.How to use them?

 

// Set up inheritance for the model, collection, router, view and history.

  Model.extend = Collection.extend = Router.extend = View.extend = History.extend = extend;


 

 

你可能感兴趣的:(backbone)