Thoughts on the php mvc development model

Source: Internet
Author: User

Introduction: This is a detailed page on the thoughts of php mvc development mode. It introduces PHP, related knowledge, skills, experience, and some PHP source code.

Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 339492 'rolling = 'no'>

I have been using MVC for a long time and found some problems.

What is the purpose of using the MVC development model ??
MVC is a design pattern that enforces ApplicationProgramSeparate input, processing, and output. MVC applications are divided into three core components: model, view, and controller. They process their own tasks.

Do we need to strictly distinguish the MVC three-layer mode? The cross-border use of M and C is more conducive to rapid development.
In my framework, M and C can be used across borders and are not strictly differentiated. Sometimes I want to directly process m in C, because business data processing is rare, maybe only once. In this way, write a function in m,

It is complicated to use C calls, which is contrary to the PHP rapid development philosophy.

What do we need?

1. View Separation

2.CodeReuse

3. Development Efficiency

Therefore, in MVC development, it is not necessary to forcibly distinguish between M and C. The data to be reused should be put into M. Simply, those that do not need to be reused can be directly thrown into C. What do you think ??

Love J2EE follow Java Michael Jackson video station JSON online tools

Http://biancheng.dnbcw.info/php/339492.html pageno: 8.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.