« Return to Thread: Shared Models in Different Modules
That's an interesting approach. No idea if it would actually work, but it's always fun to speculate about these things. :-P I'd be interested to hear your ideas on placement. I suppose a module could have a configuration file or similar where those things could be set.bradley.holt wrote:Assuming you do, in fact, need to add a cross-module
dependency you can always use the design principle of programming to an
interface (or an abstract class, this doesn't have to be applied literally). This way you
can have a dependency on *a* User module instead of *the* specific User
module (for example) you happen to be using at the moment. Of course, this
leaves open the question as to where the interfaces (or abstract classes)
for the module should live because they can't live in the module itself as
this would defeat the purpose. Anyone want to take a crack at this problem?
I have a few ideas but I'm interested to hear if anyone else has found a
solution to this problem.
I agree. I tend to favour compontents as often as it makes sense.bradley.holt wrote:If you find yourself introducing a lot of cross-module dependencies then perhaps you would be
better of creating components instead and then using these components from within your modules.
I think you are ;-) But seriously, other frameworks do this with various success. Symfony for instance. It's a tricky area.bradley.holt wrote:I would like to have some more guidance from Zend here on best practices for
writing MVC modules. If lots of people started following the same practices,
we could end up with a situation where there a lot of well-written, modular
applications out there that can be wired up to quickly build your
application. For example, grab a wiki module and a blog module and throw
them into a custom Zend Framework application and quickly have a website
with all of these features integrated. Maybe I'm dreaming here :-)
« Return to Thread: Shared Models in Different Modules
| Free embeddable forum powered by Nabble | Forum Help |