Written by Ramón Saquete
Web development with HTML5 is on its way to replacing mobile application development with native code. There is still a long way to go before this happens, but at the rate progress is being made, it may only be a matter of waiting a year or two.
For the user, the only differences between a mobile application and its Web version is that the application is launched from an icon on the desktop, it does not have a navigation bar and when you click on a link the browser jumps. On the other hand, for the developer, the scenario is much more complex:
Hybrid HTML5 applications
Currently the most common way to take a Web application to mobile or to develop a mobile application with HTML5 is to use a tool such as PhoneGap or Titaniumthat you packages all Web code in one application that we can offer for sale in the app stores. Such apps are called hybrid apps, because they are developed with HTML5, but have a native device code wrapper, which runs HTML5 inside a browser and allows access to hardware features that are not currently accessible with HTML5 alone.
Pure HTML5 applications
Websites will soon be able to be installed as applications directly from the browser, without the need for Google or Apple to approve our application. This is known as pure HTML5 applications. They have already been used in iOS for a couple of years thanks to a specification published by Apple. On Android we can implement the same, starting with Google Chrome version 31, with a tag halfway between Apple’s and the code normally used to put favicons:
<link rel="shortcut icon" sizes="196x196" href="icon-196x196.png" />
Hopefully in the future all mobile browsers will support this feature, maybe even without having to specify it in the code, so that we can add any page to our mobile desktop as if it were an application.
HTML5 vs. native code
The biggest advantage of using HTML5 is that applications can run on all devices, while with native code we have to rewrite the code for each one, not only when we finish implementing the app, but every time we make a change.
HTML5 is already used in applications where performance is not particularly critical and access to certain features is not required, such as the Facebook app, but as HTML5 improves in these areas, less and less native code will be used and, perhaps, in the future, pure HTML5 applications may be included in the most famous application markets (Google Play and App Store), as is already the case with the market of Web applications for Firefoxthe market for applications for Google Chrome and the market for Amazon applications for Kindle. These pure HTML5 application markets take advantage of the fact that your applications are targeted to specific browsersThe use of browser-specific APIs, which may be non-standard, is used to access functionality that is still too green to be implemented in a way that works in all browsers.