What is IIS Express? What is WebMatrix? And what is ASP.NET “Razor”?

Posted: (EET/GMT+2)

 

Just in the last couple of days, lots of things have happened in regards to Microsoft's web development tools. Again, Scott Guthrie has announced a really nice set of new technologies and tools, which are called IIS Express, WebMatrix, and ASP.NET "Razor".

Let's take each of these quickly in turn. Firstly, there's IIS Express. You might have noticed that when you install Visual Studio, along with the development environment you get a nifty little web server, too. This is called the ASP.NET Development Server, or just Cassini for the old codename.

But, this small server — while useful for small applications — is not the same as full-blown IIS web server. If you wanted to develop more advanced applications to benefit from IIS' features, you had to install IIS, and this wasn't always easy.

To meet this need, Microsoft has developed IIS Express, which is the core IIS functionality, but in an easy-to-install package. Currently, a beta is available, and can be found here. The aim with IIS Express is to allow more advanced development, but with the ease of using ASP.NET Development Server. Sounds like a plan to me.

The next announcement is WebMatrix. This application seems to be aimed at web developers, who don't actually need the full Visual Studio functionality, but still want to do some development work, mostly perhaps customizations to existing web applications or solutions. WebMatrix can then be seen as a product that sits between Expression Web and Visual Studio. WebMatrix allows some web development work (for instance, to connect to a database), but it is still not a full ASP.NET development like Visual Studio is.

Finally, there's ASP.NET "Razor", which is at least in my opinion the most interesting announcement of these three. Shortly put, "Razor" is the codename for a new ASP.NET view engine, i.e. a processor of server-side .aspx file code. The default ASP.NET view engine that we've all used for many years uses a syntax like the following:

<ul id="products">
  <% foreach(var p in products) { %>
    <li><%= p.Name %>: <%= p.Price %> €</li>
  <% } %>
</ul>

However, Razor brings a much simplified syntax, along with lots of other goodies:

<ul id="products">
  @foreach(var p in products) {
    <li>@p.Name: @p.Price €</li>
  }
</ul>

If you ever wanted to have cleaner syntax for example in your ASP.NET MVC applications, then Razor is the way to go. It is currently in beta, just like the other two technologies I mentioned previously, but it is coming.

For more details and sample usage along with screenshots, check out Scott's blog posts about IIS Express, WebMatrix and Razor. These look great!