Facebook’s new app for iPhone and iPad has made an impression on users with a significant improvement in speed and performance. In the world of software development, the project has also gotten lots of attention because of the company’s decision to shift key components of the app to native iOS code, moving away from HTML5.

But the engineers working on the project didn’t set out to make any grand statement along those lines. They just wanted to make a better app.

Facebook engineer Todd Krabach

“We started with an experiment with the newsfeed, to see what the differences would really be like if we did it one way versus the other,” said Todd Krabach, a software engineer at Facebook’s Seattle office and one of the leaders of the project. “We ran through some of those experiments and we spent the first couple months on this project building nothing but the newsfeed to demonstrate the differences.”

He explained, “At that point we weren’t committed to rebuilding the app from scratch. It was more of an experiment, much closer to one of our hackathon projects.”

Ultimately, the benefits of native code won out, despite the drawbacks.

By shifting to native code for key components of the app, the company is giving up some of the key benefits of a pure HTML5 approach, including speed of deployment, cross-platform compatibility, and the ability to upgrade users to new features simultaneously.

But in evaluating HTML5, he said, the team “hit some limitations for how fast we could get it to respond, and how clean we could get that interface to be.”

Krabach shared details of the project in an interview with GeekWire this week, as an example of the social networking giant’s behind-the-scenes development and decision-making process.

“The evaluation conversation included everybody at every level,” he said. “The company has been very focused on mobile. We want to make that our best experience for Facebook.”

The key question for many people in the tech industry: Based on the experience making the Facebook iOS app, where does Krabach see the native code vs. HTML5 tug-of-war going from here? He said he has been getting that question a lot.

“If the capabilities of the (iOS software development kit) were to stay stagnant for a while, I could see the possibility of HTML5 catching up and really being a platform where you can build the premium experience,” he said. “But the truth is that the native SDKs are going to continue to increase the quality bar. … I don’t really personally see a whole lot of possibilities for (HTML5) to ever hit quality parity with what you can get with native.”

That said, Krabach said he still considers Facebook’s iOS app a hybrid application, leveraging HTML5 in specific ways.

“We’re always going to be building hybrid applications,” he said. “It’s an interesting dance that won’t go away.”

The project is also an example of Facebook’s distributed development environment, with engineers in the Seattle office — its largest engineering outpost outside of California — collaborating closely with those at its Menlo Park headquarters.

The company relies heavily on Internet Relay Chat (IRC) and video-conferencing. Krabach says he often finds it easier to communicate with someone sitting next to him over IRC, making their actual location less important.

“It gives a lot more flexibility for where we work and how we do things,” he said — citing as an example the ability to work in the (waterless) hot tub recently installed at the Seattle office.

A 5.0.1 version of the Facebook iOS app, released last week, added support for the iPhone 5 and iOS 6.

Comments

  • http://www.christopherbudd.com Christopher Budd

    Very interesting. It’s the latest iteration of the ongoing portable versus native code debate (Java vs. Win32 for example).

    What I find interesting here is the idea that it sounds like they started on HTML5 to get widest exposure for least cost and then identified platforms where native code versions made sense in terms of benefits around optimization and market size.

    I suspect this is increasingly going to be the model for app development.

    Another point is that iOS seems to be the preferred platform to lead off of. People are deploying apps on iOS first and then Android with regularity. Even though it’s not as big in terms of market share, iOS is kind of the Bryant Park Fashion show venue: it’s where the new trends are shown first. Android and others are the Targets and WalMarts where they eventually trickle down and make money on volume sales.

    • Test E

      Except no one is really making money on Android.

  • TenkMow

    This makes a lot of sense dude. Wow.
    AnonCrew.tk

  • Eelco

    “ran through some of those experiments and we spent the first couple months on this project building nothing but the newsfeed to demonstrate the differences”. I’m drooling. Must be so nice to have the resources to just build something great instead of fighting with the daily deadlines.

  • http://twitter.com/metapgmr Jean-Jacques Dubray

    Why don’t we actually call HTML5 dead until it proves itself? With network limitations such as 2 HTTP connections open at any given time, power consumption, limited data plans, a real-estate where every pixel count, … Just to paraphrase Churchill, this industry always end up doing the right thing … after trying everything else.

  • http://www.facebook.com/rwoan Ronald S Woan

    I remember the same Seattle engineering team pontificating on why their HTML 5 approach was superior to native iOS at a public presentation to a skeptical audience last year…

  • http://twitter.com/chrisamccoy Chris McCoy

    You can’t ship and break things on native. Production process entirely different.

    Facebook retooled to be native first and I’m very interested in learning how this affects their hacker culture.

Job Listings on GeekWork