Chapter 12. Best practices

This chapter covers

  • Designing maintainable controllers, filters, and actions

  • Building maintainable views with minimum duplication

  • Designing and testing routes

  • Testing MVC components

Although the ASP.NET MVC Framework is young in the .NET space, the MVC pattern applied to web applications is not. We have presented thus far techniques already used in many other MVC Frameworks, but some areas in the ASP.NET MVC Framework require extra attention. The ASP.NET MVC Framework is open-ended and extensible for customization, but not all usage and customization is appropriate. Not every approach to solving a problem will lead to elegant, maintainable results. Many of the examples on the web work well for simple problems, but break down ...

Get ASP.NET MVC in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.