Developing For Metro – WinRT: The Metro API

So far we’ve talked about Metro from the end-user perspective where indeed it is a style and a UI. But Metro isn’t a way to display existing Windows application, it’s what results from a new development model for writing applications. Metro, as the user sees it, is the result of the APIs and design guidelines developers follow in creating Metro applications.

With Windows 8 Microsoft will be introducing a new API: Windows RunTime (WinRT). Over the years much has been said about replacing Microsoft’s long-lived Win32 API, with some success. The .Net Framework supersedes Win32 to some extent, but at the end of the day Win32 is still significantly used in one way or another by many developers. WinRT is the API that will replace Win32 for application developers, and is the API developers will need to use to develop for Metro.

WinRT in a nutshell is a combination of the elements needed to make Metro work, along with subsets of features from Win32, COM, .Net, and HTML5/CSS3. As with pure .Net applications, WinRT applications are meant to be architecture agnostic, and ideally Microsoft would like developers writing applications in runtime or interpreted languages such as C#, VB, HTML5/CSS/JavaScript, and even Silverlight. C and C++ will be able to access Metro too, although there’s still some ambiguity about under which conditions those will be architecture agnostic. In any case WinRT – and thereby Metro – will be accessible from virtually every language Microsoft supports today in their Visual Studio IDE. And regardless of the underlying language, all Metro applications will behave like first-class applications.

With all of this talk about WinRT, Microsoft went through great lengths to reiterate that developers will continue to have access to older APIs for new applications and that Windows 8 will run everything that Windows 7 can run. This is both because traditional/desktop styled applications will not be going away any time soon, and because WinRT as it stands is for user-facing applications, not device drivers, services, or other backend code. In fact desktop applications will be supported indefinitely (look at how long support for 16bit Windows applications has continued to last), but Microsoft clearly wants developers developing for Metro whenever possible, and not for the desktop. For a great many applications this makes sense, but I’m not sure anyone really understands what this means for specialty applications like 3dsMax, Adobe Photoshop, and other workhorses that not only have large legacy codebases, but whose usage model doesn’t easily flow with Metro.

 To entice application developers to use WinRT and Metro, Microsoft will be using a carrot and a stick. The carrot will be the Windows Store, the stick is that non-Metro APIs will not be available for ARM. ARM is Metro-only from day one, and the Windows Store will be the enforcer (more on that later). So if developers wish to target both ARM and x86/x64 users, they will need to develop Metro applications.

Developers working with Metro will be using Microsoft Visual Studio 2011, which like Windows 8 is in development and will be the first version of Visual Studio to support Metro. We won’t spend too much time on Visual Studio, but it will provide development facilities for all of the languages Metro supports, including HTML/CSS/JavaScript. For UI programming Microsoft’s Expression Blend 5 will play a big part, as XAML will be the UI markup language for most of the languages excluding HTML5/CSS.

The hard sell for Microsoft will begin tomorrow when the developers arrive. It’s clear that Microsoft has attempted to structure WinRT to be familiar to existing Windows programmers, but developers are just as sheepish (if not more) than end-users when it comes to change. It will also be the beginning of the process where the development community figures out where desktop applications fit in amongst the new Metro order. Even if Microsoft can sell developers on Metro from day one, there’s still a massive army of legacy machines – everything currently running Windows – that need to be factored in.

Mobile Experience, IE10, Live Cloud, Samsung Developer Preview PC The Windows Store
Comments Locked

235 Comments

View All Comments

  • broccauley - Wednesday, September 14, 2011 - link

    actually, if you connect a mouse to Android a cursor will appear.
  • faizoff - Tuesday, September 13, 2011 - link

    Wonder when the Beta release will be to the public.
  • KPOM - Tuesday, September 13, 2011 - link

    From what I've seen so far, Windows 8 looks very promising. For those who are skeptical of the Metro UI in the enterprise, consider that Apple is making inroads into the Enterprise market with the iPad. Companies are issuing them to executives and traveling professionals to keep up with e-mail and log into their intranets. A Windows 8 tablet or Ultrabook might allow them to have a single device for everything.
  • sviola - Tuesday, September 13, 2011 - link

    Agreed. And it will probably have much less resistance from the IT department as well.
  • sticks435 - Tuesday, September 13, 2011 - link

    That may work for non-tech people, but it won't fly at any IT related company. I hardly doubt they are going to make SQL Developer, Apache directory studio, Eclipse or any dev related apps for Metro.
  • KPOM - Tuesday, September 13, 2011 - link

    From what I've seen so far, Windows 8 looks very promising. For those who are skeptical of the Metro UI in the enterprise, consider that Apple is making inroads into the Enterprise market with the iPad. Companies are issuing them to executives and traveling professionals to keep up with e-mail and log into their intranets. A Windows 8 tablet or Ultrabook might allow them to have a single device for everything.
  • trip1ex - Tuesday, September 13, 2011 - link

    That dream will not happen. Tablets that can actually run Win8 will be too hot, and heavy with crappy battery life to make a good tablet so then why bother?

  • UMADBRO - Tuesday, September 13, 2011 - link

    Because obviously, you have leaped into the future, got a finished version of Windows 8, finalized and production quality hardware, and have completely ran it through its paces. Thank you, sir, for the future insight. No more questions remain. PRAISE Trip1ex!
  • ph0tek - Wednesday, September 14, 2011 - link

    You're a moron.
  • Decaff - Tuesday, September 13, 2011 - link

    First of all, thanks for a great article which covered alot of the things we can expect in Windows 8 (or whatever the final name will be).

    Now, I'm left to wonder about a few things. One issue that springs to mind is that MSE now appears to be integrated into the OS to some extent. How will this upset the AV vendors, and how does it affect corporate users who can currently only use MSE if they have up to 10 machines?

    Now, that was mostly a technicality. It is mentioned in the article that you can pinch to zoom on the start-screen, and the tiles would change size and adapt. Wouldn't this make it somewhat more effecient to use a mouse and a keyboard? Also, wouldn't it be a simple fix to allow the mouse-wheel to scroll left and right in the tiles display? Down goes left and up goes right?

    Personally, I am also very interested in seeing how the metro UI will handle file organisation. I can definately see the alure of using the metro ui to browse my files, but how will it handle renaming and moving of files when I try to organise files belonging to different programs (i'm a university student, so I keep .pdf .docx, pictures and other types huddled together for projects). Typically, touch interfaces have done away with the traditional folder structure and instead used the relevant program to access the file structure (i.e. want to check your PDF, open adobe reader).

    I'm also left to wonder whether the Repair function isn't simply a rebadging of the old system restore function, which has existed since XP as far as I recall. That one also left the user's files on the drive, and only looked at installed programs and such. Still, it is nice that they are putting more emphasis on it now, and the "revert to stock" function is becoming to obvious to the user. Hopefully, this will futher eliminate the need for DVD's with backups.

    I do think the Metro UI holds some great promises, though not for the hardcore users. There will probably always be a need for a psychical keyboard and mouse in order to perform certain tasks, and I couldn't imagine writing anything serious on an on-screen keyboard. Though just imagine having the metro UI for a tablet, and being able to dock it to a traditional setup with mouse, keyboard and a big monitor and getting some work done. All without the need for extra devices. Or a dock-able keyboard, creating a laptop for the road along the lines of the Asus Transformer.

    For me, I think the Metro UI is a great evolution for Windows, towards the current user scenarios, which is that the computer is more quite casually. The great part here is, that even if the connected part will sync all my photos from my phone and whatnot, I will still be able to attach a proper DSLR through a USB port and access all my photos in an instant, something which is hardly possible on most other tablets these days.

    Some have mentioned the corporate side of bringing in a new interface, but in reality, do corporations really spend time and actual resources teaching personnel how to use the OS? Historically, corporations have always been very late to adopting new OS'es, which begs the question, whether or not training will really be necessary once people have gotten acquained with the OS privately.

    There are still alot of questions that needs to be answered on how Microsoft plans on integrating some of the more mundane tasks into the new UI, and as always, I think their succes will largely be defined by their attention to detail, and ensuring that users can "live" in the Metro UI while still maintaining their productivity or even increasing it.

Log in

Don't have an account? Sign up now