Difference between #2 and #10 of
The directory structure of the Yii project site

Changes

Title unchanged

The directory structure of the Yii project site

Category unchanged

Others

Yii version unchanged

Tags unchanged

directory, config

Content changed

[...]
### The Common Directory

The `common` directory contains the files that are shared among applications. For example, every application may need to access the database using ActiveRecord. Therefore, we can store the AR model classes under the `common` directory. Similarly, if some helper or widget classes are used in more than one application, we should also put them under `common` to avoid duplication of code.

To facilitate the maintenance of code, we organize the `common` directory in a structure similar to that of an application. For example, we have `components`,
'`models`, `lib`, etc.

As we will soon explain, applications may also share part of the configurations. Therefore, we also store the common configurations under the `config` directory in `common`.
[...]
We then create or modify the local configurations specific for the production server. For example, we may need to adjust the DB connection parameters. We may want to define `YII_DEBUG` to be false in `index.php`.

Because we store each application in a separate directory, if needed, we can deploy them to different servers.
 
 
 
Links
 
-----
 
 
[Russian version](http://resurtm.com/extensible-yii-directory-structure)
77 0
96 followers
Viewed: 248 852 times
Version: 1.1
Category: Others
Written by: qiang
Last updated by: Yang He
Created on: Mar 7, 2011
Last updated: 11 years ago
Update Article

Revisions

View all history