OK, so I think HTML/JS for Metro apps is a good idea

(Just a quick post while I wait for Anders’s talk to start. Hope he confirms destructuring assignment.)

I turned up to BUILD with a negative attitude to this whole idea of using HTML and JavaScript for creating Windows applications. And I held onto that attitude throughout Tuesday’s keynote and Big Picture sessions. I went back to my hotel that evening and threw together an app which pulls issues from Github and displays them in Metro style, and I did it in C# and XAML. And it worked.

Then I watched yesterday’s session on Using the Windows Runtime (WinRT) from C#, and my attitude changed. It’s very easy to create WinRT components in C# which can be consumed from C++ and JavaScript apps. Really, really easy. You barely have to think about it. And the support in this new Windows JavaScript for consuming WinRT components is very, very good, with binding and everything. You can effectively write an MVVM application, but use HTML and CSS instead of XAML.

This is completely brilliant.


Well, at Dot Net Solutions we do a lot of WPF and Silverlight work. And we’re cracking engineers, but we’re not designers. We get outside resource in to make our software look beautiful. And finding design studios with excellent XAML and Blend expertise is very, very difficult. But finding design studios with excellent HTML, CSS and JavaScript? Well, that’s much easier.

So my Windows app development paradigm in this brave new Win8 world is going to be this: all the internal logic, the Data Access Layer, the Models and ViewModels and so on can be built in C#, with type safety and unit tests and the performance gains. Then those ViewModels are exposed across the WinRT ABI boundary and bound to HTML views, styled with CSS and with all the UI-specific code (transitions, animations etc) implemented in JS by people whose idea of a good colour scheme isn’t “blue”.

And if there’s performance-critical code, I’m going to write it in C++ using the AMP library.

Right. I’m going to watch this talk, then I’m refactoring my Github app and do the UI in HTML.


  1. It is an unfortunate fact that MS weren’t able to convince designers on XAML & Blend but thems the breaks.

    It’ll be interesting to see how MS proceeds in the HTML5/JS tooling market, as they’re the underdogs in this space and the Blend team doesn’t have a good track record of looking out of the echo chamber.

    • I just watched a run-through of styling an app using Expression Blend 5 and first impressions are very good. Video of the session should be up tomorrow, highly recommend watching it. Key points: the app runs, including all JavaScript, within Blend, so you can get it to a specific state and then go into edit mode and see the changes you make live, show elements that match CSS selectors and so on.

      There’s a new type of JavaScript control with discoverable properties that you can set too.

      This all works for regular HTML5 web apps, live jQuery and everything.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: