HTML5 had its advantages, fast iterations for example, but it was slow

Aug 24, 2012 13:41 GMT  ·  By

There's been a lot of talk about Facebook's new iOS app. It's faster, more reliable and it looks better. The only question is why it took so long. The answer is simple, in a way; it's because Facebook was dedicated to HTML5.

All of its apps and its mobile websites shared a common HTML5 core. This made it possible to update or change the app, or just some features, but not have to actually roll out a new version of the app.

The flexibility came at a price though, that price was the performance tradeoff that comes from not using the native platforms. While going with a native app, especially at Facebook's scale, seems like an easy choice, there was a method to the madness, a reason to stick with HTML5.

"To support thousands of devices and multiple mobile platforms, we leveraged HTML5 to build and distribute Facebook mobile experiences across iOS and other platforms," Facebook's Jonathan Dann wrote in a note on the Engineering page.

"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," he said.

"We chose to use HTML5 because not only did it let us leverage much of the same code for iOS, Android, 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," he added.

Despite this, Facebook reached a point where it knew it had to do something about the performance and that something was starting over so it rebuilt the iOS app from the ground up. That's not just an expression, the new app was written from scratch.

But Facebook isn't giving up on HTML5 entirely. In fact, areas of the app that it knows will see constant changes are still using HTML, for fast updates. Dann goes into a lot more detail in his post on how the new app is built, why it's faster and on future plans.