Jack Into The WebMatrix
The Web Dev Zone is brought to you in partnership with Mendix. Discover how IT departments looking for ways to keep up with demand for business apps has caused a new breed of developers to surface - the Rapid Application Developer.
WebMatix is free, no-registration download that's only 15MB (plus .NET 4) and it includes IIS Express, SQL Compact Edition, and ASP.NET extensions that enable standalone page development with multiple syntaxes including the new "Razor" syntax. The web development tool also includes HTML and database helpers for common web-tasks. It's a lot like classic ASP.NET, where the server side code was inline with the markup. WebMatrix was built around three core steps in web development: Website creation, customization, and publishing.
CreationIn this initial stage, you can code your site from scratch, use a WebMatrix built-in template, or start with an open source application like WordPress, Joomla, DotNetNuke, or Orchard. WebMatrix will handle the downloading, installing and configuring for any of these applications.
The web server, database, and framework are all provided by WebMatrix. By having the same stack for your development desktop and your web host, you eliminate a lot of pain points when taking your website live.
PublishingIf your site is already up, you can upload WebMatrix files using FTP(s) or WebDeploy. WebDeploy will only deploy the files that have been changed. It also configures your server and syncs your computer with the live site. WebMatrix even has a recommendation engine that lets you know which hosting providers will provide the right technology for your site.
Now that you know a little more about WebMatrix, here are the questions I asked Laurence:
DZone: What is the key value proposition for WebMatrix? Why did Microsoft build it?
Laurence Moroney: There are many—Ultimately the idea was to produce a free and lightweight tool and stack that allows developers to create, customize and publish web sites easily. The tool is a very lightweight coding tool, as you’ve probably seen, but it’s the tip of the iceberg. When speaking with developers we found that web applications need a stack, and stacks are hard to integrate, despite the best efforts of the communities. There’s a term ‘LAMP’ that seems to denote a fixed, easy-to-use, stack, but that’s far from the truth. With the Windows stack, developers similarly found integrating web server, database and programming framework had more complexity than it should have. So, we released WebMatrix with IIS Express, SQL Server Compact and ASP.NET Web Pages (with ‘Razor’) working out-of-the-box, and made a smart installer that makes using other technology in the ‘stack’ easy too – such as PHP and MySQL.
Another reason we built it was to give ‘newer’ developers an easy and lightweight tool too. Feedback we had was that tools like Eclipse, Visual Studio, NetBeans et al are awesome, but they have a very steep learning curve.
DZone: What sort of developer is WebMatrix aimed at? What sort of development shop?
Laurence: It’s aimed at pragmatic developers who just want to get a job done quickly, easily, and cheaply. The ‘Razor’ inline syntax and PHP are similar in this regard – they may not always offer the most architecturally pure way of building a web app (like MVC, J2EE or other large-scale frameworks offer), but the pragmatic developer doesn’t need this in the beginning. We consciously designed it so that if they use ‘Razor’ to get up and running, and find that they’re very successful and need to go to the cloud, or need to go huge scale, then their skills aren’t throwaway, and thus we’ve been building ‘Razor’ into ASP.NET MVC 3 and beyond etc.
Ditto for the database. Setting up a DB (SQL Server or MySQL) is ‘hard’. Separate servers, authentication, communications channels, connection strings etc. etc. are all fraught with potential for bugs. So we shipped SQL Server Compact – a file based database that makes deploying your data as easy as uploading a file. And again, should you want to go huge and need an Enterprise class db, you aren’t painted into a corner…SQL Server Compact migrates easily to SQL Server.
For development shops, all of the above applies, but also the integration of OSS applications such as WordPress, Joomla, Drupal etc. We wanted to take the task of deploying and configuring these and make it easier. Take a look at a video I put on Facebook to show the workflow of working with WordPress – I think we’ve made it even easier than before.
I also want to call out Templates and Helpers, which are particualarly useful for all developers. Templates are sites-in-a-box that can be easily configured, and Helpers provide common, complex, functionality in a single line-of-code implementation (e.g. adding a video, adding a twitter roll, adding social links are all helpers). Both are highly extensible, and new Templates and Helpers will be available all the time through a NuGet feed mechanism that is built into the WebMatrix tool. Developers can build helpers easily, and share them with the community via this feed.
Finally, of course, there’s the development-deployment impedance that comes from devving on one box and deploying to another. Often folks dev on windows and deploy to Linux, but then hit bugs about what worked in dev, fails in production. As such, we have the new IIS Express which is 100% compatible with IIS, so if you dev on Windows, and deploy to Windows/IIS, bugs like this go away.
DZone: I know Microsoft has been doing a lot of work with PHP technologies and PHP OSS partners like Joomla and Drupal. What is Microsoft's overall mission in working with these groups and how are they achieving their goals? Does this tie into WebMatrix?
Laurence: The mission is to recognize the fantastic work these communities have done in making web development easier. We want to promote their work, and we want to demonstrate that they work really well on Windows, and that devs using Windows boxes and WebMatrix will have an easier time than if they have disparate operating systems, servers, tools etc. Again, check out the WordPress demo video I did (linked above) and you’ll get a feel for why we’re doing this.
DZone: We all know the cool kids use Ruby and Python is becoming ever more popular. What stake will PHP applications and PHP developers have in the world 5 to 10 years from now? Are people moving away from PHP or is it still going strong?
Laurence: Not sure if all the cool kids are using Ruby. Lots are using ASP.NET, PHP, Java, Objective-C etc. There has always been diversity in development, and there always will be. I think the best PHP apps (WordPress is my favorite) will get better and better, and breed a whole new generation of developers who are language-agnostic, and who add-on to apps. They might be using PHP, but they won’t consider themselves PHP developers etc. Ditto for the other languages. People call themselves iOS developers now, and not Objective-C ones. Etc.
DZone: What does the roadmap currently look like for WebMatrix?
Laurence: We’re releasing v1 early this year, and we’re currently in the planning and prototyping stages for vNext
You can find a lot more info on WebMatrix on Scott Guthrie's blog and by scrolling to the bottom of this page for a bunch of frequently asked questions about WebMatrix.
Once again, here's that link for the CodeMash streaming event. Even if you missed it, there's still a ton of resources there about WebMatrix.