First time to know backbone

1、Backbone What is it? ?

Backbone It's a very lightweight javaScript library , It can be made into a model (Model)- View (View)- controller (Controller) namely MVC Class structured applications .

2、Backbone Can do ?

Through this structure, we can organize the management of different categories Web There's a lot of complexity in the application JavaScript Code , And dealing with a single page interface (SPI) It contains a lot of complex AJAX Interaction request .

3、Backbone Of MVC framework

Data model (Model) Responsible for creating data prototypes and customizing various events , And pass key/value Formal binding of prototype data ; Through the data model set (Collection) The amount provided API Add all kinds of data to the prototype ; Finally, through the view controller (View) Bind the contents of the elements in the page and handle the corresponding events , And pass RESTful Json Interface mode and the original data in the application program for dynamic interaction .

4、Backbone The characteristics and scope of application of

1)MVC structured

Efficient development and maintenance of large load front-end code development

2) Inheritance features

solve JavaScript There is no concept of a class in ( Difficulties in inheritance ), adopt Backbone You can write your own data in an object-oriented way 、 aggregate 、 Model view , And it is very convenient to overload these models and extend some custom properties and methods .

3) Unified incident management

 events:{
'click #select':'select_click'
}

' Event name # Elements ':' Functions executed by events '

4) Binding page templates

  1. HTML Embedded in the template JavaScript Code
  2. You can manage templates in the page in the view , Select loading and page rendering according to actual needs

5) Seamless interaction between servers

As long as the data on the page changes , The data will automatically synchronize with the server .

Reference books 《backbone.js actual combat 》 By Tao Guorong

backbone Learn more about this article

  1. vue Introduction learning ( The basic chapter )

    vue Introduction learning summary : vue There are three parts in a component of :template.style.script. vue Data in data Use defined in . Data rendering instructions :v-text.v-html.{{}}. Hide uncompiled Tags ...

  2. Hadoop Introduction notes ---part4

    Then <Hadoop Introduction notes ---part3> Continue to learn how to use java Operate in a program HDFS. as everyone knows , The operation of a file is nothing more than creating , see , download , Delete . Now let's start applying java Program operation ...

  3. Hadoop Introduction notes ---part3

    2015 New year's Day , study hard , Day day up . A good beginning is half the battle , No study can be interrupted , Only persistence can produce results . Continue to learn Hadoop. Ice three feet , Not a day's cold ! after Hadoop The construction of pseudo distributed cluster environment , Basic right Hado ...

  4. PyQt4 Introduction notes ( 3、 ... and )

    # PyQt4 Introduction notes ( 3、 ... and ) PyQt4 The layout inside The layout is what we control GUI The position of each control in the page . There are two basic ways we can control : 1. Absolute position 2.layout class Absolute position In this way ...

  5. PyQt4 Introduction notes ( One )

    PyQt4 Introduction notes ( One ) Nothing good has been found pyqt4 A tutorial for , By chance google I found a good introductory document on , Translate it , I'll review it later . The original link is as follows : http://zetcode.com/gui/ ...

  6. Hadoop Introduction notes ---part2

    stay <Hadoop Introduction notes ---part1> I feel that although I summarize in detail , But it always feels a bit messy . Not systematic enough , It's not simple enough . After my own deliberation and summary , Now let's make a general summary here , I think we're preparing to build ha ...

  7. Retrofit Introduction learning

    Retrofit Introduction to learning official RetrofitAPI An official example public interface GitHubService { @GET("users/{user}/repos&qu ...

  8. MyBatis Introductory learning course - Use MyBatis Execute on table CRUD operation

    Last one MyBatis Learning summary ( One )--MyBatis In the quick start, we talked about how to use Mybatis Inquire about users Table data , for MyBatis There is a preliminary introduction , Today I'll explain how to use MyBatis Yes use ...

  9. opengl Introduction learning

    OpenGL Introduction learning Speaking of programming and drawing , Probably a lot of people think of TC Of #include <graphics.h> Well ? But have you ever thought about , The pictures are gorgeous PC How the game was written ? It depends TC The poor 640 ...

Random recommendation

  1. linux OSlab4 Add custom system calls

    http://blog.csdn.net/ly01kongjian/article/details/8947285 http://www.cnblogs.com/hoys/archive/2011/0 ...

  2. centos6.5 install zabbix

    Experimental instructions : operating system : CentOS6.5 64 position Web Environmental Science : Apache Mysql PHP zabbix edition : LTS 2.2.10 Linux The server IP: 10.0.0.2 Linux client ...

  3. spring_boot_pay Alipay , WeChat , UnionPay payment detailed code case

    spring-boot-pay Payment services : Alipay , WeChat , UnionPay detailed code case ( In addition to UnionPay payment can be tested , Alipay and WeChat pay tests require enterprise certification , Individuals cannot complete the test ), Please read carefully before starting the project   matters needing attention   . Friendship tips ...

  4. Intuitive understanding of the last layer of neural network full connection +Softmax

    Catalog Write it at the front Full connection layer and Softmax review Weighted angle Template matching Geometric angles Softmax The role of summary Reference resources Blog :blog.shinelee.me | Blog Garden | CSDN Write it at the front This article will be from 3 ...

  5. Angular5 Getting started and building projects

    step 1. Set up the development environment Before starting work , You have to set up the development environment . If you don't have one in your computer Node.js and npm, Please install them . Please start at the terminal / Run the command in the console window  node -v  and  npm -v,  Come on ...

  6. FFmpeg Command line tool learning ( Four ):FFmpeg Acquisition device

    In the use of FFmpeg As an encoder , have access to FFmpeg Acquisition of local audio and video acquisition equipment data , And then code it . encapsulation . Transmission equivalent operation . for example , We can take images from the camera and use them as video , Collect microphone data as audio , And then to collect ...

  7. CSS- Variable

    Why use css variables To borrow Scrimba Upper : easier to get started (no transpiling) have access to the DOM 1.loc ...

  8. Huang Cong :jquery.bootgrid The table plug-in has properties (visibleInSelection、cssClass、headerCssClass、headerAlign) An unrecognized solution

    The main problem is the case of attributes , modify jquery.bootgrid.js file , stay function loadColumns() Just add the following statement to the method data.headerAlign = data.head ...

  9. The second stage sprint ——four

    Personal tasks : Ji Fang : Achieve team blog job query . Wang Jinxuan : Optimize the display of statistics team blog results interface . Ma Jiahui : Select the background design of the function interface . Si Yuhang : use servlet Complete the list printing function . Stand-up Meeting : Mission Kanban and burn out chart :

  10. Based on binary RPC Lightweight remote calling framework of protocol law ---- Hessian

    Use Java establish Hessian There are four steps to service : 1. establish Java Interface as public API                             (client and server End Create the same excuse ) 2. send ...