Home > Backend Development > PHP Tutorial > Thoughts on the php mvc development model_PHP tutorial

Thoughts on the php mvc development model_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-21 15:27:23
Original
857 people have browsed it

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

Do we need 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 PHP rapid development concept.

What do we need?

1. View separation

2. Code reuse

3. Development efficiency

So I feel that in mvc mode development, it is not necessarily mandatory. Distinguish between m and c. Data that needs to be reused is put into m, and data that does not need to be reused can be thrown directly into c. What do you think? ?

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/323759.htmlTechArticleWhat is the purpose of using the mvc development model? ? MVC is a design pattern that enforces separation of input, processing, and output of an application. Using MVC the application is split into three core components...
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