Zend Framework Application: module dependencies
Posted
by takeshin
on Stack Overflow
See other posts from Stack Overflow
or by takeshin
Published on 2010-04-16T21:50:25Z
Indexed on
2010/04/16
21:53 UTC
Read the original article
Hit count: 235
How do you handle dependencies between modules in Zend Framework to create reusable, drop-in modules?
E.g. I have Newsletter module, which allows users to subscribe, providing e-mail address.
Next, I plan to add Blog module, which allows to subscribe to posts by e-mail (it obviously duplicates some functionality of the newsletter, but the e-mails addresses are stored in User model). Next one is the Forum module, with the same subscribe to post functionality.
But I want to have ability to use these modules independent to each one, i.e. application with newsletter alone, newsletter with blog, comibnation two or three modules at once.
This is pretty common, e.g. the same story with search feature. I want to have search module, with options to search in all data, blog data or forum data if available.
Is there any design pattern for this?
Do I have to add some moduleExists($moduleMame)
, or provide some interface or
abstract classes, some base controller pattern, similar for each module?
© Stack Overflow or respective owner