How to organize the yii structure for backend and frontend? This question is so frequently asked in the internet. After reading the some articles, like
Unfortunately, I have NOT decided which is the best one for me. Now I can only write the rules I need to consider:
1. The frontend and backend controller should be seperated. The controller of frontend should be NOT accessed from backend, and vice versa.
2. Some components and extensions are able to be used for both frontend and backend.
3. The module should be self-sufficient. It can contain admin code and front code, but it should not be separated into two different folders. The controller of frontend should be NOT accessed from backend, and vice versa.
4. The multi-language files should be used in Models and Modules.
5. The frontend or backend code can use common lib code, but the common lib code should not use the two ends’ codes.
6. For development with namespace, it should be configued easily.
To be continued all the time.