Build Windows Day 2 From Afar: WTF is WinRT

Watching the developer reaction to Metro style and WinRT has been both depressing and comical. I suppose its like watching anyone else learn something from nothing. We can get it very wrong at first. It is part of our learning process.

I know I’ve not figured what the existence of WinRT means for .NET or what I can and cannot do between WinRT and.NET4.5. I’m also not sure what the difference is between Metro style and WinRT. It sure seems like there are some cool non-UI APIs in WinRT that I might want to use from .NET. I sure hope that I can.

At first glance it feels like Metro style apps aren’t .NET. At least not really. It feels like Metro style apps run in a different CLR. They feel like Silverlight on the desktop since they have no direct access to file system and the types available for use are limited.

I’ve read that it is not a different CLR. I’ve read that it is .NET but that the verifier and other tools in the chain of building a Metro style app enforce the restrictions. I’ll have to wait and see how the pieces fit together.

Missing the APIs can be a challenge: http://winmd.tumblr.com/post/10211942442/missing-net-apis

Looks like I can do the above when I say use some WinRT from .NET4.5. Cool, because those file pickers sure are pretty. http://ermau.com/using-winrt-from-net/

Doug Seven has an excellent post detailing what is being released and how it fits: http://dougseven.com/2011/09/14/i-know-what-youre-thinking-and-youre-wrong/

Take a look at this slide from the keynote:

win8-platform-and-tools

I’d like to speculate about a couple things related to this picture.

  1. This is not in the scale of overall importance to all developers. It is in the scale of what is new.
  2. All of the things in blue are still there and still supported.

Consider an alternative pitch for Metro style apps. Metro style apps, like all apps, are all launched from the new “Start Screen”. The start screen replaces the start menu. Metro style apps keep the look and feel of the start screen. It is as if you are never leaving the start screen. Metro style apps are apps that you program into the start screen. Imagine being able to program apps into the start menu. It sounds crazy. Now that your start menu is full screen and interactive, those metro tiles (they have a different name) are programmable by you. I can think of another little square in windows that is programmable: Sidebar Widgets. When was the last time you wrote a sidebar widget? (Mike Ward, you are the only one I know.)

Considered from the point of view, very few of us Line of Business app developers will be writing Metro style apps. They are not meant to replace all desktop apps. You will not see Office apps like Word, Excel or Powerpoint built as Metro style apps. They will likely get some theming that is Metro influenced, but they will still run on the traditional Windows desktop and not in the Start Screen. That said, there might be augmentations in the Metro style apps. After all, Windows on a tablet is far more usable with Office. So I think you will see stripped down, touch optimized, Metro versions of Word, Excel and Powerpoint. The use case for these will be “when you aren’t at your desktop or laptop".

Believe it or not, there was actually announcements around Azure and ASP.NET yesterday. You’d never know it given all the focus on WinRT. I’m super excited about the new async support for controller actions in MVC4. I also think Azure’s replication story around tables and blobs is pretty sweet now.

So much more to come. Its an exciting time be a developer. Just try to remember that ships often look like they are sinking when you see them far off the horizon Smile