Welcome Guest, Not a member yet? Register   Sign In
View-centric design philosophy with CI
#2

[eluser]Colin Williams[/eluser]
The way I approach it is quite simple. First I ask, "What are the components of this application?" Well, there are users, there are pages, there are categories, there are comments. Right there I see at least 4 controllers brewing. Then I ask "What do these components do, or what can be done to them/with them?" and I break down the actions for each controller. This usually starts with the 4 CRUD operations and goes from there.

page/view
page/add
page/edit
page/delete
user/add
user/edit
user/delete
user/login
user/dashboard
user/profile
comment/add
comment/delete
comment/view
comment/history/uid

I've also seen it approached the other way before, where you build controllers based on the operations. So for instance, you would have an Add controller, an Edit controller, a Delete controller, and so on. I went this route once and it certainly has its benefits, so it might be a direction you consider.

add/page
add/user
add/comment
edit/page
edit/user
edit/comment

You should certainly have the final menu/URL structure for your application in mind from the start, but build the app in such a way that each component is self contained and controlled.


Messages In This Thread
View-centric design philosophy with CI - by El Forum - 08-24-2008, 08:15 PM
View-centric design philosophy with CI - by El Forum - 08-24-2008, 09:17 PM
View-centric design philosophy with CI - by El Forum - 08-24-2008, 09:52 PM
View-centric design philosophy with CI - by El Forum - 08-24-2008, 11:27 PM
View-centric design philosophy with CI - by El Forum - 08-25-2008, 08:02 AM
View-centric design philosophy with CI - by El Forum - 08-25-2008, 12:01 PM



Theme © iAndrew 2016 - Forum software by © MyBB