EllisLab text mark
Advanced Search
     
Controllers
Posted: 18 November 2012 11:49 AM   [ Ignore ]
Joined: 2011-12-21
208 posts

I’ve always had problem organising my controllers. Generally I create only one controller, and inside it, all the methods, I know this is far from ideal.

At the moment, I’m developing a website for products review. So basically will have categories, products, users and reviews. How should I organise my controllers?

Basically, let’s say I’d clone http://www.buzzillions.com/ How should I organize my controllers?

Thanks in advance.

 
Posted: 19 November 2012 07:41 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2007-05-19
28 posts
ibnclaudius - 18 November 2012 11:49 AM

So basically will have categories, products, users and reviews...

Grats, you have your answer… or at least a great start! smile

 
Posted: 19 November 2012 03:41 PM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Joined: 2010-08-09
43 posts

the difficult one will probably be Users. write out all the different things Users can do -
List out the actions they can take, and the resources (database tables, etc) that they use.

Then group these actions into related tasks and start naming them. After you are clear on the requirements,
then look at using a CI auth library for the basic user creation and login tasks.

 
Posted: 19 November 2012 05:21 PM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Avatar
Joined: 2009-06-19
6267 posts
application/controllers/
categories
products
reviews
users 

 

 Signature 

Ceritfied State of CT Computer Programming Teacher.
Custom Designed Icons, eBook Covers Software Boxes. CD, DVD Etc. New iPhone® Tab Bar Icons and iPhone® Applications Icons.

STOP! Before posting your questions, remember the WWW Golden rule:
What did you try? What did you get? What did you expect to get?

Input -> Controller | Processing -> Model | Output -> View