Coffeehouse Post

Single Post Permalink

View Thread: has Anders commented on WinRT?
  • User profile image

    WinRT is really the successor of Win32. It cleans up the API's with better accessibility, naming conventions, and exposes it to multiple languages using language projections, which allows you to use your language of choice, and when calling a WinRT API, the code should look like what you're used to in whatever language or platform you choose. It isn't meant to destroy or de-emphasis .NET, but there are fears that it will happen anyway. It provides a new way for API's to be done in Windows at the lowest level, outside the CLR.

    In prior times, let's use Vista as an example, we were introduced with the DWM (Desktop Window Manager) which had cool new features like Aero glass. These features are baked into Win32 though, which means you have to P/Invoke to use them from .NET. The .NET team would have to write wrappers around the new Win32 features to make them available in .NET, but because of time constraints, that stuff never made it into .NET API's. WinRT removes this problem by allowing the Win32 API to be directly available through WinRT, so you can just directly access it. This means that in the future if X feature was introduced in the Win32 layer, it could just be exposed through WinRT, and .NET customers wouldn't have to wait for the .NET team to make a wrapper. This is possible because WinRT uses what they call language projections, which allow WinRT to project its API's to specific languages, so you can use the API from your language of choice, and it still looks like you're using your language.

    Now here's the flipside, and the problem I see. WinRT right now is not really accessible to .NET, its accessible to Metro apps. And Metro apps are far limited in the API's they have compared to .NET. WinRT only has a subset of API's from .NET, like it doesn't include things like WPF, Silverlight, or WinForms because those don't make sense in WinRT. But the API's are severely restricted to API's that only make sense to Metro style apps.

    I think the limitations and exclusions in WinRT are what make .NET developers feel like .NET is going out the window, and I agree with the concern. WinRT apps actually can only use specific API's, otherwise your app cannot be included in the App Store, and thus cannot be available to Windows 8 consumers.

    I'm going to stop there. I hope this clears up some confusion. I like the idea of improving the Win32 layer with WinRT, but I think restricting the API's and favouring Metro style apps only is a very bad decision. Personally I am a fan of compatibility (Windows XP, Windows Vista, Windows 7) and am an avid supporter of the Desktop. I personally wouldn't use WinRT for any serious applications, that's my take.