Home > Backend Development > PHP Tutorial > What is the MVC pattern

What is the MVC pattern

清浅
Release: 2023-04-04 19:26:01
Original
35287 people have browsed it

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

What is the MVC pattern

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

What is the MVC pattern

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.

What is the MVC pattern

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template