HTML5 vs Native: What is it and how do you decide? – Part 1

This is the first installment of a two part series about HTML5 vs. Native Development. In this first article we will focus on the features and benefits of HTML5.

The HTML5 vs. Native development is a hot debate topic among developers right now.  HTML5 growth has exploded over the last several years, but has it caught up to native development in the areas of support and performance?  There’s many things you need to consider when making this decision.  We hope we can give you some information to make the decision easier.

What’s the difference between HTML5 and Native?

A native application is an application that has been developed specifically for the device or platform it’s running on.  Android™ apps are written natively in Java while iOS (iPhone®, iPad®, etc.) apps are written using Objective-C.  They are not compatible with each other. It may be possible to find a “wrapper” that will allow non-native code to run. However, they are optimized very specifically for the platform they are written for.

On the other hand, HTML5 apps are stored on the web and run inside of any HTML5-compatible browser.  HTML5 apps are not platform-specific. As long as you have a browser capable of running HTML5 (which most mobile platforms currently provide), you can run the app.

What are the benefits of HTML5?

HTML5 is being developed to give web developers more flexibility and power than its predecessors. Some of this built-in power includes:

  • Drawing Support
    Previously available only with third-party add-ons like flash, a new canvas tag element offers developers a simple way to build animations, diagrams, charts, and more. With JavaScript performance constantly being improved, developers are finding new cutting edge ways to take advantage of the canvas.
  • Video
    A new video tag makes it easy to embed video on a page without the need for any third-party software. HTML5 allows you to include multiple formats, including MP4, AVI, MPG, MOV and others. That’s great because there’s still some debate about which video format to use. Built-in graceful degradation allows the browser to step through the list of files until it finds a format it can play.
  • Audio
    Sound files were always an afterthought in previous versions of HTML. Each browser handled them differently, requiring software installed on the client-side (such as Windows Media Player) to actually play the audio. The new audio tag in HTML5 changes that, making it a breeze to include audio files in your web application with the same format options and graceful degradation provided by the video tag.
  • Geolocation
    Previously only available in native apps specific to the platform (Android, iOS, etc.), HTML5 now features an API allowing you to get the geographical position of a user. It requires the user’s permission the same way a native app does, but once approved, you can pinpoint a user anywhere in the world directly inside your HTML5 app.
  • Smarter Forms
    HTML forms haven’t changed much in 10+ years, offering the same basic elements we’ve seen over and over again. No longer! The new, smarter HTML5 forms have added features for e-mail addresses, phone numbers, number ranges, and more. This makes data entry on tablets and mobile devices much easier and even simplifies data verification.
  • Client-Side Database
    The HTML5 specification includes a local storage feature, giving developers the ability to store named key/value pairs locally.  Unlike previous methods for storing data, these key/value pairs reside only on the client browser, not on the server. Currently browsers are limiting this storage to 5 megabytes, but for many apps that may be enough and the speed it offers gives developers a lot of power.
  • Thread-like Operation
    One of the biggest obstacles developers faced when considering porting their applications to something web-based is performance. Applications that, for example, needed to run a UI, query and process data, handle user events, etc. were drastically slower out of their native environments. With the introduction of Web Workers to HTML5, performance issues are quickly becoming a thing of the past. This new specification allow you to fire up those nasty, long-running scripts in the background, keeping the UI responsive and making web applications far more user-friendly.

Why Consider Native Development?

So with all of these new and powerful features, why would you even consider native development? Check out Part 2, where we discuss the benefits of Native Development and offer some guidelines on how to pick the right one for your development!

Additional recommended articles you may enjoy: