Friday, 9 September 2011

Mobile Apps - Native vs Web (Part One)

Mobile development is booming at the moment, everybody wants a mobile application. However before development begins, a question comes up that is a rather hot subject at the moment, native or web app?

Source: Global Intelligence Alliance
The results of my recent reading seem to show a very large split over which of the two is best to use and if any particular one is better than the other. Will HTML5/JavaScript/CSS3 technologies ever be robust enough, even when their respective /specifications are finalised/, to lure the mainstream developer away from the native mobile platforms? It was an issue that up until recently I was rather stubborn over and attempted to always bias my findings toward web apps. I remained convinced there was a definitive yes, HTML5 is the way forward. On reflection however I don’t believe it is as simple a question to answer.


Source: w3
HTML5 brings some fantastic tools (and let’s face it, an awesome logo) to the table that can really help with the look and feel of mobile applications:

Geolocation [1] is one of them and it has a huge hype at the moment as it allows a user to ‘check’ themselves into places, let users know where they are/have been (with the users permission) and has become a novelty for a number of websites and allowed for some very interesting interactive experiences (see geocaching).

Local Storage [2] has been a massive bonus for HTML5, especially popular among game developers, allowing for both on and offline play. The ability to synchronise the local and server storage allows for true data persistence. The browser, for both mobiles and desktops, is slowly becoming the primary tool for a user.

Websockets [3] are another technology that simply cannot be ignored; they offer a solution to a problem that many people have implemented “hacks” for to do for a very long time. When you consider their potential for mobile applications, their bi-directional communications give much more efficient bandwidth consumption and will also be much more efficient with battery power consumption. Websockets also have the potential to push notifications to your device with much more efficiency than native API’s. It is not at the moment a guaranteed, concrete solution but again with things such as canvas, geolocation, WebGL it is the impact these technologies can have when developed and researched further.

The question I kept asking myself was can web apps ever replace a native application. Being new to mobile applications, new to JavaScript, new to HTML5 it was a question I asked over and over and spent many, many hours trawling blogs, books and articles to give a concrete answer for this question. Despite being new to the technologies in general I have realised I am asking the wrong question however. I am approaching the subject wrong trying to force the answer I want, I biased any opinions to making the answer yes, HTML5 is in fact better. I got over my zealous attitude to web technologies and realised it is not about one technology replacing the other; it is a case of what tool is best for a job. HTML5 will never be able to integrate with a device’ hardware to the level a native application can. However depending on the purpose of the application it brings a great alternative to having to learn a native language, learn a new IDE etc. It has allowed a whole new area of experimentation and potential, it has allowed a developer the flexibility to decide what tools are best for the job at hand. 

Source: Backbone.js (DocumentCloud)
Take Jérôme Gravel-Niquet’s Todo’s tutorial [4] using HTML5 and Backbone, a simple but effective application made possible without having to know Java or Objective C, without having to learn how to use Eclipse or buy a Mac. Knowing the ins and outs of each technology, each possibility is the key to developing an effective and efficient mobile application. Bear in mind however that these technologies are still growing and as more and more documentation is complete, more experts educate people like me on the benefits of the API’s it offers…the future is still very bright for the possibilities HTML5 can bring to not only mobile applications, but to the internet in general.

I suppose in summary I came to realise the simple truth. When you consider developing an application either natively or as a web-based application, it is a matter of finding the right tool for the job not about making the tool fit the job.

References:







Cotinued in Part Two - Discussing the arguments behind the 'installation' issues with Native vs Web

2 comments:

  1. Hello,

    Good work on the blog, keep it up!

    When you say: "HTML5 will never be able to integrate with a device’ hardware to the level a native application can."

    Never say never... the whatwg group are already working on an API to do just that (it replaces the element they were working on before).

    Look here:
    http://www.whatwg.org/specs/web-apps/current-work/complete/video-conferencing-and-peer-to-peer-communication.html#obtaining-local-multimedia-content

    Cheers,

    Alix

    ReplyDelete
  2. it replaces the DEVICE element they were working on... the angle brackets made the whole thing go away :)

    ReplyDelete