Home » Agile, Architecture

Don’t Get All MVCed Up with No Place to Go

13 December 2011 No Comment

MVC (Model-View-Controller) is the latest fad in Microsoft .NET development. As Agile and Scrum sweep the industry, a need has grown for continuous integration and deployment, requiring automated unit testing. Conventional ASP.NET architecture makes unit testing of page functionality difficult because form controls are tightly coupled to back end code-behind logic. That is, to simply unit test the selection of a dropdown list along with a Submit button isn’t straightforward. Enter MVC. By clearly delineating front end form functionality, the View, from back end business logic, the Controllers, it’s easy to write unit testing scripts which run a page and it’s elements through it’s paces. Model, that is objects and data contructs, has been separate for some time in ASP.NET and isn’t a key improvement or change.

Is your shop heading in the direction of continuous integration and automated unit testing on an enterprise scale with code you plan to keep for 3-5+ years? Then invest the time to head over to MVC 3, understanding that it may add 10-30% of effort to ongoing development.   Still hand-testing those modules and releasing from developer machines with code that’s already obsolete? Save yourself some time and use regular ole ASP.NET.

Don’t get all MVCed up with no place to go.

Comments are closed.