Why Native Apps are better then HTML5 Apps


Native vs HTML5 apps are mostly a religious war; as we've all seen there are plenty of reasons to choose one over the other. The unfortunate fact is that neither of them are perfect; HTML5 is fast and easy to create, while Native apps are harder, but often much better performing.

Yes, you can spend a while making an HTML5 app that appears to be as good as a native app, but they operate on some old fundamentally flawed concepts.


REST is slow and not good on high-latency networks

One really large problem that I've discovered is that REST, and specifically XML or JSON over REST, is a very crappy protocol. It's based on HTTP, which is designed for desktops, not mobile devices. There's a lot of redundant and unnecessary information being sent over the HTTP protocol, and it's stateless. While you can work with things like web-sockets, this starts to defeat the purpose of an HTML5 app, since you're now writing much more code and eventually you're going to get locked into a specific browser.

HTML5 apps transmit data and presentation

HTML5 applications have to transmit everything they're displaying, not just raw data. With a native application, you can easily just transmit raw bytes of data, taking up far less of that limited data plan that most carriers now have, and optimizing that for low-bandwidth and high-latency networks. With HTML5 apps, if you want to display something, you have to transmit it first. Images, layouts, all of the display logic needs to be transmitted, not just the data you're displaying. Yes, you can do some caching to make sure it's not transmitted often, but you're still consuming unnecessary bandwidth just to transmit layout and application logic.

Many HTML5 apps tend to just wrap existing sites

It's not really the fault of the technology of HTML5, but it is a side effect of how easy it is to do. Many HTML5 applications that are out there are just wrappers around existing websites. There is a fundamental difference between an HTML5 or Hybrid application and a website, and many developers don't seem to go that extra mile to make it really feel native.

HTML5 Applications don't have access to everything

Another point to make is that not all features are available to HTML5 applications. Yes, you can write a wrapper application or use a framework like Sencha or Sprout Core, but you're still not getting full access to everything. There are just some features that are better handled at the native layer (such as database access,  networking, and native graphics implementations).

HTML5 is a middle layer

With Native applications, the code you're writing compiles down and executes directly on the hardware you're running on. No matter what happens, that will always be faster then an interpretation layer, as you're doing with HTML5 applications. It may eventually get to the point where both are so fast that it doesn't seem to make a difference, but it's simply impossible to add a layer of application logic and not have a performance hit. Every time you put something in between your code and the hardware, you'll loose some speed and capabilities.

While both options have their benefits, there is a major trade-off between HTML5 apps and Native apps.
0