Why I Prefer to Build My Windows Store Apps in HTML

Let me state at the outset, I have no intention to compare “JavaScript with HTML” and “C# with XAML” styles of building Windows Store Apps. This is a choice you have to make based on your skillset, reuse considerations (i.e. do you plan the target the app for Windows 8 and Windows Phone 8 OS), whether the functionality you are targeting for the app is already available as a web app or not, etc.

For last several years I have focused on the web technologies, starting with server-side technologies but lately client-side single-page style apps. So the h5c3js model is more suitable based my skillset. (Additionally, my knowledge of XAML is limited to WF serialization format.)

This model, which allows HTML-based native Windows 8 apps, is innovative in my opinion and I applaud the folks responsible for the language projection in Windows RT.

JavaScript is the one of the more popular programming languages (and no… I am not just basing it on the RedMonk survey alone). This makes it easy to find folks to staff projects.

With VS 12, Microsoft has made great strides towards supporting HTML5 and JavaScript: debugging, IntelliSense (not limited to WinJS but extensible to third-party libraries as well), etc. Lately, I have been using TypeScript, which provides for a great experience. Async/Await is great, but WinJS Promise makes asynchronous programming in JavaScript a breeze.

I can use my favorite JavaScript frameworks including jQuery, KnockOut, Backbone and Bootstrap — with some caveats, of course, but largely usable. For additional information refer to this BUILD 2011 talk.

I can tap into an ever-growing list of JavaScript libraries. Just yesterday I ran into the this cool JavaScript visualization library that The New York Times developed (and open-sourced) for the US 2012 election coverage.

I was able to reuse this library in my HTML-based Windows Store app:

I can use CSS design tools that most web designers are familiar with.

Advances in CSS such as transitions, animations, transforms, gradients, SVG are at a point where one can accomplish most (if not all) of the things one can do in XAML.

I would like to hear about your experiences of course, but we have had some success in convincing customers that their web-based LOB apps can go native, and in the process, make their users more productive. Needless to say, if a web version of the app already exists, it is easier to get a h5c3js-based Windows 8 Store App going.

If the above reasons are not good enough, Kraig Brockschmidt’s (author of the OLE “bible”) delightful 800+ page book is a reason enough.

All that said, there are a few challenges one has to contend with.

  • http://twitter.com/resing Tom Resing

    Vishwas,

    Glad to hear this is working for you. I also have years of experience in web development I’d love to transfer over to Windows Store App Development.

    Can you speak more to the Windows Phone + Windows 8 cross platform code? Does HTML do that?

    Also, what’s your take on VS versus Blend for HTML, JS + CSS development for Windows Store Apps? I liked the model presented in Authoring Windows
    Store Apps in Blend from November 2012 MSDN Magazine.

    -Tom

    • Vishwas Lele

      Thanks, Tom. Unfortunately HTML is not an option when it comes to Windows Phone 8. WP 8 only supports XAML style apps. Although note that there is no binary reuse across Win 8 and WP 8 ( unless you rely on portable class libraries). If you get a chance, check back in a few days, we plan to have a post about reuse between Windows 8 and WP8.  

      • http://twitter.com/resing Tom Resing

        Thanks for the follow-up, Vishwas. That’s too bad that Windows Phone 8 doesn’t support HTML. I hope a future Windows Phone OS does.
        I will read your next article on reuse.

  • Pingback: What to Choose between XAML and JavaScript for Windows Store apps development. | RranjanK's Blogs