A Blog

My Beef with Razor

July 28, 2010

(Note, for non-programmers, this is not about shaving)

ASP.NET MVC has shipped the first preview of version 3. This is a good thing, mostly. By default it will be using the brand spanking new Razor view engine… and I’m having a hard time trying to figure out why it’s even in there.

The raison d’être for Razor is to allow for less code in the Views. This too, is a good thing. But I just don’t think it does enough. Here’s one of the samples provided:

@inherits System.Web.Mvc.WebViewPage

<!DOCTYPE HTML>

<html>
<head>
<title>@View.Title</title>
</head>
<body>
@RenderBody()
</body>
</html>

Scott Williams

Written by Scott Williams who lives and works in sunny Phoenix, AZ. Twitter is also a place.