One Year Later: Is HTML5 Ready for Prime Time vs. Native? No.
Note that this was written in 2012, so the particulars are out of date. That said, I don’t think the conclusion has changed.
A year ago I published a series of posts about HTML5 mobile web frameworks: Sencha Touch, jQuery Mobile, jQTouch, and Titanium Mobile. Setting aside differences among frameworks, I tackled the question of native vs. web and gave a nuanced answer, even a hesitant yes. A year later I’ve abandoned HTML5 and begun rebuilding my app in Objective-C. And while the long answer is still nuanced, the short answer is easy: if you want to build a great mobile app, go native.
One caveat: I haven’t written native Android code, so this is based primarily on iPhone development. But I believe much of I have to say here will apply there as well.
Web technologies simply don’t perform as well as native. Animations stutter. Pages jump or blank out when they reload. And that’s on iPhone, which is the best case. Die-hard web developers will point out that these problems are solvable, and they may be. But solving them requires effort and potentially compromises (e.g., a Load More button instead of a continuously scrolling list). Which would you rather spend your time on: building great functionality or fighting a non-native platform so it feels native?
There’s no question that the speed of mobile browsers will continue to improve, and frameworks will evolve to take better and better advantage of them. At some point performance may cease to be such an issue. I wouldn’t expect that to happen in 2012.
Efficient development requires great documentation. Apple’s is comprehensive. Several great books will get you up to speed. (I used iOS Programming: The Big Nerd Ranch Guide.) And Stack Overflow and other community sites have answers to nearly any question.
I can’t say the same for HTML5 frameworks. Sencha Touch has extensive documentation but I encountered holes, areas lacking detail or even high-level explanation. The community was similarly hit or miss. And my attempt to pay for support was, strangely, ignored. This is worse for a large framework like Sencha’s than for something smaller like jQuery Mobile (whose documentation was also underwhelming) because you’re spending less time interacting with the browser and more working with the framework’s own middle layers.
Sencha Touch is open source. Given enough time, I might have solved my problems by digging into the code. But again, the goal in choosing HTML5 is to avoid learning new platforms. If I’m going to accept a learning curve why not learn a well-documented, widely-used platform instead of a specialized middle layer?
Apple’s Xcode is good. There’s a drag-and-drop tool for assembling user interfaces, a debugger for inspecting and stepping through your code, smart code completion, optimization tools, and integrated documentation. I understand you get similar functionality developing for Android in Eclipse.
And web debugging in the iPhone Simulator or on the device itself is another story. You can print messages to the console but you can’t set breakpoints or step through your code. And just because your app works in desktop Safari doesn’t mean it’ll work on device. So there’s a lot of poking around in the dark that simply doesn’t happen with native development.
Conclusion: Yeah, It’s Still Nuanced
I’ve been hard on HTML5 frameworks here. We need them. They’ve taken on the important, challenging task of making it easy for web developers to create interactive mobile experiences. They’re developing for moving targets that differ in their capabilities and limitations. They’re constantly at a disadvantage because there’s an additional layer between them and the OS. The work they’re doing is incredible. As the frameworks mature they’re turning their attention to documentation. In the meantime, Microsoft and Adobe seem to be shifting focus away from their proprietary frameworks onto HTML5, so better developer tools may be around the corner.
If you’re building a mobile web experience, an HTML5 framework may be just the ticket. If you’re building an app whose requirements are modest or it needn’t feel native, ditto. Sencha Touch is heavy but gets the job done. Once jQuery Mobile irons out a few more bugs it’ll probably be my favorite because it’s “webbier” and lighter-weight than Sencha.
But if your goal is to produce a polished, native-feeling app then I recommend going native (or native with embedded HTML content as appropriate). That’s partly the designer’s desire to create something pixel-perfect. But it’s also about efficiency: better to tackle the one-time learning curve than to wage an ongoing battle against limited documentation, performance issues, and underwhelming tools.
Originally published at operationproject.com on January 6, 2012.