1

The web App has four distinct user areas.

  1. The frontend for people off the street
  2. The user area for logged in users
  3. A teacher zone
  4. An Admin c-panel

I am using CodeIgniter with the HMVC extension.

Here is my current list of module folders. Each database table has a corresponding module.

enter image description here

Each module has a MVC triad except for the admin folder and the teach folder.

The admin folder is like a mini application just for the administrators with multiple controllers each handling an admin url. The admin module looks like this:

enter image description here

Likewise the Teach module is like a mini application just for the teachers. All the controllers are routed to www.example.com/teach/controller/method/param.

It looks like this:

enter image description here

Each module has exactly one model and I am loading the models where and when I need them, so if I need the schedule model in the admin/student controller I simply write:

$this->load->model('schedule/Schedule_model');

I can't think of another way I could go about this without making custom routes in the routes.php file for each and every method.

However something does not sit right. I could not find any information on the web about how to structure a site with sub-applications and I have never seen a website structured like how I have it structured.

Everything is working okay but I am interested to know if there is a better way.

  • 2
    In order for questions containing words like "good," "better," and "best" to be answerable, you need to provide us with a better qualification than "something does not sit right." What does "best" mean to you specifically in this context? – Robert Harvey Oct 1 '16 at 18:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.