WinRT is your friend

September 18, 2011

Microsoft’s BUILD conference of 2011 is over, but the shockwave it unleashed has barely even begun to materialize yet. The developer world is still scrambling to make sense out of what just happened. What they debuted at BUILD marks the end of one era, and the beginning of a new one. Good old Win32, that layer of abstraction between the Windows kernel and your desktop applications, which first shipped with Windows NT in 1993, is no longer the only way to build Windows apps. Windows 8 will ship with another layer of abstraction between the Windows kernel and your apps (technically, your “Metro” style apps) called the Windows Run Time, also known as WinRT. Windows 8 will support both Win32 and WinRT apps.

“So what?” you might be thinking. When stated as a technical detail, the inclusion of WinRT as part of Windows 8 might seem like a mundane matter not worth much attention. However, this seemingly minor detail represents a significant change in the Windows operating system, and in Microsoft’s business direction and vision of itself. WinRT was designed to support a whole new style of software application and human interaction model. It was built so that the operating system can run on x86 and x64 processors, like in your desktop or laptop, but also it supports running on the ARM processors used in mobile devices.

The user interface seen in the Developer Preview of Windows 8, released at BUILD, is a combination of Windows 7 and something totally new for Windows, often referred to as the “Metro” style.

The standard/classic Windows desktop that we all are accustomed to is still available, powered by good old Win32, but it is not what shows up on your monitor when you first boot Windows. When you first boot up, the WinRT-powered Metro screen fills your monitor(s). For me, at this early stage in trying out an early build of Windows 8, it feels like Windows has developed a multiple personality disorder. It can’t decide if it is an office worker or a high school kid. Then again, having this dual modality is not necessarily a bad thing, considering how most people use computers for work and entertainment in their lives, which are very different ways to use a computing device. I guess if Microsoft wants to remain relevant in a world increasingly dominated by iPads, this makes sense.

There are tons of fascinating technical details about WinRT that I’d love to dive into, such as how it was written in C++ but is “projected” into three separate stacks (XAML + C#/VB.NET, HTML5+JavaScript, XAML + C++), how it supports a subset of the .NET 4.5 framework, the fact that any method expected to take at least 50 milliseconds to complete was implemented async, and so much more. But there’s plenty of time to get into that, and other bloggers have already touched on a lot of the good bits. What I’m really happy to see in WinRT is the fact that it seems to be very, very heavily influenced by WPF and Silverlight. In fact, at BUILD one of the demos was converting a Silverlight project to WinRT just by changing a few namespaces and adding the occasional #if. Most of the skills that WPF and Silverlight devs have acquired over the years will be relevant and useful in the years ahead, hence the title of this blog post.

Many people have asked me why I decided to get into iOS development. The answer is, mostly, because as a Windows developer I felt that the world was passing me by. Things felt stagnant in the Microsoft world, while exciting advancements were happening all around in other technologies, especially the stuff coming out of Apple. Couple that with an unquenchable hunger to learn, and it only made sense to move on to greener pastures. But it looks like Microsoft might actually have something here, with WinRT. Only time will tell, but it’s exciting to see them try something bold and new (for them).

Thus far my experience with WinRT programming, which is obviously sparse considering the first preview build was just released, feels a hell of a lot like WPF or Silverlight programming. Windows itself basically has the next generation of WPF/SL built in, so to speak, and that is unspeakably exciting for me!

Some folks at Microsoft published this list of hardware that they use to run Windows 8 on touch-enabled systems. I read that list, did some research, then went out and invested in the ASUS EP121 slate. Now my WinRT dev rig looks like this:

That’s right, a tiny little slate computer is powerful enough to run the latest version of Windows, Visual Studio 11, supports multi-touch input, a keyboard, a mouse, and a 27″ external monitor…all at lightning speed. I am just amazed.

To install the operating system I needed to download the Developer Preview (which comes with Visual Studio Express pre-installed) and then followed the steps on Scott Hanselman’s blog post that shows how to put the ISO file onto a 16 GB USB thumb drive so that I could boot from that on my slate. I didn’t bother installing it to a VHD, as Hanselman explains, because I have a dedicated machine just for Windows 8, but it seems like many people are having success with virtualizing Win8 on their machines.

Regardless of whether Windows 8 might be a success or not, I think it is something that should be investigated. It’s too significant to ignore.