backbone.js - Vooq айти компания интернет программированиеVooq айти компания интернет программирование

Backbone.js is a JavaScript library for which basis was taken as a design pattern ModelViewPresenter. This software is intended for creation of web applications with support for JSON RESTful interface. It sets the necessary structure for the key thanks to the models bedingham. This product is available with the MIT license and placed on GitHub. Access online tests with examples of application and list of tutorials. The Russian version is available on GitHub.

The core in Backbone.js presents the following classes:

  1. Router – accepts a url and indicates which view you want to run.
  2. View – there are bound to dom elements, and is responsible for the stored data. The main task is to organize the interface in a logical sequence. This is due to the built-in models.
  3. Collection – logically are sets of modules. The event, sebatane on the model in the collection, the same will work on the collection. This ensures direct contact with changes the attributes of any model.
  4. Model – are the most important element of this application. They contain all the interactive data. And validation, conversion, access control and computed properties. Thus, this core set of management changes.

Backbone.js has a list of built-triggered events. These include:

  1. add – add a model to the collection and the launch event. When the property passed to the raw attributes will change in the model instances. Add the identical model is skipped.
  2. remove – remove the model from the collection. This event can be suppressed opredelennym the key stored in the hash options.
  3. reset – replace content in the collection. The updated replacement new array models.
  4. sort – sort the collection. Typically, the collection is sorted automatically when adding models. If desired, this sorting can be disabled.
  5. change – change model attribute.
  6. destroy – destruction model.
  7. request – send a model request to the server.
  8. sync – sync the model to the server.
  9. error – call “save” failed at server.
  10. invalid – model validation fails.

However, this program not only gives you the opportunity of starting your own.

To perform operations on models of this proxy program six methods. This: pairs, values, keys, pick, invert, omit.