MVC is a programming pattern and design idea, MVC roughly cut into three main units: Model(Entity model), view (view), Contrller (Controller), MVC mainly aims at simplifying the complexity of software development, let the program code form a Loose coupling .
related to each other the first time the user accesses the browser, the URL address in the Address bar accesses the action [action] in the Contrller, and the controller decides which view to display
Model: Defines the Information Format page information validation (in fact, is the data table).
View: Presents to the user's interface, displays the background to the foreground transmits the data, passes the user input data to the backstage controller processing.
Controller: In response to customer requests, specify the data to be displayed, coordinate model to upload data values to view, for various logic processing.
MVC has an important concept of ' separation of concerns ': it is not disturbed by other objects in the same system, but also includes modifications made to objects that do not affect the operation of other objects. Pros: Simplify complexity and improve serviceability to make testing easier.
MVC is a development configuration framework that uses custom substitution configurations rationally.
Using MVC to develop project recommendations
1. Reduce code redundancy and avoid writing duplicate code
2. In the project development is to build the project structure, there is no perfect structure, suitable for this development is the best.
3. Write code to divergent thinking, not only to write and how to write more convenient, more compatible, you can give the code behind the laying of the groundwork.
4. Clear division of labor, not only teamwork to division of labor, code module also division of labor, to ensure that the code is not cluttered.
5. For the same function to reduce the complexity of the code to improve readability, team development is easier.
6. Abstraction of components to reduce coupling between components (reduce dependency on individual components)
PS: A little piece of cake please advise
MVC (i) Basic cognition of-MVC