Native vs HTML5 – HTML5 wins hands down

It’s hard to believe that the native vs HTML5 debate is still a popular topic. Personally, I knew that HTML5 was superior from the moment that WebViews came into the picture (http://developer.android.com/guide/webapps/webview.html).

To be perfectly fair though, proponents of native apps are not completely wrong – The idea of having an app that you can distribute through an app store is a powerful notion – Even the vast majority of HTML5 supporters will agree that you still need to write some native code if you want to deliver your HTML5 app successfully.

Here are some reasons why HTML5 apps are better:

  1. Continuous deployment: This is by far the single most important point – As the provider of an HTML5 app, you can deploy an update of your app quickly and easily if there are any issues with it (which arise quite often among lean startups). Also, it gives you the freedom to add features to your app without requiring your users to explicitly update it via their app store (which, let’s face it, won’t happen often, if at all).
  2. One code base: Now with IOS, Android, Windows mobile, Blackberry 10, Firefox OS, WebOS and many more mobile operating systems coming in the near future – Who can afford to maintain all these different code repositories?? If you want to avoid this, you’re pretty much stuck to using HTML5-to-native technologies like PhoneGap.
  3. Design advantage: HTML5 gives you more creative design flexibility than native (HTML5 is where the creative talent is) – Again, you need to use HTML5 technologies like PhoneGap to get around this issue.
  4. Speed and user experience: Contrary to what ignorant native purists say – HTML5 apps can be really fast and responsive. Anybody who claims otherwise has obviously never heard of single page apps (http://en.wikipedia.org/wiki/Single-page_application) – Most SPA frameworks (AngularJS, EmberJS, CanJS, …) allow you to setup client-side routing to let users switch between ‘screens’ without ever actually leaving the page. The experience is smooth and seamless. Also, HTML5 allows you to deliver a consistent experience to all users regardless of whether they are accessing your app through their desktop at home or on their mobile phone or tablet. You don’t want to force your users to relearn your app when they switch from desktop to mobile! CSS3 lets you create responsive layouts which look great on all screen sizes without changing the user experience too much.

The only downside to HTML5 is that you can’t directly leverage native features that are specific to mobile devices – Like accelerometers, gyroscopes, etc… That said, there are simple ways to expose these features from a WebView to your HTML5 JavaScript – So your native WebViews should still be pretty lightweight.

What you don’t want to happen is that in a couple of years, if the mobile OS market becomes fragmented, that you’ll end up having to maintain 4 different code bases for the same app.

In summary, I wouldn’t say that native apps are bad – After all, they make great wrappers for your HTML5! You can’t deliver a great Pizza if you don’t have a box to put it in.

Advertisements