Today, the most popular way of developing mobile applications is to develop them as native mobile apps. Unfortunately, developing native apps can be costly, and native development can limit options by limiting development to fewer mobile platforms and devices. In this tip, we explore HTML5's possibilities as an all-purpose mobile development alternative and look at pros and cons. Native app developers create a separate app version for each mobile operating system and mobile device. The native app is installed directly onto a mobile device. The cost of developing native apps can be high, especially when many types of devices are in use. Because many corporations are adopting a bring your own device (BYOD) strategy, the cost of developing and maintaining native apps is increasing.
Most corporations want to develop native apps when needed and also develop mobile apps that can run on many mobile devices and mobile operating systems without rebuilding the app for each device and operating system. These apps are referred to as "write once, run anywhere" (WORA) mobile apps. There are at least three technologies that give varying degrees of WORA mobile apps: mobile enterprise application platforms (MEAPs), HTML5 and hybrid mobile apps. We focus on HTML5-based WORA mobile apps in this article.
HTML5 apps are essentially implemented as Web apps. The HTML5 app runs on a server external to the remote device, and the mobile device user accesses it through a mobile device browser. When the URL for the HTML-based app is entered into the mobile device browser, the interface to the mobile app is made available to the user in the mobile device browser.
HTML5 basically enables determination of the characteristics of the mobile device. In real time, it can determine, via media queries, the rendering characteristics, such as the screen size, screen orientation and resolution of the mobile device to which data/information is being served. This information is required to ensure that the data/information sent to a mobile device is formatted to fit the mobile device screen in a way that it can be read by the user.
The determination of the characteristics of mobile devices is one of the primary features of HTML5 that makes it a suitable technology for WORA mobile apps. The other primary feature is that HTML5 mobile apps do not run on mobile devices, making them relatively independent of mobile devices and mobile device operating systems.
HTML5 mobile development pros and cons
Many native app developers have a low opinion of HTML5 as a technology to write mobile apps. They often claim that native mobile apps are the easiest to write and debug, that HTML5 does not have the same level of implementation in all of the popular browsers, and that HTML5 does not enable the performance of native apps. There is truth in all of these statements. But trying to decide which mobile platform to develop mobile apps on is a difficult problem. In addition, developing and maintaining native apps for numerous platforms is expensive and time-consuming. Add to that operating systems, such as Android, that are changing frequently, creating numerous versions, and the decision becomes even more difficult.
The responses that you get from native app developers and Web app developers using HTML5 are not always objective, so you will have to do a bit of research on your own to determine which is best for your corporation. What you will likely find is that HTML5 is not yet the complete solution for those who want WORA. Today, to get the most out of HTML5, you may write once, but you may have to do some customization for various mobile devices.
HTML5 provides a solid platform on which to develop. It does not make all the differences between mobile browsers and devices magically disappear. However, HTML5 is being more fully implemented on today's popular browsers. Given the cost of implementing BYOD strategies involving numerous, different devices, HTML5 shows promise as a technology for implementing WORA mobile applications.
HTML5 mobile development tips
The key is to carefully choose the mobile app development platform that satisfies your needs. Use native mobile app development for apps that need high performance, and depend on or heavily utilize on-device features. HTML5 should be considered when multi-platform mobile apps are deployed. HTML5 can be very good in the right situations, but not every situation.
The following are some of the areas where native app development gained an early advantage over HTML5. These areas are some that you should consider when trying to decide between native app development and HTML5-based mobile development. In several of these areas, HTML5 has caught up or is about to catch up over the next year or two:
- Visual scale. This has been a big advantage of native apps, but HTML5 now has various ways to determine what the screen size is, what the resolution is, etc.
- Touch interfaces. User interface components that are controlled by touch and swipe are supported by HTML5.
- Camera/video access. HTML5 can handle photo capture from a webpage on some mobile devices, but not all.
- Accelerometer access. HTML can handle this.
- Bluetooth access. This is a work in progress for HTML5.
- Sending notifications. This is a work in progress for HTML5.
- HTML5 apps can now be sold through HTML5 or Chrome app stores. They can be distributed through Apple App Store and Android Play after being recreated as hybrid mobile apps.
Native apps are very popular for many developers, primarily because HTML5 is still working to close the performance gap and provide better access to on-device features. But HTML5 will eventually be competitive with native app development within the next two to three years. For pretty much anything except fast-moving games with a lot of animation, HTML5 is often good enough. The benefits gained by native apps because of their performance lead will be marginal for many apps. The cost savings for corporations adopting BYOD will be significant when WORA technologies, such as HTML5, are used. If your corporation has a lot of experience developing Web apps for the PC, then embracing HTML5 should not be a large leap.
This was first published in January 2013