Welcome Guest, Not a member yet? Register   Sign In
Best CMS Structure
#6

[eluser]isaaccreative[/eluser]
I usually have two main directories in my "Controller" directory. One for the front end title "default" and the other for the back end title "admin"

i.e.

Controllers
/default
../ news.php
../ blog.php

/admin
../ news.php
../ blog.php

And then the Views are set-up vary similar. I also use what I call a "loader" function in all my controller files. Everything first gets sent to the "loader" function and then use switch statements to activate all the other functions in the controller.


Recently I worked on an existing CI Project and the previous developer used HMVC. I must say it made my life 10 times easier. Basically it's a collection MVC's structures grouped per category.

i.e.

Modules /
/ News
../Controllers
../../deafault.php
../../admin.php
../Views (ect...)
../Models (ect...)

/ Blog
../Controllers
../../deafault.php
../../admin.php
../Views (ect...)
../Models (ect...)


The great thing about this structure is that each "section" is pretty much self contained. I'm considering switching to HMVC for all my new projects.


Messages In This Thread
Best CMS Structure - by El Forum - 03-20-2009, 10:17 AM
Best CMS Structure - by El Forum - 03-20-2009, 10:52 AM
Best CMS Structure - by El Forum - 03-20-2009, 12:15 PM
Best CMS Structure - by El Forum - 03-20-2009, 12:44 PM
Best CMS Structure - by El Forum - 03-21-2009, 08:57 AM
Best CMS Structure - by El Forum - 03-23-2009, 08:40 PM
Best CMS Structure - by El Forum - 09-24-2010, 09:05 PM



Theme © iAndrew 2016 - Forum software by © MyBB