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.

Share on facebook
Share on google
Share on twitter
Share on linkedin


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.