• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Project Structure Suggestion

#1
[eluser]BrandonDurham[/eluser]
I'm working on a custom CMS and I'd really appreciate any suggestions on how to structure my controllers for it. Here's a short description of the project:

The site is split into two areas that I'll refer to as Area 1 and Area 2. Area 2 is basically an online newsletter with new "issues" approximately every month or so. Each "issue" will have six sub sections that I'll call Section 1, Section 2, and so on. Every issue will have these same sections, but each section will have different content, naturally.

Area 1 is pretty much the same concept but on a smaller scale.

So, should I build this CMS with two controllers—area_1 and area_2—and have each area's subsequent sections be functions in those controllers passing the issue_id in so I know what to display? That would make the URL look like:
Code:
http://cms.website.com/index.php/area_1/section_1/7
Does this seem like a good structure? If so, then how about when I want to edit a section? Would the URL look like:
Code:
http://cms.website.com/index.php/area_1/section_1/7/edit
and the function in the area_2 controller:
Code:
function section_1($issue_id, $action)
{
    switch ($action) {
        case "edit" :
        break;
    }
}
That seems messy to me. Is that bad form or is it pretty standard?

I really appreciate any suggestions I can get. Thanks!

#2
[eluser]BrandonDurham[/eluser]
Would this be a good use for Matchbox?


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.