Yii Modular Structure Tips

Hey guys,

I’m member of a team and we newly decide to move on to the Yii Powered for the next version of our application, and now I’m in charge of restructuring the application with a new modular design which fits into the Yii also. Here is where I need your help and advise. :)

The software is consist of a few major sections such as Dashboard, Talk, Team, Data Lab, etc. However we have more components which must be shared between all sections. Let say we have Map and Chart which they should be totally standalone and also reusable in the whole application. To picture it better, imagine in Dashboard we need to render the Map one or several times plus Chart also, both on-the-fly and based on the user preferences. On the other hand, for example in Data Lab section, we do not have any Map there, but we have several Charts.

My question is how it would be better to structure it? For example Map could be a Module by itself, because it’s not something like a Widget. It’s interacting with Database and Filesystem and indeed it’s more complex to be a Widget. However the Dashboard and Talk, they are also Modules. Unfortunately, I didn’t found any good example of a total Modular application based on Yii, or any good Tutorial or Example on the 'net. For me, as I’m still very new to Yii, it’s a little bit hard to figure out how it could be a fail-safe modular structure which we were not gonna revise that again after two years!

I hope you guys give me some ideas, tips or examples! :)

Thanks in advance.

for anyone researching the “Modular YII” subject and arriving to this page, I am posting a couple of links where there’s more info about the options available:

https://code.google…esignPrinciples - design principles for hooks and loose coupling.

http://www.yiiframew…+ign#entry39686 - again hooks and modular design.