are there times you might want to use multiple controllers in mvc?
eg.
/controllers/foo.php
/controllers/bar.php
or
/controllers/foo/baz1.php
/controllers/foo/baz2.php
/controllers/bar/baz1.php
/controllers/bar/baz2.php
could someone give some examples WHEN i might want to do that and some example controller names.
one occasion i thought about might be when you got a main site (for users) and a admin site (for customers).
all feedbacks and suggestions are appreciated
Usually controllers deal with models, which represent corresponding database tables. So if you have tables users and posts, your app will have models User and Post, and therefore controllers Users and Posts. That is typical RoR way, which used in many PHP MVC frameworks. URLs in such application looks as follow:
And actions corresponds to controller class methods. Actually I think it became de-facto standart in MVC architecture, becuase it looks natural and logical.