MVC, when to separate controllers?

Posted by Rodolfo on Programmers See other posts from Programmers or by Rodolfo
Published on 2012-09-06T19:08:49Z Indexed on 2012/09/06 21:51 UTC
Read the original article Hit count: 280

Filed under:
|

I'm starting with MVC and have a newbie question. What would be the logic criteria to define what a controller should encompass? For example, say a website has a 'help' section. In there, there are several options like: 'about us', 'return instructions', 'contact us', 'employment opportunities'. Each would then be accessed like 'mysite.com/help/aboutus', 'mysite.com/help/returns', 'mysite.com/help/contactus', etc.

My question is, should I have a 'help' controller that has 'about us', 'returns', 'contact us', 'employment' as actions with their respective view, or should each of those be a different controller-action-view set? What should be the line of reasoning to determine when to separate controllers?

© Programmers or respective owner

Related posts about mvc

Related posts about asp.net-mvc