Summary

View engines have a very specific, constrained purpose. They exist to take data passed to them from the controller and generate formatted output, usually HTML. Other than those simple responsibilities, or concerns, as the developer you are empowered to achieve the goals of your view in any way that makes you happy. The Razor view engine's terse and simple syntax makes writing rich and secure pages easy, regardless of whether the pages are simple or complex.

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