为什么要在php网站中使用MVC? [英] Why should I use MVC in a php website?

查看:65
本文介绍了为什么要在php网站中使用MVC?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

许多框架都是基于mvc的,但是我对MVC却一无所知.那么MVC的用途是什么? 是出于速度,安全性还是其他原因?

Many frameworks are based on mvc, but I have no idea about MVC. So what is the use of MVC? Is it for speed, security or any other reason?

推荐答案

MVC允许您将业务逻辑与表示层分开.这种关注点分离"使您可以快速查找和编辑部分代码.它还可以轻松地在整个系统中重复使用UI组件.

MVC allows you to separate your business logic from your presentation layer. This "Separation of Concerns" allows you to quickly find and edit portions of your code. It also enables easy reuse of your UI components across your system.

请查看Wiki页面,以获取有关MVC的过度学术和技术介绍 http://en.wikipedia. org/wiki/Model_view_controller

Check out the wiki page for a overly academic and technical introduction to MVC http://en.wikipedia.org/wiki/Model_view_controller

这篇关于为什么要在php网站中使用MVC?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆