1.MVC Design patterns

MVC It's a use MVC(Model View Controller Model - View - controller ) Design creation Web The pattern of the application

  • Model( Model ) Represents the core of the application ( For example, database record list ).
  • View( View ) Display the data ( Database records ).
  • Controller( controller ) Process input ( Write database records ).
 MVC The pattern also provides for HTML、CSS and JavaScript Full control of .
 Model( Model ) Is the part of the application that deals with the application's data logic .
Usually model objects are responsible for accessing data in the database .
 View( View ) It's the part of the application that handles data display .
Usually views are created from model data .
 Controller( controller ) Is the part of the application that handles user interaction .
Usually the controller is responsible for reading data from the view , Control user input , And send data to the model .
 MVC Layering helps manage complex applications , Because you can focus on one aspect at a time . for example , You can focus on view design without relying on business logic . It also makes it easier to test applications .
 MVC Layering also simplifies group development . Different developers can develop views at the same time 、 Controller logic and business logic .
   MVC The core is $scope:
               $scope It's a POJO(Plain Old JavaScript Object)
               $scope Provides some tools and methods $watch()/$apply()
               $scope Is the execution environment for expressions ( Or scope )
               $scope It's a tree structure , And DOM Label parallel
                Son $scope The object inherits the parent $scope Properties and methods on
                every last Angular Applications have only one root $scope object ( Generally located ng-app On )
               $scope Can spread Events , similar DOM event , It can be up or down
               $scope Not only is MVC The basis of , It's also the basis of implementing bidirectional data binding later
                It can be used angular.element($0).scope() debug
The following is from Wang Xiaobai The blog of
http://www.w3cfuns.com/notes/20332/7b34a55003dff88cd8d5f91b1ce3dada.html

angularjs More related articles in brief

  1. AngularJS directive sketch

    from :http://segmentfault.com/q/1010000002400734 official API:http://docs.angularjs.cn/api/ng/service/$compile ...

  2. AngularJS - Passing data between pages

    You need to create a service to be able to share data between controllers. app.factory('myService', ...

  3. recommend 10 A great AngularJS Learning Guide

    AngularJS It's great JS frame , Be able to create powerful , Dynamic function Web app.AngularJS since 2009 Since its publication , It has been widely used in Web In development . But to want to learn Angular JS For people , only ...

  4. Angularjs Introduction to learning one brief introduction

    This series is about learning from scratch angularjs, In the following, we use ng Express angularjs, You know, I never thought it was deep-rooted jquery Developers change their ideas , It does take a while , Here's how angularjs, I also refer to online ...

  5. In depth understanding of AngularJs-scope( One )

    Before entering the text : The example code in this article is not AngularJs Source code , It's from books <<Build Your Own AngularJs>>, The author of this book only relies on jquery and lodas ...

  6. We can talk angularJS Data binding mechanism and the principle behind it —angularJS FAQ summary

    This is right angularJS Looking back on some doubtful points of , Right now angularJS Development of a variety of common problems to sort out the summary . If you know all the topics in the article , I think it's important for the whole angular The framework should be mastered . I hope that like-minded people can add ...

  7. AngularJS Advanced ( 8、 ... and ) Realize page Jump and parameter transfer

    angularjs Realize page Jump and parameter transfer notes : Please click here to charge ! Angular There are many ways to pass parameters on a page , Let me list 4 The most common : 1.  be based on ui-router The page of jump to pass parameters (1)  stay Angular ...

  8. angularjs How to realize the page Jump of the project

    link :https://www.zhihu.com/question/33565135/answer/696515Angular There are many ways to pass parameters on a page , According to different use cases , I lift it 5 The most common :PS: In the actual project , ...

  9. AngularJS Page parameter transfer method

    1. be based on ui-router The page of jump to pass parameters (1) use ui-router Define routes , For example, there are two pages , A page (producers.html) There are multiple producers, Click on one of the targets , The page jumps to the corresponding ...

Random recommendation

  1. android Handler Introduce

    Handler Introduction : Handler According to the message received , Handle UI to update .Thread The thread sends a message , notice Handler to update UI. Handler mHandler = new Handler() {  p ...

  2. collect files , Use of download PHP Self contained ZipArchive Compress files and download packaged files

    summary :                                                          Use PHP Download file operation needs to give four header(), You can refer to another blog post of mine : ...

  3. High availability Hadoop platform -Flume NG Actual combat illustration

    1. summary Today I will add an article about Flume The blog of , I'm going to talk about high availability Hadoop I missed this article on the platform , This blog tells you the following : Flume NG sketch Single point Flume NG build . function High availability Flume N ...

  4. 20145233 Han HaoChen 《Java Programming 》 Experiment report 1 :Java Familiarity with development environment (Windows+IDEA)

    20145233 <Java Programming > Experiment report 1 :Java Familiarity with development environment The experimental requirements Use JDK compile . Run simple Java Program : Use IDEA edit . compile . function . debugging Java Program . Experimental content ...

  5. Linux—fork Function learning notes

    fork() function In the assignment statement pid = fork(); Before , Only one process is executing this code , But after this statement , It becomes two processes in execution , The code parts of the two processes are exactly the same .> In two processes , The one that existed before was ...

  6. vmware-tools Installation guide

    Why install VMware Tools? Because it can improve Virtual Machine  Operation performance of , You can let the mouse in and out of the local host and virtual machine at will , and Host OS  and Guest OS Sure   As well as exchange of needed goods , Realize the text ...

  7. Android 4.0 New desktop control for displaying datasets

    setRemoteAdapter (int viewId, Intent intent): This method can use Intent to update RemoteViews in viewId Corresponding components . In the above way Inte ...

  8. _WSAStartup@8, The sign is in the function _main Cited in

    int WSAStartup( __in WORD wVersionRequested, __out LPWSADATA lpWSAData ); WSAStartup grid    type : int PASCA ...

  9. KindEditor - Code highlighting

    *: Insert data from the database , No need to escape ,KE It has been automatically escaped . When calling, use the import code css: The page that displays the code :

  10. spark rdd df dataset

    RDD.DataFrame.DataSet The difference and connection Generality : 1) All are spark Elastic distributed data sets in , Lightweight 2) It's all inertia , Delay calculation 3) Depending on the memory , Auto cache , Speed up calculation 4) There are parti ...