JavascriptMVC framework Backbone. js _ javascript skills

Source: Internet
Author: User
Tags tojson
This article mainly introduces the JavascriptMVC framework Backbone. js details, this article on Backbone. the actual examples are provided for various modules and methods of js. As JavaScript programs become more and more complex, you may need a team for collaborative development, at this time, code modularization and organization specifications become very important. The MVC mode is the classic mode of code organization.

(...... MVC introduction .)

(1) Model

Model indicates the data layer, that is, the data source required by the program, which is usually expressed in JSON format.

(2) View

View indicates the presentation layer, that is, the user interface. For a webpage, It is the HTML code of the webpage that the user sees.

(3) Controller

Controller indicates the control layer, which is used to process the raw data (Model) and transmit it to the View.

Because Web programming is different from client programming, based on MVC, the JavaScript community generates various variant frameworks, such as Model-View-Presenter and MVVM (Model-View-ViewModel, some people refer to the various models of this framework as MV *.

The Framework has the advantage of organizing code reasonably, facilitating team cooperation and future maintenance. The disadvantage is that there is a certain learning cost, and you can only adopt the method.

Loading of Backbone

The Code is as follows:


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.