How does Magento MVC differ from classical MVC / Zend Framework MVC? [closed]
-
16-10-2019 - |
سؤال
How does Magento MVC differ from classical MVC or Zend Framework MVC? Any explanation will be appreciated.
المحلول
While Magento's MVC uses the same base controller classes, almost everything else is custom. Off the top of my head.
Module frontnames are defined in Magento's
config.xml
Since Magento has its own module structure, parsing the configuration to match a module front name with a module is completely custom, and is achieved in a match method in a series of custom router object
The above mentioned routers have custom code for automatically requiring (vs.
__autoload
the base controller files.There's a configuration based and database based rewrite system for changing MVC routing logic
Magento's event/observer system lets you inject your own router object which may change routing logic, or bypass it entirely
The handoff from controller action to view is completly different — Magento has a view system/layout-object distinct from Zend Frameworks view system