MVC design pattern is the model view controller design pattern. It specifies that the application includes a data model, presentation information, and control information. The pattern requires that each pattern be separated into distinct objects.
Model-View-Controller (MVC) is an architectural pattern framework developed by Microsoft Corporation. It is a form of networking used to create web applications instead of ASP.NET. The MVC framework has the characteristics of a lightweight and testable framework and separates the application into three components: model, view and controller. Next, in the article, I will introduce in detail what the MVC pattern is
Meaning:
MVC design pattern is model view control The Server design pattern specifies that an application includes a data model, presentation information, and control information. This pattern requires that each pattern
be split into distinct objects.
It contains three modules: model (M), view (V), controller (C)
Model: only contains pure application data, it does not contain logic describing how to Data is presented to the user
View: Displays the model's data to the user. The view knows how to access the model's data, but it has no idea what that data means or what the user can do to manipulate it.
Controller: exists between the view and the model. It listens for events triggered by views (or other external sources) and performs appropriate reactions to these events. In most cases, react calls methods on the model. Since the view and model are connected through the notification mechanism, the results of the operation will automatically be reflected in the view
Advantages and Disadvantages:
Advantages:
Multiple developers can work on models, controllers, views, etc. at the same time.
MVC supports logical grouping of related operations on the controller. Views for specific models are also grouped together.
A model can have multiple views.
Disadvantages:
Frame navigation can be complex because it introduces a new layer of abstraction and requires users to adapt to MVC's decomposition standards.
Developers who use MVC need to be proficient in a variety of technologies.
Why use MVC
When we develop an application that is lightweight and easy to test and maintain Can be developed in MVC. As well as building large view states in Asp.net with various server controls to maintain a page-heavy state, if and when an application with low bandwidth will not be able to access this heavy page. But using some features of MVC, it will improve the performance of the application.
Summary: The above is the entire content of this article, I hope it will be helpful to everyone.
The above is the detailed content of What is the MVC pattern. For more information, please follow other related articles on the PHP Chinese website!