Magento module vs Zend Framework module

Magento 和 Zend Framework 都有 module 这个概念,我觉得这两者在设计思路略有区别,不能拿 Zend Framework module 去套 Magento module,反之亦然。

简单点说,Magento module 是功能模块,Zend Framework module 是物理模块。Magento 把系统分割为十几个子系统,每个子系统各司其职,相对独立,但在整个 Magento 框架下,相对独立的子系统也能非常方便地与其他子系统通信,调用其他子系统中的功能。Zend Framework module 着眼逻辑分层,从 module 到 controller 再到 action。Zend Framework 并没有为 module 之间的通信作过多的考虑,如果用户有此需求,需要自行考虑,比如借鉴 Magento 的做法,在 Zend Framework 上再套一个框架。

Leave a comment

Your email address will not be published. Required fields are marked *