Welcome Guest, Not a member yet? Register   Sign In
Divide controllers in folders, good practice?
#8

[eluser]Thomas Edwards[/eluser]
I can give you an example of a project I’m working on. It’s a webapp for students’ unions. I have events.php, clubs.php and news.php. Each one is quite complex, but they remain in one file. I have one folder called admin, and have an events.php and clubs.php in the admin folder. News is edited on the front-end, and so are basic tasks for events and clubs, but more advanced things (such as setting up membership for a club, or creating a ticket for an event) are handled by files in the admin folder. The files in the admin folder also require an extra level of security, you have to be logged in and made an “admin”.

-admin/
--clubs.php
--events.php
-clubs.php
-events.php
-news.php

There’s actually 48 controllers in total, but I’ve simplified it here.


Messages In This Thread
Divide controllers in folders, good practice? - by El Forum - 12-13-2010, 08:32 AM
Divide controllers in folders, good practice? - by El Forum - 12-13-2010, 08:39 AM
Divide controllers in folders, good practice? - by El Forum - 12-13-2010, 08:42 AM
Divide controllers in folders, good practice? - by El Forum - 12-13-2010, 08:50 AM
Divide controllers in folders, good practice? - by El Forum - 12-13-2010, 08:57 AM
Divide controllers in folders, good practice? - by El Forum - 12-13-2010, 09:07 AM
Divide controllers in folders, good practice? - by El Forum - 12-13-2010, 09:09 AM
Divide controllers in folders, good practice? - by El Forum - 12-13-2010, 09:16 AM
Divide controllers in folders, good practice? - by El Forum - 12-13-2010, 09:22 AM



Theme © iAndrew 2016 - Forum software by © MyBB