CodeIgniter Forums
Controllers - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: Controllers (/thread-55948.html)

Controllers - El Forum - 11-18-2012

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 How should I organize my controllers?

Thanks in advance.

Controllers - El Forum - 11-19-2012

[quote author="ibnclaudius" date="1353253781"]So basically will have categories, products, users and reviews...[/quote]
Grats, you have your answer... or at least a great start! Smile

Controllers - El Forum - 11-19-2012

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.

Controllers - El Forum - 11-19-2012

- categories
- products
- reviews
- users