The MVC pattern was first proposed by Xerox PARC 's Trygve , which has a history of more than 40 years . The now-recognized MVC model includes the following sections:
M(model): Models, process business logic, manipulate data.
V (view): View to get data for presentation.
C (controler): Controller, is a dispatcher, as a bridge between the model and the view. The task passed from the view is transferred to the model, and the results are transferred from the model to the view.
It can be seen that themodel and view are separated due to the existence of controler . What's good is that both the model and the view are modular. The past is a function of the view level of a business logic code, all mixed together, both easy to confuse and not easy code reuse, others see your code that call a tired ah. Now, the different business logic has been encapsulated, and the view coupling is small.
For example, you are the project manager and lead the team to do the project. In the past, it was the leadership who gave the task, what the task, and what the team did together. Artwork, coding, documentation, planning, configuration, etc. all of us did it together. Now is the division of labor, has a professional art team, Technology (coding team), Business Consulting (documentation) team, configuration management team, quality management team. Need to do which part of the task directly arranged by the corresponding team to complete, not only the task division is clear, but also strong reusability, professional work is also more focused, listen to very cattle.
On the MVC development model