[eluser]jedd[/eluser]
[quote author="Mario Rojas" date="1253009281"]
.. but, the general idea is one controller per app? this method works in other kind of projects? when can I use more than one controller?
[/quote]
Ah, no. The general idea is one controller per resource.
Resource is a curious word for both native speakers and nesbis, so one controller per noun - or 'thing that you do stuff with'. The 'doing stuff' bits (verbs), of course, are your methods -- in this instance the adds, deletes and searches. (
Generally speaking, of course. You'll have exceptions, but it's a good way to start thinking about the problem.)
You should check out some MVC and CI tutorials to get a better angle on how other people split their projects up.
In any case, as a general rule you shouldn't be splitting up controllers based on who might hit them. As I mentioned before, this is up to your authentication system to manage - but if both admins and non-admins are allowed to run the same search function against a part of your database, it makes sense for that search function to exist in just one controller ... right?
Oh, and in the interests of fair and balanced reporting, some people like to have an admin 'back office' controller to do all the, well, adminy works. But these tend to be functions that
only an admin can do, and are functions for
managing the site.