O'Reilly logo

ASP.NET MVC 4 in Action: Revised edition of ASP.NET MVC 2 in Action by Foreword by Phil Haack, Jeffrey Palermo, Jimmy Bogard, Eric Hexter, Matthew Hinze, and Jeremy Skinner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 17. Advanced view techniques

 

This chapter covers
  • Using layouts to craft site-wide templates
  • Applying partials for shared snippets of content
  • Leveraging child actions for common widgets
  • Eliminating subtle URL-generation
  • Examining alternative view engines with the Spark view engine

 

The MVC pattern gives us separation of concerns between the model, controller, and view, but this pattern didn’t eliminate the need for developers to carefully design their views. You saw in the last chapter how you can use controller extension points to build clean, easy-to-modify controllers. With the elimination of code-behind and the addition of a view model object, you can focus strictly on rendering content inside your view. But without careful ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required