ScottGu announced Microsoft WebMatrix Beta today.
I've said before that Microsoft is just now starting to get the "right-sized LEGO pieces." It the past some stuff was too little or too big, but now as an example, here's five separate and right-sized LEGOs (ya, I know it's singular) that are helpful for the professional and the folks just getting starter, or those who don't want to learn a bunch of stuff to setup and/or modify a website.
Visual Studio 2010 looks like a dashboard. It's big and powerful and overwhelming. I tried to get my wife, then later my 10 year old nephew to make a website and it was a non-starter. It worked later with WebMatrix. This isn't for professionals, even though it has components that professionals will use. Pros will like a free file-based SQL Server, and a non-service version of IIS that's more compatible than the Visual Web Developer, and pros might like using Razor as an alternative View Engine for their ASP.NET MVC sites.
However, folks that are starting out, or hobbyists, or maybe just installing a blog or forum will use WebMatrix to get stuff done.
Here's how you'd get WebMatrix, sign up for a new host, and deploy your first site.
Go to the WebMatrix site and click Download Now. It'll install the Web Platform Install (about 2 megs) and then you click Install. The WebMatrix download for me was 8megs, then SQL Compact was 2.5megs, and then some deployment dependencies brought my total download to 29 megs.
You can install a site from the Gallery, like ScottGu did when he chose BlogEngine.NET. These are regular ASP.NET and PHP apps that you've probably used before. There's lots of Open Source apps like Blogs (like DasBlog, that runs this site!), Content Management Systems (like Umbraco, that powers http://asp.net!) and other apps that you can start working with immediately.
However, since we're learning, my wife and I are going to select Site from Template and pick the Bakery App. This is a basic store-type application that we can deploy in just a few minutes. We don't need to look at code if we don't want to.
Hit OK and I'm in WebMatrix looking a new screen.
At this point I can click Run to see my app.
It's running locally on IIS Express along with some others Apps I was looking at earlier. This is effectively FULL IIS (not Visual Web Developer) but installed as a User App...when I stop the app, it's gone. It's not an auto-startup service, but it is IIS, which means your apps will run the same locally as they do deployed.
I can run it locally, but how do I get it up to a host?
Things usually get complicated when you go to deploy and app. It's pretty easy to get an application running locally, but it's sometimes a challenge to get that app up on a site. People can sign up for a Gmail or Hotmail account and get that running, so why can't they get a website up that they coded themselves?
I've blogged about WebDeployment before and shown examples in my Mix Video "If you're using XCopy you're doing it wrong." WebDeploy is part of WebMatrix also.
I'll click on Publish and "Find Web Hosting" and I get a list of hosts I can choose from. I'll select Applied Innovations and click Learn More. I do prefer hosts like AdHost that give you both a .NET 2 and .NET 4 Application Pools to work in, which means I can use apps from the Gallery and apps that use the new Razor Syntax at the same time.
I go to Applied Innovations, and fill out the form. I'll get free hosting until next year with 1 GB of Disk Space and 100 GB monthly transfer. I get .NET 3.5 and 4, but also PHP. I can use SQL Compact, but also mySQL.
I fill out a form - no credit card needed - and they send me an email. Click a link and they send me back an email with all the details I need. This is the same experience you'll get with all the hosters.
My Opinion: Some hosts make you switch your AppPools between .NET 2 and .NET 4 and that's too hard for beginners, I think. Hopefully all the hosters will remove this step and offer two app pools, or make switching between them a top level button in their Control Panels. AdHost does this. I hope others will also.
To switch to .NET 4, go to the Control Panel URL in your welcome email. Click WebSites, Extensions and select ASP.NET 4 from the dropdown.
Other hosts to choose from during this Beta are:
I fill out the Publish Form in WebMatrix with the details direct from my new host.
Notice I don't need to do anything special for my database, as it's a file-based SQL database, runs in Medium Trust and requires no configuration.
Click Publish, and I'll get a list of files that'll be copied up. This is a differential copy, so if you change one file later, only that file will go up. Be sure to click the checkbox to deploy your database.
The publish happens in the background...
Then it completes, and I can now visit my new Bakery site online at my host, AppliedI:
Of course, if I wanted to, I could change the site, maybe modify the Products page:
@{ LayoutPage = "~/_Layout.cshtml"; PageData["Title"] = "Product"; var db = Database.Open("bakery");}<h2>Available Products:</h2><div class="products group"> @foreach (var p in db.Query("SELECT * FROM PRODUCTS")) { <div class="product"> <h3>@p.Name</h3> <img src="@Href("~/Images/"+ p.ImageName)" alt="@p.Name"/> <p>@p.Description</p> <ul class="group"> <li class="price">$@string.Format("{0:f}", p.Price)</li> <li class="order"> <form action="Order" method="post"> <input type="hidden" name="ProductId" value="@p.Id"/> <input type="submit" value="Order Now"/> </form> </li> <ul> </div> } </div>
There's lots of nice helpers for Google Analytics and Twitter integration:
<div class="sidebar"> @Twitter.Search("#bakery", caption: "#bakery")</div>
All in a reasonably not scary-dashboard looking UI. It's all ASP.NET underneath, so I can graduate to ASP.NET MVC and move my logic into controllers, and I've already got Views written in the "Razor" syntax, which is the new default for ASP.NET MVC 3.
If you're reading this blog, and you're not my Wife, this tool probably isn't for you. (Hi, wife.)
However, the pieces that make up WebMatrix probably are. SQL Compact is pretty sweet. It's small, free, file-based and easy to upgrade to SQL Express Big Boys and Girls Edition. The new Razor syntax is a nice alternative to the WebForms Syntax (as are other alternative ViewEngines). IIS Express is hotness, especially if you've ever had an app that acted differently on IIS than on Visual Web Developer.
If you are learning web development or just want to get a site up, check out WebMatrix. Even if you don't edit the code, you can get and deploy and app to a host quickly, be it an ASP.NET app or a PHP app. If you do choose to write an app yourself, you can get started with WebMatrix and then move to Visual Studio (Free Express or $ Pro) if you outgrow it.
I'll report back and see what the WAF (Wife Acceptance Factor) is on WebMatrix.
Related Links
the Normals in your life
Scott Hanselman's Productivity Tips Video
Scott at DevReach in Bulgaria in October
Developer Stand up Comedy - Coding 4 Fun
TechDays/DevDays Netherlands and Belgium:
Posts by Category Posts by Month
Greatest Hits Dev Tools List