Enter the (Web)Matrix

Last January 13, Microsoft launched its newest web development marvel, the Microsoft WebMatrix. This tool allows for just about anyone to create and deploy a website with very minimal effort, which is to say that you don’t have to be an IT professional (though it does help) to make a website. Together with the WebMatrix is a new syntax for creating webpages known as Razor, which combines the functionality of your code-behind (for ASP.NET web applications) with your HTML markup. Of course, the World Wide Web is a diverse plane and if ASP.NET isn’t your language of choice, WebMatrix also supports PHP which is great interop for open source web developers.

So what does the WebMatrix have to offer for website developers? Loads. It makes use of IIS 7.5 Express as your web server when testing out your websites as well as giving you SQL Server CE for your database software, so you have a complete package for creating your websites. It also allows you access to tons of the web’s best open-source web apps written in both ASP.NET (DotNetNuke, Blogengine.NET, etc.) and PHP (Joomla!, WordPress, etc.) to name a few and integrates these blogs/CMS apps seamlessly with
WebMatrix.

Moving on, the new Razor syntax simplifies web development by allowing you to combine your code together with your markup. This leverages the power of both C# and VB so developers from either disciplines will be able to harness Razor’s power. To create a website using this new syntax, on the WebMatrix startup page, select Site From Template, then Blank Site from the template list. This gives you a blank slate to work with. On the Files tab, create a new CSHTML (or VBHTML) file, this new file extension is what Razor
uses.

So with the new Razor syntax, you have the same functionality as your ASP.NET web apps that require a code-behind file in just one file that combines both. Here’s an example of the new syntax:

The @ symbol replaces the <% %> symbols used in ASP.NET for writing out code, thus requiring you to use less keystrokes when typing out your codes. Also, it’s intelligent enough to be meshed with HTML tags as well as be distinguishable from emails (which use the ‘@’ symbol to denote domain) as well as a whole slew of other things.

All in all, the WebMatrix is a pretty powerful tool for creating websites that makes use the best of both Microsoft (ASP.NET) and Open-Source (PHP) technologies and simplifies the development process with Razor. Oh, and it also integrates with Visual Studio, so for those hardcore web apps that require you to crunch code, you can use a tool that was made to
handle that kind of stress. It’s got a whole lot more than just this, so I suggest downloading WebMatrix and discovering just what it can do for you.

Read the full article on WebMatrix by visiting Martin’s blog at http://twilightfallen.wordpress.com/2011/01/14/enter-the-webmatrix/
Try out WebMatrix by downloading it here: http://www.microsoft.com/web/

–Martin Laureta, Microsoft Student Partner, University of Sto. Tomas

About the contributor:

Martin is a BS Information Technology student from the University of Santo Tomas. He is a Student Leader, Aspiring Developer, Budding Writer, and then some all rolled into one with a cherry on top.