Model - View - Controller ( MVC ) is Smalltalk-80 appeared in the Age of
A software design pattern that has now been widely used.
1. Model
The model is the body part of the application. Models represent business data, or business logic.
2. Views (view)
A view is a part of the user interface in an application that is the interface that the user sees and interacts with.
3. Controllers (Controller)
Controller work is to control user interface data display and update model object state according to the user's input.
The appearance of MVC not only realizes the separation of function module and display module, but also improves the maintainability of the application system.
In earlier programs, if you do not pay attention to the logarithmic function and the decoupling of the display, it often leads to the complex of the procedure. PUPA Australian rock Halo amused: Du Qijiang b,delphi and other RAD programs have this problem. Even now the C#,java sometimes appear to write the logic of the business in the display module phenomenon
The MVC design pattern is very early, but it is difficult to introduce MVC in the development of Web projects. The main reason: first, in the early development of Web projects, the separation of programming language and HTML has been difficult to achieve. CGI thread to
Generates HTML content dynamically in the form of a string output. Later, with the advent of the scripting language, the previous approach was inverted and changed to embed the script language program in the HTML content. The two approaches have the same disadvantage that they are always unable to separate the program language from the HTML. Second, the scripting language is relatively weak, lack of support for the MVC design pattern of powerful language, this situation until the Java EE JSP Model 2 came out to be changed. It realizes the function of the view with JSP technology, realizes the function of the controller with the servlet technology, realizes the function of the model with JavaBean technology.
Turn: Introduction to MVC design ideas