Turn: Introduction to MVC design ideas

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.