Model (Data Model)-View-Controller)

Source: Internet
Author: User

 

 

1. What is model?

The model can be translated into a "Data Model". The specific work is as follows:

(1) define the data structure.

(2) communicates with the database.

(3) read or write data from the database.

(4) run the pre-stored data.

(5) verify the data format and process various data.

2. What is view?

View is responsible for all the things presented to users. A simple understanding is the input and output, and the output group is displayed on the browser interface. The input task is to transmit user data to the server.

Input:

(1) obtain data from the Controller and display it on the user interface. (2) display the data transmitted by the Controller on the interface, and the data can be found in the model.

Output:

(1) send the data back to the Controller, and output the data through post or get to determine which action the data is uploaded to and verify the basic data format at the front end.

3. What is controller?

Controller, as its name implies, is a global object, mainly responsible for: (1) determine the channel of communication with users, such as HTTP or HTTPS

(2) determine the system operation process. For example, you must immediately switch to another interface after receiving data from the Controller. (3) obtain data from the model (4) determine which view to display.

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.