Chapter 12. Lightweight controllers

 

This chapter covers
  • Using lightweight controllers to simplify programming
  • Managing common view data without filter attributes
  • Deriving action results to apply common behavior
  • Using an application bus

 

In the previous chapter, we looked at using AutoMapper to carry some of the burden of the repetitive, manual labor associated with mapping view models. In this chapter, we’ll continue to investigate unburdening our controllers with simple refactoring and application architecture.

Do you remember those swollen and unwieldy Page_Load methods in Web Forms? Those methods can quickly grow out of control and stage a revolt against your codebase. Controller actions are dangerous too. Nestled snugly between the ...

Get ASP.NET MVC 4 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.