WebMatrix and Razor, a Refrain of Classic ASP, PHP

Over the summer, Microsoft released a beta version of it’s WebMatrix product and the Razor templating engine. As developers try it out and test it, they are finding the combination a nostalgic throwback to the arguably better, but simpler, method of in-lining .NET code into the HTML page. This is familiar to most as it is reminiscent of Classic ASP and just as importantly PHP.

WebMatrix makes it possible to use Razor as a templating engine and the new ASP.NET Web Pages framework. The new template-style of creating dynamic webpages, using the framework and Razor syntax, is very similar to the style of developing Classic ASP applications, yet you have access to all of the powerful features of a true ASP.NET application. While not only enticing those developers that feel awkward using code-behind pages, and MVC frameworks, it also should entice current PHP programmers with its similar style of development. WebMatrix, along with Razor, makes it possible to develop in a PHP-type workflow a .Net application, and it also can host PHP applications. A PHP programmer can ultimately migrate all the PHP applications (e.g. WordPress, Joomla, Drupal) onto IIS and WebMatrix and then the utilize the features of ASP.NET for new development.

Using WebMatrix with the Razor templating engine allows the rapid implementation of web sites using the familiar method of in-lining the code that Classic ASP enthusiasts will appreciate and PHP programmers will contemplate, while at the same time exposing the features of the .NET framework and IIS. The combination might not be popular with professionals, but the simplicity of the workflow should attract rapid development proponents and even the lowly amateur. There are times when Web Forms with server controls and code-behind pages seem un-necessarily heavy for some tasks and MVC seems more burdensome than it is maintainable and beneficial. There are times when some quick code and some HTML seem leaner and comes more naturally to people. Once it is ready for production, WebMatrix and Razor are for those times and many more applications.

By Taylor Gillespie

Taylor is a Staff Writer for DevWebPro

Leave a comment