HTML5 for mobiles: fact or fiction?

There’s been a lot of  hype recently around HTML5 and how it has the potential to become the de facto standard for building mobile applications.  With the increasing fragmentation of mobile operating systems (and consequently development stacks) writing portable mobile applications that can be deployed on different platforms is challenging.

The surge of more capable mobile browsers created an opportunity for the mobile web to come head-to-head with native applications in terms of delivering a rich and meaningful experience to the end user. HTML5 is central to this mobile web revolution as it provides the foundation for building web applications that perform well on the restricted environment of a mobile device.

However, is the new standard really ready for adoption on mobile? There are lots of misconceptions about it, what it can do and how widely supported it is by mobile browsers. More interestingly is the fact that most of the cool stuff commonly attributed to HTML isn’t in the mark-up itself but provided by Javascript and CSS3 which make things much more interesting.

First of all, HTML5 is not a standard yet… far from it. It won’t probably become a standard any time soon due to the sheer size of its specification , its complexity and divergences amongst W3C members (again this has been discussed ferociously elsewhere).

Nevertheless, vendors and the open source community are not waiting for the standard to be finalized and have already started implementing some of HTML5 features in their mobile browsers. A good example is the open source WebKit browser engine made popular by Apple which contributed with a few nice features including the video and audio tags, CSS animations and transitions, both 2D and 3D transforms.

This highlights another common misconception about HTML5: it’s not one “big thing” but a collection of individual features organised into categories. People tend to think about HTML5 support as either you have it or you don’t. This works differently in reality as mobile browsers choose to implement a few features and not the whole spec and, what’s even worse, the implementation normally is not consistent across browsers.

The illustrate this further, I’ve created the table below which was adapted from Michael Galpin‘s presentation in late 2010. It shows the main mobile browsers available today and their current support for HTML5. I’ve seen this data scattered across different websites so it’s nice see it consolidated:



The mobile platforms on this table are Windows Phone, iPhone, Android and Blackberry respectively and the numbers on each cell indicate from which version of the platform the feature is supported. Note that not all HTML5 features are listed but only the most popular and widely implemented.

Just a quick glance is enough to see how heterogeneous and scattered HTML5 support can be on modern mobile browsers and although support is improving as the standard evolves one needs to be careful when designing and implementing mobile web applications. Even on browsers that are based on the same rendering engine, like the iPhone and Android which are based on Webkit, the capabilities can vary widely.

But the real power of HTML5, which is another common wrong assumption made by a lot of people, lies not on the new tags but by clever manipulation of DOM elements and events in Javascript and by using CSS3. These are related technologies that are under the umbrella of HTML5 and provide logic and presentation aspects which in conjunction with the mark-up form the working mobile web application. So in reality, you can’t do much with HTML alone, you need to stitch it together with Js and CSS to make it shine.

Considering what has been briefly discussed in this post you might be tempted to think HTML5 is not worth pursuing and won’t ever become a reliable mobile development platform. Think again.

As previous versions of HTML had shown us, the web is a fascinating and incredibly resilient decentralised, open system which adapts and evolves as we find new useful applications for it. HTML 4 was never evenly supported by desktop browsers either (remember IE 6?) and this did not prevent its worldwide adoption and huge popularity.

To overcome such limitations people had to innovate and come up with new techniques to make their web apps resilient to the browser quirks. This is when cross-browser frameworks like Prototype and Dojo were born, to make your HTML, Javascript and CSS work across browsers.

This is happening again with HTML5 and mobile web development where new tools and frameworks are popping almost everyday to provide a more consistent and comprehensive HTML5 support across mobile browsers. Some go even further and provide unified API’s for accessing the device’s native capabilities like GPS, accelerometer and camera. Popular examples of such tools are are PhoneGap and Jo which I might cover in another post.

So HTML5 is here to stay even if it doesn’t solve all the problems and isn’t implemented consistently across mobile browsers. We need not to fight this but embrace it as a design constraint and limitation just like we’ve been doing over the last few decades with other techniques like relational databases, object oriented design and procedural programming.

Despite all this if used wisely, HTML5 still is a formidable technology and has the potential to make the web even more ubiquitous and pervasive as it is today from desktop computers to mobile devices and in the future maybe even domestics appliances.

LinkedInShare
This entry was posted in Mobile Technology, Opinion and tagged , , . Bookmark the permalink.