A little exploration of MVC pattern

Source: Internet
Author: User

This article mainly introduces an MVC pattern.

1, recently looking at a Golang framework (Beego), so there is a basic understanding of the MVC pattern . In short, the MVC pattern is one of the architectural patterns , the most common one, the web framework, and the software architecture are done through the MVC pattern.

2. To expand, the MVC pattern is the abbreviation for three words:model, view,and Controller (Control), and we will explain the meaning and function of the three layers from the top down.
· View: This layer can be literally "view layer", provide user interface, is the shell of the program. If you put it in web development, it's what we're showing on the front end.
· controller: This layer we can call the "control layer" to provide the underlying interface for the content on the view, for example, to implement various method in the front end.
· Model: This is the bottom layer, mainly the data or information that the program needs to manipulate, most of the way it interacts with the database, or it needs to be reused in the controller layer.

3, the three layers are closely linked together, but independent of each other, each layer is finished to provide the interface for the above layer call. In this way, software development can be modular. For example, modifying a skin can only be done by changing the view layer, without having to manipulate the other two layers.

4, in fact, whether it is software development, or web framework, we also have a lot of things in life can be abstracted into the MVC pattern, such as time-out shelves, warehouses, and merchandise from warehouse to shelf rules, these three parts can be expressed with MVC.

More descriptions can be understood by reading the contents of the reference.

Reference
[1] Talk about the MVC pattern

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.