Welcome Guest, Not a member yet? Register   Sign In
Controllers per page?
#4

[eluser]theshiftexchange[/eluser]
[quote author="jrock2004" date="1333628289"]So, I am working on my first site using CodeIgniter and I have created one controller and have created function for each page. Is this the process or should I be making a controller for each page? Thanks[/quote]


You should generally do a controller for each 'section'/'logic'/'function' of your website.

i.e. A controller for the admin section, a controller for bookings, a controller for payments, a controller for orders.

Each of these controllers would have 1->Many views, depending on what you do.

Making a controller simply for the sake of having one per view would generally be incorrect, but at the end of the day it is really up to you.

More reading:
http://ellislab.com/codeigniter/user-gui...w/mvc.html
http://ellislab.com/codeigniter/user-gui...llers.html



Messages In This Thread
Controllers per page? - by El Forum - 04-05-2012, 05:18 AM
Controllers per page? - by El Forum - 04-05-2012, 01:41 PM
Controllers per page? - by El Forum - 04-06-2012, 06:52 AM
Controllers per page? - by El Forum - 04-06-2012, 09:05 AM
Controllers per page? - by El Forum - 04-06-2012, 12:17 PM



Theme © iAndrew 2016 - Forum software by © MyBB