Skip to main content

Posts

yii, Organize directories for applications with front-end and back-end

Large applications are often divided into front-end and back-end (or even more ends) depending on the target user groups. The front-end should be used by common users, while the back-end mainly the administrators or staff members. The two ends usually have dramatically different appearance, even though they may share a lot of code underneath. In this tutorial, we describe a way of organizing directories of the code for both ends. Note:   The directory organization described in this tutorial is meant to serve as a referential implementation. It is not a standard. Yii offers complete freedom for you to organize your directories, according to your needs. To start with, we give out the directory organization as follows, wwwroot/ index.php backend.php assets/ images/ js/ protected/ config/ main.php components/ controllers/ models/ views/ runtime/ backend/ config/ ...