Home > Backend Development > PHP Tutorial > Some thoughts on the php mvc development model

Some thoughts on the php mvc development model

WBOY
Release: 2016-07-25 09:05:23
Original
872 people have browsed it
MVC development pattern MVC is a design pattern that enforces the separation of input, processing, and output of an application. MVC applications are divided into three core components: model, view, and controller. They each handle their own tasks.

mvc development model MVC is a design pattern that enforces separation of input, processing, and output of an application. MVC applications are divided into three core components: model, view, and controller. They each handle their own tasks.

Is it necessary to strictly distinguish the three-layer mode of MVC? The cross-border use of m and c is more conducive to rapid development. In the framework I use, m and c can be used across boundaries and are not strictly distinguished. Sometimes I really want to deal with m directly in c, because business data processing is rare, maybe only once. In this way, writing a function in m and then calling it with c becomes complicated, which is contrary to the rapid development concept of PHP.

What do we need? 1. View separation 2. Code reuse 3. Development efficiency

Personally, I feel that in MVC mode development, it is not mandatory to distinguish between m and c. Data that needs to be reused is put into m, and simple data that does not need to be reused can be thrown directly into c. Looking forward to expert advice, please join the official QQ group of Scripting School: 161228069 to participate in the discussion.



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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template