Andries Seutens a écrit :
Hello all,
I was wondering, what do you guys consider best practice for setting
up a frontend and a backend for a project.
I don’t know if it's best practice but I do it this way:
Controllers are directories, and I have one action per files or one
index file with all actions in it. FrontOffice’s actions are in a
“front” directory and backOffice’s action in a “back” directory :
app/user/front/actions/
app/user/front/views/
app/user/back/actions/
app/user/back/views/
app/user/models/
app/user/front/actions/
app/user/front/views/
app/user/back/actions/
app/user/back/views/
app/user/models/
Then I have 2 bootstrap files:
index.php
admin/index.php
I have $dispatcher->setActionBaseDir = ‘/front’ for the frontOffice
and $dispatcher->setActionBaseDir = ‘/back’ for the backOffice
regards
- Do you work with a single bootstrap file, or multiple bootstrap
files (eg. one for frontend and one for backend)
- How do you deal with your controllers in this situation? Because
application logic in backend and frontend usually differ.
- 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...
Best regards,
--
Laurent Melmoux, [EMAIL PROTECTED]
Annecy - France