Twitter Call us on +44 (0)1256 486557

Too soon for HTML5? No chance. Why Zuckerberg got it wrong.

For the past few years now we have heard about HTML5 and the heralding of a new era in terms of the World Wide Web. Those that know HTML5 well will be aware it has many benefits, particularly with regards to mobile applications. So when Facebook decided to adopt HTML5 as their technology of choice for their own mobile apps it was seen as a natural fit, given the general positivity surrounding HTML5 and Facebook’s origins as a web-based platform.

It came as something of a shock then, when Facebook’s founder and CEO, Mark Zuckerberg, backtracked significantly by stating that putting so much faith in HTML5 was “one of the biggest mistakes if not the biggest strategic mistake that we made”. The general laggy and slow performance of Facebook mobile apps was blamed squarely at HTML5’s door. As Zuckerberg further elaborated; “I think the biggest mistake that we made as a company is betting too much on HTML5 as opposed to native. Because it just wasn’t there”.

So what happened? Did everyone get it wrong? Or was there something missing from Zuckerberg’s now infamous statement? As the guys at Sencha recently demonstrated the problem was not to do with HTML5 at all, it was Facebook.

Before we explore Facebook’s failings, let’s first recap on why HTML5 has been so acclaimed and what makes it great for mobile apps.

HTML5 and mobile apps

Superior market penetration vs expenditure – With all major mobile browsers supporting HTML5, writing an app using the technology means the same code will work on multiple devices. For a developer that means fewer headaches and also means deployment costs per device are particularly favourable compared with a native implementation.

Speed of updates – As with anything web-based one of the greatest advantages is speed of deployment. For users that’s great because once a new software update is ready they will get it instantly the next time they access the app. App stores such as Apple’s can take weeks to approve a new update and in today’s ‘now’ society users don’t want to wait and with HTML5 they needn’t have to.

Unified app versions – apps written specifically for individual devices often experience a disparity in versions. Whilst an iPhone user might enjoy some recently released features, an Android user may have to wait to experience the same – that’s just not fair. HTML5 ensures the same software version no matter what device you’re using.

HTML5 is modern – Implicit in any definition of HTML5 is CSS3, which can be used be used to great effect for visual styling and, again, it’s something that all the modern browsers support. CSS3 makes app styling simpler than it’s ever been with just a few lines of code needed to implement shadows, animations and rounded edges. Less code also means faster loading times.

Enhanced functionality – Due to improvements in modern Javascript API it’s now possible to support features like geolocation and application storage. This means developers can now create complete web-based applications through native HTML and CSS. Very handy.

Native functionality for playing video and audio – In previous web eras it was only possible to play audio and video in the browser with a corresponding Flash implementation. HTML5 now supports video and audio playback on its own which is extremely useful since Flash generally doesn’t work well on mobile devices. This is also great for the end user as video and audio playback will now work in the browser without the need for endless plugins.

Strength of HTML5 app frameworks – There are a number of excellent HTML5 application frameworks available, that simplify app development with access to out-of-the-box components.

So now we understand what HTML5 can bring to the table it’s time to delve a little deeper and explore Zuckerberg’s claims a little further.

How Facebook got it wrong about HTML5

When someone in such a high profile position as Zuckerberg makes such a damning statement about HTML5, it’s only natural that HTML5’s staunch supporters will take offence; that’s exactly what happened with the guys at Sencha who offer a leading HTML5 mobile framework called Sencha Touch. If anyone knows how best to leverage HTML5 to its optimum capabilities Sencha do.

So what did they find?

In Sencha’s experience poor HTML5 performance is almost always down to an application’s fundamental architecture and implementation. As Sencha state; “it usually stems from the fact that they take a “website” development approach to building an app, and often don’t use the right tools and architectures for application development”. This is exactly what appears to have happened with Facebook where much of the application is accessing raw HTML data as opposed to using JSON, which is far more suited to mobile. Much of this approach has been borne out of factions within the Facebook development team about desired mobile strategies.

Just to prove a point Sencha decided to build their own Facebook app (known as Fastbook) to show that when HTML5 is used correctly, it not only matches the performance of a native implementation but in many cases surpasses it.

The results speak for themselves, as seen with this side-by-side comparison of Facebook’s native app and Sencha’s Fastbook version:

Sencha Fastbook from Sencha on Vimeo.

You can read more about Sencha’s Fastbook here:

Whilst Zuckerberg tried to deflect attention away from Facebook’s own failings, he would have been better advised to avoid a dig at HTML5 because, as we’ve seen, HTML5 IS more than ready.

Are you considering an HTML5 implementation? Call ProWeb’s UK Sencha developers and Sencha experts on +441189 353 339 or email