CodeIgniter Forums
all in one controller? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: all in one controller? (/showthread.php?tid=9194)



all in one controller? - El Forum - 06-16-2008

[eluser]Asinox[/eluser]
Hi, i want to know ...if the correct thing is put all in one controller.... get_articles, read, add, edit.

i asking because i need to know about the private seccion....


some tutorial?

Thanks Smile


all in one controller? - El Forum - 06-16-2008

[eluser]bapobap[/eluser]
You can do what you want.

I prefer to keep the admin section separate if I'm the only one who uses it, so a different controller for both types of use.

If users use both, I'd keep them in the same controller.

It doesn't really matter either way, you can do it whatever way you want.


all in one controller? - El Forum - 06-16-2008

[eluser]mglinski[/eluser]
Use Logic, works every time.

Assemble controllers that control all the functions of a specific group(like a blog).
Separate the admin to save execution time on the frontend.
Create a model to access the DB like an API( $this->db_model->getArticles(10) ).

Follow my advice and you are on your way. Wink
-Matt


all in one controller? - El Forum - 06-16-2008

[eluser]Asinox[/eluser]
Thanks guys Smile