I'm working with a MVC modular structure, kind of like you can have with Zend (i'm not using Zend). The directory structure is as follows:
/www
/Config
/Modules
/default
/controllers
indexController.php
loginController.php
/models
/views
blog
/controllers
indexController.php
/models
/views
...
I have a few question about this structure. I have a loginController in my "default" folder. Obviously a user goes to that page to login.
A logged in user can then post someting on the blog. But this is where my problem is. How can different modules share data, like user data?
In this scenario the "default" module will also have a "userModel". But the blog also displays a list of 'newest users'. So somehow it needs access to the userModel which is inside the "default" module.
And i could think of more examples where a certain module needs data from another module.
But this means that a 'module' is in a way almost always dependant on another module. So that's why i don't see any use in this structure. Or am i doing something wrong here..??