October 1st, 2011

Why “HTML5 or Native?” is the Wrong Question

I just recently spent some time hacking up a simple Phonegap app, which proved a useful exercise in exposing the limitations of HTML5-based apps, and the naiveté of journos who parrot the “HTML5 or native apps” meme. There is a clear and simple answer behind “it depends on your app”.

In my Phonegap app, I needed to access the camera, but had strikingly limited options therein. The simplicity of the API made it easy, but decisions made either by the Phonegap team or Apple made the interaction with the camera clunkier than I would have liked. In Phonegap, accessing the camera is different than accessing the photo library, and upon taking a photo, you are presented with a preview screen you need to approve in order to return to the app. This was way too clunky (too many steps) for my app, which made the interaction, and thus the experience, pretty much unacceptable.

This exposed a major issue with HTML5 apps: whatever gains you make by leveraging HTML5/CSS/JS can easily be offset by the limitations and choices your app framework makes. Phonegap made decisions about how their framework would behave that were unsuitable for my particular app. Maybe this isn’t surprising, but it’s a subtle point, I think, that’s worth making. You are beholden to the framework for not only the features it supports, but the way in which it supports them.

So I would qualify my “it depends” answer to the “HTML or Native app?” question with this:

If you are accessing any device features, like the camera, that you need to customize, then you must go native if you want to control the experience.

If, however, your experience relies only on the features that the browser offers, then HTML5 will do.

All that being said, apps are about creating compelling experiences, and the “magic” your app generates. If your framework destroys that illusion, then it’s not the right choice.

Comments are closed.