Hi,
this is actually suggestion for planned Yii 2.0, but i could not find any separate forum for that.
In Yii 2.0, generated webapp (via CLI) should better reflect real-world organization of directories with regard to writing permissions and private versus public access.
This is most suitable structure and I use it almost without change in every project:
[private, read-only]
/app/ ... Yii application
/framework/ ... Yii framework
...
[private, writable]
/writable/ ... all writable private contents
/writable/cache/
/writable/log/
/writable/temp/
...
[public, read-only]
/public/
/public/css/
/public/js/
/public/images/
/public/themes/
...
[public, writable]
/public/assets/ ... framework assets
/public/temp/ ... e.g. uploaded images
...
in short:
/app
/framework
/writable
/public
Current structure of CLI generated webapp is not quite well thought through, actually I must always
spend some time to move directory to provide more secure and easier maintainable structure:-)
Main problem is the [protected] folder containing writable and read-only contents, which is insecure and harder to maintain.
What do you guys think - would this structure be better or not?
Cheers
Lubos