As I keep doing this on MVC projects, thought I may as well blog it, so the next time I need it I can find it myself :)
To keep ASP.NET MVC controllers clean and organised, I find it much easier to split them so they handle only a single action each. This helps significantly with maintaining some semblance of the Single Responsibility Principle, allowing each controller to deal with a single action, and not have concerns like Logon, Logoff and ChangePassword all start globbing together under a single controller called "Account".
A collection of articles and resources of interest to the modern software developer
Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do.
-- Steve Jobs
Thursday, July 28, 2011
Single Action per Controller in ASP.NET MVC - Jak Charlton - Insane World - Devlicio.us - Just the Tasty Bits
Single Action per Controller in ASP.NET MVC - Jak Charlton - Insane World - Devlicio.us - Just the Tasty Bits
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment