The mvc that thinkphp is based on refers to: 1. m is the abbreviation of model, which represents the model and is used for data processing; 2. v is the abbreviation of view, which represents the view and consists of View class and template file; 3 , c is the abbreviation of controller, which means controller, used for logical processing. The MVC design pattern is a programming idea and a method of separating the logical layer and presentation layer of an application.
The operating environment of this article: Windows 10 system, ThinkPHP version 6, Dell G3 computer.
What does thinkphp's mvc mean?
The abbreviation of MVC model-view-controller
thinkphp is A framework of the programming language PHP. A framework is a collection of tools that improves development efficiency.
mvc is a programming idea, m is the abbreviation of model, used for data processing, v is view, which is the web page view, c is controller, the meaning of controller, used for logical processing; mvc can facilitate different Logic development improves code readability and maintainability.
MVC is a method of separating the logical layer and presentation layer of an application. ThinkPHP is also based on the MVC design pattern. MVC is just an abstract concept and has no particularly clear regulations. The MVC layering in ThinkPHP is roughly reflected in:
Model (M): The definition of the model is completed by the Model class.
Controller (C): Application controller (core controller App class) and Action controller both assume the role of controller. Action controller completes business process control, while application controller The controller is responsible for scheduling control.
View (V): It consists of View class and template file. The template is 100% separated and can be previewed and produced independently.
But in fact, ThinkPHP does not rely on M or V, which means it can work without a model or view. It doesn’t even rely on C. This is because ThinkPHP also has a master controller on top of Action, the App controller, which is responsible for the overall scheduling of the application. In the absence of C, view V must exist, otherwise it is no longer a complete application. All in all, ThinkPHP's MVC model only provides a means of agile development, rather than sticking to MVC itself.
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of What do thinkphp's mvc refer to?. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

WebStorm Mac version
Useful JavaScript development tools

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SublimeText3 Linux new version
SublimeText3 Linux latest version
