Kevin

Kevin Boyle

Trying to build products people love using interesting technologies

Can HTML5 Replace WPF?

My first draft of this blog post ended up being really critical of Windows Presentation Foundation (WPF) but on reflection I think it is unfair to criticise the technology too much. The technology world has always been fast moving, but since WPF’s release in 2006 some major changes have happened. The iPhone (2007) and Chrome (2008) were released, challenging Microsoft’s dominance over how people interact with computers. WPF has failed to keep up and I think people broadly agree that whilst a competent technology, it has many rough edges and hasn’t kept pace.

For a project at work, I began looking for alternatives to WPF and when someone suggested HTML5 as a view technology, I made some marking criteria to compare it to WPF.

Had to have a great developer experience

Both technologies provide you with a way to declaratively build a UI. However, WPF really only provides you with Visual Studio to use as an editor. Visual Studio is great for working with other programmers but working with designers has always been a struggle. Designers don’t know XAML and Microsoft’s vision of designers living in Expression Blend and developers living in Visual Studio didn’t materialise. However, designers do know HTML and CSS and are comfortable using a text editor of their choice to build up mockups, why can’t those mockups be turned into real products?

Actively developed

WPF has only had Microsoft really get behind it, whereas there are numerous companies backing HTML5, all for their own reasons but pragmatically, it means that the rate of change is greater and the risk of stagnation is quite low.

Large ecosystem

HTML5 has a much broader user base than WPF as the Web has more appeal than traditional desktop software. This has meant that there is an active community built up around HTML5 and JavaScript. No more relying on Microsoft to provide the entire solution, now there are multiple components that can be glued together to build your solution. Choose from Knockout, AngularJS, Backbone etc. etc. and use whatever you think best suits your way of working and the problem at hand.

Skills for the future

Personally I think that everything is moving to the web. This is pretty much inevitable and it will only be certain kinds of software that will remain in the traditional desktop form that we may be more used to. I am writing this blog post using the Office Web Apps whilst listening to the Spotify Web Player, I think the decision between investing my time learning WPF/XAML versus HTML5 is clear for me.

I have convinced myself that HTML5 is a suitable technology, but my day job project is a plugin for Visual Studio so doing a browser based application was out of the question. Does this mean that I am forced into sticking with WPF for now? In the next blog post I will talk about Chromium Embedded and how it provides a way for those of us writing desktop software to use modern technology.

Comments