WebMatrix: Microsoft's New Stack to Create Simple Websites
WebMatrix is a new free web development package from Microsoft containing a few basic tools useful to create simple websites. WebMatrix contains the following components:
- IIS Developer Express – a development web server
- ASP.NET Web Pages – a web framework
- SQL Server Compact Edition – an embedded database
- Simple IDE for website creation. This tool seams together the other components.
WebMatrix is used to create and test websites locally, but it can also be used to publish the site to a hosting provider via FTP, SSL or MSDeploy. It also supports incremental file updates.
WebMatrix keeps all site-related information, including database data, in files, so it can be easily modified by hand or migrated. WebMatrix projects can be opened with Visual Studio, and its data can be easily converted to SQL Server in case SQL Server CE is reaching its limits.
ASP.NET Web Pages can be used with Razor, a new ASP.NET view engine recently announced by Microsoft, which includes a number of useful helpers. Following is a selection of these helpers, not the entire list which can be found in ASP.NET Web Pages Using The Razor Syntax (PDF):
- Chart(width, height, templatePath) - Initializes and renders a chart.
- Facebook.LikeButton(url) - Lets Facebook users make a connection to pages.
- FileUpload.GetHtml(initialNumberOfFiles, allowMoreFilesToBeAdded, includeFormTag, addText, uploadText) - Renders UI for uploading files.
- ObjectInfo.Print(value) - Renders the properties and values of an object and any subobjects.
- Recaptcha.GetHtml() - Renders the reCAPTCHA verification test.
- Twitter.Profile(twitterUser) - Renders a Twitter stream for the specified user.
- Validation.Success - Returns true if there are no validation errors.
- Video.Flash(filename [, width, height]) - Renders a Flash video player for the specified file with optional width and height.
- WebGrid(data) - Creates a new WebGrid object using data from a query.
Commenting on WebMatrix, Simone Chiaretta, a .NET developer and a Microsoft MVP, expressed mixed feelings about it:
Whereas I’m pretty excited by Razor, I’ve to say that I’ve mixed feelings about the WebMatrix IDE and ASP.NET WebPages: they lower the bars for new developers that want to start building their personal web sites on the MS stack, but doing so they also promote “bad” programming practices. Probably people that want to build their quick site to publish all their runs don’t care about unit testing, SOC and so on, but still seeing a SQL statement in the the “view” feels bad. But again, I’m not the target of this platform.
What I think will be important is the migration story from this PHP-like way of developing apps to a more professional one if the developers decides he/she wants to go that route.
WebMatrix is for simple websites that are done quickly, including simple testing/diagnostics tools, analytics, SEO, and the possibility to create the site from already predefined templates.
InfoQ Sep 01, 2015