Question

How does Magento MVC differ from classical MVC or Zend Framework MVC? Any explanation will be appreciated.

Was it helpful?

Solution

While Magento's MVC uses the same base controller classes, almost everything else is custom. Off the top of my head.

  1. Module frontnames are defined in Magento's config.xml

  2. 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

  3. The above mentioned routers have custom code for automatically requiring (vs. __autoload the base controller files.

  4. There's a configuration based and database based rewrite system for changing MVC routing logic

  5. Magento's event/observer system lets you inject your own router object which may change routing logic, or bypass it entirely

  6. The handoff from controller action to view is completly different — Magento has a view system/layout-object distinct from Zend Frameworks view system

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top