Backbone Learning Notes

Source: Internet
Author: User

Three parts of the backbone:
Model: Models

Each property of model can have a corresponding listener function, that is, when the value is changed, the listener function is invoked.

Model is a core module in any JavaScript application, including data that needs to be accessed frequently, as well as a large number of sessions, checksums, and computed property-level access controls that need to be expanded around the data.
Create a backbone.js model

The code is as follows Copy Code

Person = Backbone.Model.extend ({
Initialize:function () {
Alert (' Welcome to the World ');
}
})
var person = new person ();

When we create a new object for person, the Initialize () function is called immediately (initialize works in model, Collection, view). Although the Initialize () function is not a function that has to be defined, it will gradually discover its wonders in the actual development process.
Collection: Collection
View: Views

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.