Welcome Guest, Not a member yet? Register   Sign In
Help/Advice on application design
#1

[eluser]VirtualDevel[/eluser]
Hey guys, I am working on one of my first web apps. It will have a few pages 5 or so that are all front end, this will be the main site. Then there will be an admin area with pages to update content on the front end pages. I am a bit unclear on how to proceed. Should I create on controller, i.e. site_main with functions for each of the main pages? Each with a model? Should I create seperate controllers for each of these pages? I also need to be able to allow the admin to create pages, should this be in its own controller? Thanks a ton, sorry for all the questions. I am new to MVC and CI..

V_Devl ~~~>.
#2

[eluser]SethG[/eluser]
[quote author="VirtualDevel" date="1198828800"]Hey guys, I am working on one of my first web apps. It will have a few pages 5 or so that are all front end, this will be the main site. Then there will be an admin area with pages to update content on the front end pages. I am a bit unclear on how to proceed. Should I create on controller, i.e. site_main with functions for each of the main pages? Each with a model? Should I create seperate controllers for each of these pages? I also need to be able to allow the admin to create pages, should this be in its own controller? Thanks a ton, sorry for all the questions. I am new to MVC and CI..

V_Devl ~~~>.[/quote]

Given that you want to allow for the flexible creation of pages. I wonder if you might not (and can) approach it where you code a "Page" controller that allows for the creation, editing, and display of pages. I say "(and can)" because the trick, which is not addressed in your post, is if the content for those pages is all the same and can be handled with a consistent layout.

Please keep in mind that I don't believe there is a right and wrong answer. I have created sites where I have had a controller for each area and feature. I have also created sites where I have had one main "Home" controller that was used to generate multiple pages, each represented by a different method.

Personally, when I approach a new project like this I want to produce the least amount of code and to keep things simply. I'll often map/plan things out on paper if I am not sure which approach to take.
#3

[eluser]Nick Husher[/eluser]
If you aren't required to build something entirely new, why bother reinventing the wheel? There are numerous lightweight content managment systems that you could configure to do exactly what you're after. EllisLab (creators of CodeIgniter) have a nifty shareware CMS called ExpressionEngine that could do most of what you want. I'm also a fan of TextPattern.




Theme © iAndrew 2016 - Forum software by © MyBB