On 05.12.2006, at 12:10 PM, Andries Seutens wrote:
Hello all,
Hi,
I was wondering, what do you guys consider best practice for
setting up a frontend and a backend for a project.
- Do you work with a single bootstrap file, or multiple bootstrap
files (eg. one for frontend and one for backend)
In aplications with both frontend and backend I use two bootstraps:
first for site root and second for admin page.
- How do you deal with your controllers in this situation? Because
application logic in backend and frontend usually differ.
Views, controllers and models are different in backend and frontend
so I divided aplication into two main app
directories. This is directory structure od my application:
app/user/controllers/
app/user/views/
app/user/models/
app/cms/controllers/
app/cms/views/
app/cms/models/
cfg/
tmp/
[...]
- How do you setup your .htaccess in this situation? I want to have
"/admin/" go to the backend, so "/admin/" cannot be dispatched as a
controller...
I have one .htaccess for site root and one for backend. They are both
the same:
RewriteEngine on
RewriteRule !\.(js|ico|gif|jpg|png|css|html)$ index.php
Best regards,
--
Andries Seutens
http://andries.systray.be
Greetings,
Wojciech Naruniec
http://wojciech.naruniec.info/