VS 2012: WinRT and language projection


Back in the good old days when I started developing for Windows the following was true:

  • I was a LOT younger.
  • The year was 1987.
  • The Windows version was 1.01.
  • The language was C.
  • The state of the art debugging was connecting another machine via RS-232 (remote debugging!).
  • The only integrated development environment was Borland's Turbo Pascal.
  • …but the Windows Programming API was Win16 API, which now has evolved to Win32 API but the basic principles are still the same.

Enter 2012 and with Windows 8 we now have a new Windows API with fundamentally different principles and origins.

WinRT.

WinRT is a modern framework, based on a hierarchical namespace written from the ground up to support parallelism, asynchronousity, efficiency while giving the programmer a great platform for developing stunningly graphical and immersive applications in a number of different languages. It supports touch, mouse, keyboard and pen input, support for various new sensors in a consistent way, the new Metro Style application model, XAML and rich internet data access.

As an example.

One other great feature of WinRT is language projection. Language projection takes the WinRT API and projects it into a number of languages (currently C++, C#, VB and JavaScript), making the API look natural for each programming language. For instance in C# methods starts with a upper-case letter (OpenFileAsync), but in JavaScript it starts with a lowercase letter (openFileAsync). Collections are projected into collections natural in the language. Example of this is using Standard Library in C++, but .NET collections in C#/VB.

Combine this with truly excellent Intellisense support in all languages gives us a very productive platform and native experience of WinRT regardless of our language of choice.

So in the even better current days, the following is true:

  • Not so young anymore, in fact I’m old. And reading this post makes me even older Smile.
  • The year is 2012.
  • The Windows version is 8.
  • The language of choice is yours.
  • Debugging is done in so many excellent ways I can’t recall them all.
  • The only integrated development environment worth running is of course Visual Studio 2012.
  • And the Windows Programming API is WinRT (for Metro Style apps), and Win32 for classic Windows applications.

To get started developing Metro apps (which you should), start here.

 

Great, great feature!

 

For all things Metro & Windows 8 development, see our Metro Map here.

 

Happy coding!

/Peter

Comments (0)

Skip to main content