問題描述
我想知道 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.
ZF1 和 ZF2 在另一個線程中進行比較.
MVC 或 MOVE
SOLID 面向對象編程
這篇關于ZF2 是基于 MOVE 的嗎?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!