August 27, 2012

Facebook Drops HTML5, Goes Native for Next Generation iOS App Speed – HTML5 Still a Star

A short while ago we wrote an article touting the benefits of HTML5 and stating that we believe it is ready for prime time. Now Facebook (NewsAlert) comes along and decides to rewrite its iOS Facebook app in the name of greatly improved app speed and performance impact. The supposed kicker here is that Facebook has decided to drop HTML5 in favor of returning to a native iOS app approach. Facebook’s Jonathan Dann does a fairly deep dive into the entire thing over at Facebook’s Developer’s Blog, with an August 23, 2012 entry.

That is not an indictment of HTML5 though – not by a longshot.

Dann walks us through the history of Facebook on iOS, and the interesting thing here is that, following several early iterations of the app as a pure iOS project, Facebook subsequently developed an "open source framework" dubbed Three20 that the company then used to build later versions of the Facebook app. Three20 eventually took on a life of its own and became overly complex and bloated – more so than using later and much more powerful versions of iOS itself. In short, Three20 became a key part of the problem in creating a fast, next generation, highly optimized iOS app. The new Facebook for iOS marks the company’s first release in years without the Three20 framework.

HTML5 Was Handy, But?

The company also opted to use HTML5 to build numerous later versions of Facebook, primarily for all the reasons one might want to use HTML5. As Dann puts it, "It works regardless of device, platform, or network. And Facebook users had a good experience on their mobile devices. By allowing us to write once and ship across multiple platforms, HTML5 has historically allowed us to keep the Facebook mobile experience current and widely available, and has been instrumental in getting us to where we are today. We chose to use HTML5 because not only did it let us leverage much of the same code for iOS, Android (NewsAlert), and the mobile web, but it also allowed us to iterate on experiences quickly by launching and testing new features without having to release new versions of our apps."

Eventually HTML5 allowed Facebook to easily support over 500 million users and over 7,000 supported devices. Not bad! In all honesty it sounds to us that dropping the Three20 framework had more to do with the speedup than moving away from HTML5 did. Dann provides some very interesting technical details on what Facebook has been able to do by returning to a native approach. From a developer’s perspective it is well worth reading through.

For readers who want to take a deep dive into HTML5, there is a perfect venue for doing so coming up in early October – the HTML5 Summit– a DEVCON5 Event (collocated with ITEXPO (NewsAlert) West 2012), taking place Oct. 2-5, in Austin, TX. Come on down and share your own perspectives! And get the deepest overall dive into HTML5 you can possibly find.

Sponsored Stories and Mobile Devices

If we were betting folks we’d have to place a bet that Facebook had no choice but to move back to a native approach on its mobile Facebook apps – we do need to refer to these as "apps" rather than "app" because Facebook will now have to maintain separate code bases on some level for each different mobile operating system. That is the core tradeoff in going back to a native approach vs. HTML5. The entire world sits and waits for what Facebook is going to do to make money from its mobile users – for now the answer appears to be sponsored stories.

For sponsored stories to succeed as a major revenue generating framework, it requires that the mobile Facebook apps be highly responsive – they need to be ultra-fast – users will not sit for anything else. It’s pretty clear to us that Facebook had to first bring speed and responsiveness back to the mobile apps before it could take sponsored stories to a new level. At least we hope so for Facebook’s own survival.

HTML5 Proved Itself!

We don’t often mention it any longer (though we have done so numerous times over the last several years) but one of the benefits of HTML5 is that it serves as an excellent prototype app builder for large scale projects. In the old days, companies would spec out substantial programs designed to run first and foremost on laptops (and before laptops became ubiquitous, on desktops). Mobile was a side issue, and in numerous cases once an app was built companies would then look for ways to downsize an app and try to shoehorn it onto mobile’s small screen world.

As mobile devices become the primary devices in the enterprise (as well as for consumers – you know, the whole BYOD thing), it becomes much more important to first build apps from a mobile perspective and to then allow these apps to grow in size if needed. HTML5 far more often than not will prove to be both the ideal platform to build prototypes from – and in a majority of cases will likely also prove to be the only platform necessary ongoing. As Facebook scaled up to over 500 million active mobile users HTML5 continued to serve Facebook well – and it represents a powerful HTML5 story.

Never the less, even we note that there are cases where native code’s inherent speed advantages will prevail – whether that decision is driven for technical or business reasons. In Facebook’s case it was both. Facebook has now reached that point – it is a fully legitimate time to move away from HTML5 – at least for now. Eventually the cycle will repeat itself – as far faster mobile devices continue to hit the market and as HTML5 itself continues to be enhanced and improved, all of HTML5’s benefits will very likely result in Facebook moving back to HTML5 at some point.

Facebook may have opted to move away from HTML5 for now, but it couldn’t have gotten to where it is today as easily as it has done so without HTML5 having been a key part of the journey – now there is a good sponsored story to tell.

Want to learn more about HTML5? Then be sure to attend HTML5 Summit- a DEVCON5 Event, collocated with ITEXPO West 2012 taking place Oct. 2-5, in Austin, TX.  Stay in touch with everything happening at HTML Summit. Follow us on Twitter.

Edited by Rachel Ramsey


HTML 5 Demos and Examples

HTML 5 experimentation and demos I've hacked together. Click on the browser support icon or the technology tag to filter the demos.... Learn More

HTML5 GAMES is the largest and most comprehensive directory of HTML5 games on the internet... Learn More

The HTML5 test

How well does your browser support HTML5?... Learn More

Working Draft (WHATWG)

This is the Editor’s Draft from WHATWG. You can use it online or print the available PDF version... Learn More

HTML5 Flip Book

Free jQuery and HTML5 flip book maker for PDF to online page turning book conversion... Learn More