Get Microsoft Silverlight

This blog — and all projects contained within — was made with free/demo software available through the Microsoft Web Platform. Go check it out today, it’s pretty cool.

Get the Microsoft Web Platform.

Everything in its place.

Before we get started, I should be clear: I am a Fanboy. Capital F, lowercase a. I’m the guy who buys the shiny new-new on day one, the book on how to use it on day two, and starts ranting to anyone within earshot about how incredible it is on day three. I’m perfectly at peace with this aspect of my personality.

I have two very simple passions. One, Apple. Obviously. I’ve been using some form of Macintosh since I was eight years-old, and while I’ve owned a PC now and again for gaming or development work, I’ve never considered it my primary machine. Never considered Windows to be my primary operating system. I doubt this will ever change.

Second. Better tools. The Apple thing falls into that somewhat, but more than anything else, I want things which make my job less about what I’m using than what I’m using it for.

I don’t much care which language I code in, so long as that language gets the task done in the most elegant way while requiring the least amount of thought from me. Today alone, I’ve written two quick PHP scripts, an AppleScript, modified some Python, dug into some ActionScript, and plugged away at some C#.

Don’t care much which text editor I use, so long as I can use it to code what I need to code without having to spend hours configuring it to do what I would consider absolutely rudimentary tasks. I generally use [TextMate][1], but only because it excels at being just complicated enough to get everything done, but no more so.

Design software matters even less. I use about eight in the course of my general routine, depending on exactly what I need to get done and how easily that tool does it.

This isn’t bragging (at least not for bragging’s sake). I just want you to understand that, while I am a zealot, I’m a zealot with no church. And have very little patience for anyone who isn’t.

We clear here? Goodie gumdrops.

### What We Came Here To Do

Aside from constructing long winded, probably non-sequitur introductions, my task in this little adventure is to figure out how much of Microsoft’s latest offerings are worth the bits they flip. After reading the [Silverlight 3][2] and [Expression 3][3] release notes, and watching numerous demos, I was dutifully impressed enough to start an honest exploration of whether they could fit into my workflow. And if they could, was there any other kit from Microsoft that might make my life easier when dealing with them.

I picked WordPress pretty early on in the process to be the platform we built the site off of. Not so much because it’s the absolute best at any specific thing, but more because it’s the best overall at so many things and because frankly writing blogging software is the developer equivalent of making ketchup from scratch. People have already figured this stuff out, and I doubt I’d do any better.

Generally, WordPress means I’m going to be deploying on a full LAMP stack. MySQL and PHP are a given, since they’re what WordPress is tested against and written in respectively, and I’d assumed Linux and Apache would come along for the ride. Such as it always was, it would continue to be.

But about three weeks ago, as we were figuring everything out, Rob, precocious lad that he is, pointed out Microsoft had created a whole new “web platform thing”, his words, and handed me off a link.

Normally, day one of a project, I jump over to [Slicehost][4], start a new instance, and begin the arduous process of configuring a blank Linux install. I’ve been using Ubuntu lately, since it’s all the rage and aptitude is by far the least crappy package management system built to date (low bar), but it’s still Linux, and it’s still a good full day experience of typing cryptic commands into a prompt, hitting return, and repeating about 800 times till everything is setup. It’s not something I look forward to, but it is something I’ve come to accept as part-and-parcel with PHP/MySQL development. Yes, I suppose we could just use a shared host and something like Plesk, but generally I find myself fighting with those setups more than I’d like to, especially the moment I’m trying to do something more interesting than echoing HTML.

Read above regarding “less about what I use than what I use it for”. I do not, nor have I ever, cared about running a Linux server for the sake of running a Linux server. Servers are the thing that I want to setup once, and forget they exist. Set it and forget it. Linux gets real close to the forgetting it part, but the setting it bit is a hellish bit of un-fun.

The [Microsoft Web Platform][12] is pretty damn close to what I want setting up a server to be like, or least appeared so on screen. Click the boxes next to the things you need, it figures out what that entails, and unicorn-magics everything from the database, to the web server configuration.

After chewing it over, I decided I’d give it a go.

Follow along kiddies, there’s a tutorial buried in here somewhere.

### Getting a Windows Host.

Slicehost was out of the picture for the host (they only do Linux) and while I would have loved to use [Rackspace][5], the budget didn’t really allow for it. I knew up front I didn’t want to waste time patching and updating the server, and also that I am not a Windows Server guy. If something broke, I needed someone smarter than me to sort it out.

I went with [Peer 1][6], partially off the recommendations of a few friends, and partially because their price was right and they answered the phone before I could change my mind.

Any Windows host will do though, so don’t feel like you have to choose Peer 1. But if you do, let them know we sent you cause I hear they give us free money for doing that.

Any host will do essentially the same thing. You call them, say you want a box, give them a major credit card, and they send you an email about 24 hours later with an IP address to your new box and a username and password. It’s what Peer 1 did. Thanks guys.

That in hand, I needed a way to admin the server. Windows is really best dealt with via a full GUI, so I needed a way to login the box through a screen sharing setup. Windows Server includes Terminal Services, which is exactly that, so all I needed was a Mac client. And Microsoft makes a pretty fantastic one for OS X called “[Remote Desktop Connection][7]“. Handled.

Downloaded, punched in my credentials, and logged into the first Windows server I’ve had to deal with in nearly eight years.

### DNS interlude

It was at this point that I hit [GoDaddy.com][8], purchased messwithsilverlight.com, and pointed the domain’s name server records over to Peer 1. For specific instructions on how to do this, [Google][9], [Bing][10], or call your nerdier friends.

### The Web Platform Thing

The WPI screen

The attraction to the Web Platform installer was straight forward. It had a box marked “WordPress” that I planned to click, at which point it would install everything I needed. And, at least in abstract, this is what happened.

The details are murkier. First, I had to actually [download the installer][12] onto the new server. I logged into the box via RDC, opened Internet Explorer and pointed it at the Microsoft Web Platform page. It downloaded a small EXE to the box that I had to run (just pick “run” when the download box pops-up at you), and I was off the races.

Now, since our box was already configured with Microsoft Server 2008 Web Edition, lots of the bits Web Platform would normally install were already there. Internet Information Services (IIS), Microsoft’s answer to Apache, was already there, as was SQL Server. I was actually sort of worried I’d messed up here. On Linux, I’m sure I would have just ended up with two copies of Apache, each installed in an equally senseless place, and have spent the next day unraveling the mess. But the Web Platform Installer (WPI) has some magic in its top hat, and detected I already had specific things installed, and didn’t bother with installing them.

WPI has a whole bunch of nifty things you can install, most of which I don’t advise attempting to install unless you know exactly why you’re installing them. Not so much because you’ll break anything (WPI makes sure you don’t, I think), but because installing things you don’t understand tends to lead to badness.

In my case, all I knew we needed was WordPress. That meant I needed PHP and MySQL, plus some type of URL rewriter so we could have the pretty pretty URLs everyone has become accustomed to on the web.

First fun but: WPI does not, for whatever reason, install MySQL. Nor will it let you continue with the WordPress configuration step until MySQL is installed. Luckily, MySQL makes a great installer for Windows.

So, download the [MySQL for Windows][11] installer. Run it.

Once MySQL was installed, I was ready for the pain of getting PHP and WordPress going. In Linux, I’ll generally download the PHP source, configure it to meet my specs and go from there. Mainly because most of the Linux packages don’t include a whole mess of PHP extensions I generally find myself needing. After PHP was installed, I’d spend the next hour or so getting Apache configured for virtual hosting, getting directories and permissions all nicely situated, and finally grab the latest WordPress tarball and cross my fingers that I didn’t mistype some command at some point and everything would work. It was rare that this was the case.

WPI is a different beast all together. After I selected “WordPress” from its list of available applications and clicked “Install”, WPI went about downloading and installing PHP all on its own. Nice.

Then it presented me with a prompt, asking whether I wanted to install WordPress onto an existing website, at a specific location, or wanted it to configure a whole new website. I created a new web site, named it messwithsilverlight.com, and plugged in my MySQL credentials.

And boom. Working WordPress install.

Convinced it couldn’t be this easy, I poked around in the IIS configuration utility thing, to see if there was anything additional I needed to set, or configure. There wasn’t.

I hit the URL and sure enough, a boilerplate WordPress website showed up. I hit /wp-admin and, again, everything was in working order.

Damn. That’s awesome.

### Onward and upward

There’s some other nice bits about deploying on a Windows server I might talk about later, and some annoying bits too, but overall, I’ve gotta say I’m impressed. Things generally worked as expected the first time through, and even a complete Windows moron like myself can manage to get a site up and going without having to spend too many hours digging around help files and forums.

Now to get busy with the stuff I actually like doing.

[1]: http://www.macromates.com/
[2]: http://www.silverlight.net
[3]: http://www.microsoft.com/expression/
[4]: http://www.slicehost.com
[5]: http://www.rackspace.com
[6]: http://www.peer1.com
[7]: http://www.microsoft.com/mac/products/remote-desktop/default.mspx
[8]: http://www.godaddy.com
[9]: http://www.google.com
[10]: http://www.bing.com
[11]: http://dev.mysql.com/downloads/mysql/5.1.html##win32
[12]: http://www.microsoft.com/web

  1. that is a pretty epic post, length-wise.

    Posted by Rob on August 5th, 2009

  2. Wait till you see my dissertation on installing Visual Studio.

    Posted by Jack on August 5th, 2009

  3. Any details on the URL rewriting in this version of IIS?

    Posted by Jeff on August 6th, 2009

  4. It basically “just works” if you go through WPI. IIS includes it’s own rewriting engine which is just as easy to configure as mod_rewrite. WordPress actually seems to detect for and write out the config file correctly out of the box.

    Posted by Jack on August 7th, 2009

  5. Thanks much for this nicely written piece of text.

    Posted by Alva Benton on September 14th, 2009

  6. Email for verification purposes.

    Comments will be deleted if they are inappropriate.