JavaScript Learning 1: First knowledge of backbone. js

Source: Internet
Author: User
Backbone: courage, spine, but in the program, especially after the backbone is added with the suffix js, it becomes a framework and a js library. Backbone. js. I don't know what kind of purpose the author named it for. Maybe it is hoped that this library will become web... SyntaxHighlighter. all ()

Backbone: courage, spine, but in the program, especially after the backbone is added with the suffix js, it becomes a framework and a js library.
Backbone. js does not know the purpose of the author to name it. It may be hoped that this library will become the backbone of web development.

All right, start the topic after gossip.

Backbone. js provides a web development framework, binding key-value and processing m events through Models, and providing a rich set of APIS for enumeration through Collections, use Views to process events and interact with existing applications through the RESTful JSON interface. it is a js framework based on jquery and underscore.

In general, backbone. js is a web-side javascript mvc framework, which is a heavyweight framework. It allows you to write JavaScript code, define attributes, and methods of classes like java code. More importantly, it is able to elegantly organize originally non-logic javascript code and provide methods for separating data from logic to reduce data and logic confusion during code development.

With backbone, you can use your data as Models. With Models, you can create, verify, destroy, or save data to the server. When an operation on the interface changes the attributes of the model, the model triggers the change event. views used to display the model status will receive the message that the model triggers the change, then, a corresponding response is sent and new data is re-rendered to the interface. In a complete backbone application, you do not need to write the glue code to get the node from the DOM with a special id, or manually update the HTML page, because when the model changes, views will easily update themselves.

The above is a simple introduction. After reading his introduction and simple tutorials about backbone, the first impression is that it has developed a set of its own rules for front-end development. Under this rule, we can organize js Code just like using django to organize python code. It is elegant and can simplify interaction between the front-end and the server.

When I checked the backbone Information, I found that there were not many systematic Chinese entry-level documents and more examples, so I planned to learn and write them by myself, we strive to allow you to use backbone quickly through a series of articles. js.

For more information about backbone, see the following:

Http://documentcloud.github.com/backbone/

Http://backbonetutorials.com/

Application Scope of backbone:

Since it is a heavyweight framework, it will not be available anywhere. Otherwise, it will produce a cool-performance result. So where is it applicable?

Based on my understanding and the functions of backbone, if a single web page has complicated business logic, it is suitable to use and can easily operate dom and organize js Code.

Alpha city of Douban is an excellent example.

Of course, in addition to the application scope I analyzed myself, I saw a lot of foreign sites using it in the document of backbone, which indicates that backbone is easy to use.


From the_fire's technical blog
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.