Chapter 7. Scaling the architecture for complex sites

This chapter covers

  • Taming large controller actions

  • Leveraging view helpers

  • Using partials

  • Creating components

  • Applying action filters

  • Organizing controllers into areas

Most applications we write grow beyond their originally intended use. Often we see quick-and-dirty, low-quality demos graduate directly to production. These applications have to be maintained, and likely by you (or me). Complexity is inevitable, but we can follow good design principles to keep the applications maintainable.

How can we ensure that we are creating maintainable solutions in the face of complexity? One key principle to follow is the single responsibility principle (SRP). This principle states that a piece of code should ...

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.