Home  >  Article  >  what is mvc

what is mvc

青灯夜游
青灯夜游Original
2019-05-07 15:06:3868300browse

The full name of MVC is Model View Controller. It is a pattern that uses "model-view-controller" design to create web applications, while providing complete control over HTML, CSS and JavaScript. It is A software design paradigm.

what is mvc

MVC originally existed in desktop programs. Its full name is Model View Controller, which is business model (model)-user interface (view)-controller. The abbreviation of (controller), it is a software design model.

what is mvc

The purpose of using MVC is to separate the implementation code of M (business model) and V (user interface), so that the same program can use different forms of expression. The purpose of C (controller) is to ensure the synchronization of M and V. Once M changes, V should be updated synchronously.

MVC uses a method of separating business logic, data and interface display to organize code and gather numerous business logics into one component. While improving and personalizing the interface and user interaction, it does not require Rewrite business logic to reduce coding time.

MVC Programming Pattern

MVC is a pattern that uses MVC (Model View Controller model-view-controller) to design and create Web applications. It also provides support for HTML, CSS and JavaScript. fully control.

● Model is the part of the application that handles application data logic. Usually responsible for accessing data in the database.

● View is the part of the application that handles data display. Usually created from model data.

●Controller is the part of the application that handles user interaction. Typically responsible for reading data from the view, controlling user input, and sending data to the model.

MVC layering helps manage complex applications because you can focus exclusively on one aspect at a 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 simultaneously.

The above is the detailed content of what is mvc. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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