Introduction to MVC and introduction to mvc pattern
The full name is Model View Controller, Model-View-Controller, which is a software design Model. It organizes code by separating business logic, data, and interface display, the business logic is aggregated into a component. You do not need to re-compile the business logic while improving the custom interface and user interaction.
M refers to the business model, V refers to the user interface, and C refers to the controller. The purpose of using MVC is to separate the implementation code of M and V, so that the same program can use different forms of representation.
Model)Is part of the application's data logic.
Typically, model objects are used to access data in databases.
View)Processing data display in the application.
Generally, a view is created based on model data.
Controller)Is the part of the application that processes user interaction.
Generally, the Controller reads data from the view, controls user input, and sends data to the model. MVC layering helps you manage complex applications, because you can focus on one aspect within a period of time. For example, you can focus on view design without relying on business logic. It also makes application testing easier. MVC layering also simplifies group development. Different developers can develop views, controller logic, and business logic at the same time. The first time I saw this word was when I knew Django, I thought it was a long time (but you didn't write Django now) from Baidu encyclopedia