Chapter 17. Advanced view techniques
- 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 ...