If raw graphics performance is a concern for your app, then going C++/DirectX ends up being your only real choice. Many kinds of apps can be effectively written in the other languages, but in the end, if perf totally matters to you, make the choice early to bypass any extra rendering layers you can (i.e. HTML/CSS and XAML). The team that created the FreshPaint app, for example, did this very early on as they had already implemented their paint/texture physics engine in C++/DirectX so there wasn’t any reason to think to use a different language for the rest of the app’s structures.
There are a few cases where Windows 8 doesn’t have exact parity between HTML/CSS and XAML, where HTML/CSS has a couple of more controls. On the flip side, if you’re trying to directly incorporate web content into an app, you have to use an HTML iframe if the content needs HTML5 capabilities like AppCache or LocalStorage, but then if the web site has frame-busting code, you’re sunk. The XAML WebView control, on the other hand, hosts frame-busting sites just fine, but doesn’t have all the HTML5 goodies. Clearly this is an area that can be improved, but for now, it’s good to know that these limitations can make-or-break your language decision.
Clearly, if you have existing code in one language or another, then it makes sense to reuse much of that instead of porting it to another language. Once more, this is where a mixed-language approach comes into play.
All in all, the more we discussed this question amongst ourselves, the more we realized that there never really was a set answer for any given developer. We drafted a number of papers to try to spell out the strengths and weaknesses of each choice, but in the end, I whittled it down to these thoughts:
- If you already know one of the languages/presentation layers and not the others, and don’t have a specific issue that would force you into a choice, then stick with what you know. Otherwise you’ll have to face a big learning curve.
- If you know more than one of the languages/presentation layers already, then you don’t need Microsoft to spell out the strengths and weaknesses: you understand those already and can make an intelligent choice.
- If you don’t know any of them, then you should spend a couple hours working through the basic tutorials of the Windows Developer Center (the “Developing Apps” topics listed here), and see which one you like the best. I have generally figured that those coming from Java and Objective-C would probably pick up C# (or maybe C++) easier than learning the semi-mystical tones of CSS, whereas a web developer would typically find HTML/JS a familiar territory.
I was very glad, in fact, to see that the banners at //Build 2011 in Anaheim were emblazoned with the words “use what you know” where writing apps was concerned. An in working with partners building apps over the last year, that’s pretty much played out to be the right way to approach the matter.