One of the stranger decisions that Microsoft made when developing Windows 8 was that the new model of building apps was to be based not on .NET, but rather on a new development technology called Windows Runtime (WinRT).

The real reason why this decision was made has never been officially confirmed. A theory held by common folk is that Steven Sinofsky had an axe to grind against .NET having blamed it for "that whole Vista thing".Personally, that's a theory I subscribe to.

.NET is a wonderful set of technologies and one of the best things Microsoft has ever come up with. Why they would ditch a decade's worth of refinement and replace it with something new is baffling at best.

Anyway, the very much perceived advantage that WinRT gives the world over .NET is that it make it possible to build native Windows Store apps in HTML and JavaScript, rather than insisting that developers know .NET.

The apparent rationale of this is that it was easier to poach non-Microsoft developers if you based the native tooling on open standards, rather than a proprietary technology. (Never mind that iOS or Android don't have this problem. If there's money in it, developers will learn how to use your tooling regardless how bizarre.)

"Hey, come and build apps for Windows 8. You know HTML, right? You can build apps with it over here!"

One question that newcomers to Windows Store apps have is whether to use XAML or WinJS. My advice would be to go with the flow and go with what everyone else uses. So what does everyone else use?

Top 25 apps

Some time ago I wrote a little tool that would scan the apps installed on a Windows 8 machine and report back on whether they were written in C#/XAML.

If you're new to XAML, that is Microsoft's proprietary native app tooling. Based on Windows Presentation Framework from the Longhorn days, it's also used by Silverlight and hence Windows Phone 7's API. With Windows 8 and Windows Phone 8, XAML was rewritten, although to developers it's transparent whether you're using the old .NET WPF/Silverlight or the new Windows 8 XAML.

Windows Store apps do not declare which technology they are written in. The tool I wrote (which you can find here) looks at what's installed and analyses each app. Apps are reported as being written in XAML, WinJS, or C++. (C++ is the final way of building apps, but it's essentially the preserve of games developers.)

Running this tool against the top 25 apps available from the UK Windows Store, you get some rather startling results.

Position

App

Technology

1

Facebook

Xaml

2

Google

Xaml

3

TV Catchup

Xaml

4

Microsoft Solitaire Collection

WinJS

5

Monsters University

Xaml

6

Netflx

Xaml

7

Wreck-it Ralph

Xaml

8

Special Enquiry Detail: Engaged to Kill

C++

9

Hill Climb Racing

Xaml

10

Toy Story: Smash It

Xaml

11

Discpicable Me: Minion Rush

Xaml

12

Twitter

Xaml

13

Viber - Free Phone Calls and Text

WinJS

14

Avengers Initiatives

Xaml

15

Drift Mania: Street Outlaws Lite

Xaml

16

Block World

Xaml

17

Amazon

Xaml

18

Cut The Rope

WinJS

19

Where's My Mickey? XL

Xaml

20

Jetpack Joyride

C++

21

Dropbox

Xaml

22

YouTube Bookmarks

Xaml

23

Where's My Water?

Xaml

24

Adobe Photoshop Express

Xaml

25

Hangman Pro

Xaml

Or...

In other words, the world plus dog is not that interested in WinJS. If you're building apps for Windows 8, you're most likely doing so in XAML.

Microsoft's own apps

Where this gets more bizarre is if you look at Microsoft's own apps, the results are completely flipped around.

App

Technology

Bing Finance

WinJS

Bing Food and Drink

WinJS

Bing Health and Fitness

WinJS

Bing Maps

Xaml

Bing News

WinJS

Bing Sports

WinJS

Bing Travel

WinJS

Bing Weather

WinJS

Camera

Xaml

Mail, Calendar, Contacts

WinJS

Reader

Xaml

Skype

WinJS

Store

WinJS

Xbox Live

WinJS

Zune Music

WinJS

Zune Video

WinJS

Or...

You can imagine here a diktat coming down from Sinofsky's executive office insisting that the built-in stuff for Windows 8 must be based on this new fangled WinJS. Talk about eating your own dog food...

Remember how bad the first version of Mail was for Windows 8? I'm not saying this had anything to do with the decision to base it on WinJS, but you do have to wonder.

Note as well that in the top 25 apps, the two WinJS examples are Microsoft Solitaire Collection, and Cut The Rope. Cut The Rope's developers were a sort of "launch partner" for IE10, so the decision to go with WinJS may have been informed from that.

Conclusion

In conclusion, if someone was asking me as an advisor as to whether I'd build Windows Store apps in WinJS, I'd have to say "uh, no".

When .NET was introduced it was possible to build apps in C# or Visual Basic .NET. The world plus dog decided C# was the way to go right from the start, and VB.NET has always been the bastard stepchild of the .NET development world. It now looks like WinJS is the bastard stepchild of the Windows Store app development world.

Never try and go against the flow. If most of your development peers are choosing XAML, you should too.