Posted 21 May 2012 - 05:14 AM
I am new to Yii and I want to create the correspondint file structure.
I need frontent to be accessable via www.mysite.com
and backand to be accessable via www.mysite.com/admin
I will use simple hardcoded admin username/password for administation for now.
What would be the best folder structure?
I have found the following http://www.yiiframew...i-project-site/
but I do not understand if it fits my needs.
As I have read in some forum topics this makes two different vhost links (for backend and frontend).
I actually do not need it. I need to have only one virtual host link that points to www.myside.com.
Posted 21 May 2012 - 05:43 AM
add sub-folder "admin" in /controllers and /views and put you controllers and view files into them.
If you need something simple I'd go with the second approach. For a more advanced usage I'd go with an admin module.
I'd use the approach from the link you provided for a large/huge project only.
Posted 21 May 2012 - 08:55 AM
In other words: if you need not only back-end CRUDs with views, but used in back-end only models and/or components and/or external libraries, then, of course, you'd better to use a separate admin module.
IMO, there's not that big difference for a simple back-end between these approaches, and the choice often depends on whole application design and architect developer taste.