Monday, October 04, 2010

MVC view engines, WebFormViewEngine, Spark, NHaml and Razor - zomg my head is going to explode. Could a developer please put these side-by-side and do a review to help me intelligently pick one?… Hey, the Coding4Fun team and Jason Haley have done just that!

Coding4Fun - Developer Review - Four ASP.NET MVC View Engines

“In this Developer Review, we evaluate four view engines available for use with ASP.NET MVC. First, we discuss the role a view engine plays in a website built with ASP.NET MVC, then we provide details about the four view engines in order to help you decide which one suits your needs.

Jason Haley, http://jasonhaley.com/blog/

Source Code: Download in Branches/Playground directory

What Does a View Engine Do?

When we refer to a view engine in ASP.NET MVC, we are talking about three pieces of functionality:

· A template locator/provider (implementation of IViewEngine)

· A template that can render itself (implementation of IView)

· A template engine that can parse and compile the view file syntax into executable code

Combining these three pieces, a view engine provides your controllers with the ability to translate views into Html.

Why Use an Alternate View Engine?

image…”

This is a monster length article (21 pages) that puts a few MVC View Engines side by side to help you compare them apples-to-apples. Written by Jason Haley, of “Interesting Finds” fame, who, like most of us, is outside of Microsoft and is just trying to get stuff done. Meaning this isn’t written by someone inside trying to “sell” you something but by a dev like you…

No comments: