Site Structure 101

Hi All,

My apologies if this topic has been covered before.

We are planning to use YII to create one of our websites and I have several questions on the structure which we should follow.

We have defined specific modules / components that the application is made up of. For example one module could have one parent DB table with several child tables, we have defined this as a module, this could be related to another module.

The site will have two sections, an admin section and a front-end.

I have been developing in Django for ages, so I have been used to seperating these modules into seperate applications, each application contains its own model file (Which contains all the model class that make up that appliaction) and it controller file. This works perfectly for sites with a lot of different components.

What is the best-practice in YII?

Should I be using yii modules? http://www.yiiframework.com/doc/guide/1.1/en/basics.module

Would the site consist of two modules? Front-End & Admin - (as has been suggested by users on the forum),

or a module for EACH component specified by our DB model? (Which seems more logical to me)

I have already played around seperating the two sections using two bootstraps, as described here: http://www.yiiframework.com/forum/index.php?/topic/5786-access-control-for-admin-php/

Thanks in advance for all your help.

These wiki articles can give you more ideas:

http://www.yiiframework.com/wiki/33/

http://www.yiiframework.com/wiki/63/organize-directories-for-applications-with-front-end-and-back-end-using-webapplicationend-behavior

Thanks mdomba, those are the articles I followed, thanks for clarifying.

Further onto the compnents question.

What I currently have is:

protected/models/component_1/

protected/models/component_2/

with views and controllers broken up similarly? My concern is that this structure may become very complex and difficult as the project grows.

Should these rather be yii modules?

a very similar questions has been asked here: http://www.yiiframework.com/forum/index.php?/topic/781-how-to-organize-yii-modules/

to me it is very important to keep a large project modularized into seperate modules as described by the above post.