问题描述
我想知道 ZF2 是否完全基于 MOVE 而不是经典的 MVC.
I'm wondering if ZF2 is based entierly on MOVE instead of the classic MVC.
我读到的某处确实基于 MOVE (http://cirw.in/blog/time-to-move-on) 但例如在入门教程"(http://zf2.readthedocs.org/en/latest/user-guide/overview.html)中,他们说使用模型-视图-控制器范例创建一个简单的数据库驱动应用程序".
Somewhere I read that is really bases on MOVE (http://cirw.in/blog/time-to-move-on) but e.g. in the "getting started tutorial" (http://zf2.readthedocs.org/en/latest/user-guide/overview.html) they are saying "creating a simple database driven application using the Model-View-Controller paradigm".
那么,它现在基于什么?两者都支持吗?
So, what is it now based on? Does it support both?
我有点困惑.ZF1和ZF2在MVC上有什么区别?
I'm a bit confused. What are the difference at MVC between ZF1 and ZF2?
谢谢
推荐答案
MOVE (Models, Operations, Views and Events)
MVC (Models, Views, Controllers)
MVC 的问题是你最终会在控制器中塞入太多代码,为了克服这个问题 MOVE 是另一个在 zf2 项目中可以选择的选项,因为在这种架构中,您可以将控制器拆分为事件和操作.
The problem with MVC is that you end up stuffing too much code into controllers,to overcome this problem MOVE is another possible option to choose in zf2 projects,Because in this architecture you can split your controller into Events and Operations.
问题:ZF2 是否完全基于 MOVE 架构?
我不认为 ZF2 是完全基于 MOVE 架构设计的.ZF2 遵循 SOLID 面向对象设计 原则和松散耦合的 MVC 架构 在可用性方面提供了更大的灵活性.
I don't think ZF2 is designed entirely on MOVE architecture.ZF2 follows the SOLID object oriented design principle with loosely coupled MVC architecture which provide more flexibility in terms of usability.
问题:我可以使用 ZF2 中的 MOVE 架构开发我的项目吗?
是的,ZF2 为您提供了支持两种架构(MOVE、MVC)的一切.它提供模型、视图、控制器(操作)、事件.他想使用哪种架构取决于开发人员.
Yes ZF2 provides you with everything to support both architectures (MOVE, MVC).It provides Models, Views, Controllers(Operations), Events.It is up to the developer which architecture he would like to use.
这篇关于ZF2 是基于 MOVE 的吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!