A week doesn’t go by where I don’t see some analyst or research firm trying to make headlines by endorsing or disparaging the viability of HTML5. HTML5 is the new kid on the block, so it’s an easy target. The latest case is a recent report from Strategy Analytics, in which it is claimed that “HTML5 is not the future of apps.”

A bold claim, to be sure. Especially bold since research from Gartner suggests that 80% of mobile apps will use HTML5 by 2015.

In my opinion, Strategy Analytics and Josh Martin seem to have missed the point with HTML5. Unless a new, broadly supported, cross-platform technology emerges, HTML5 is most definitely the future of apps, and it largely lives-up to the hype.

Multi-Platform World

The future will not look like the past. For the past three decades, we have operated computing devices and developed software for a homogeneous platform. There was a single, dominant form factor- the personal PC- and a single, dominant operating system- Windows. If you wanted to build an application, building it for Windows and Windows alone was an acceptable decision that let you reach 95% of your target users.

Of course, Windows wasn’t always the dominant operating system. It emerged victorious from a war with IBM’s OS2, Sun’s Solaris, Apple’s System 7, and a handful of smaller players in the early 1990’s. And in that original operating system war, Windows clearly “won.” No contest.

That OS war actually looks similar in many ways to today’s mobile operating system battle: a fragmented market, two big players, and many niche players guaranteed to eventually fade into history. Then it is was Microsoft and IBM, today it is Apple and Google. Then it was Novell, Next, and Sun, today it is HP (webOS), RIM (BlackBerry), and Nokia (Symbian).

But there is a key difference between then and now. In the 90’s, the platform winner was picked by “Corporate America.” In 2012, the platform winner will be picked by consumers.

Unlike big business, which strives for efficiency and cost savings, consumers like variety and choice. That’s why there are many clothing, automobile, food, and PC brands. Different strokes for different folks, as they say.

That ultimately means the future will not return to a single, dominant platform. We are headed towards a long-term, multi-platform world.

And the numbers back it up.

Forrester surveyed CIOs in 2011 and learned that the average CIO is supporting 3.5 different mobile platforms within their environment. These are CIOs that could mandate a single platform (in theory), but are instead dealing with a multi-platform world, driven by trends like “consumerization of the Enterprise” and “BYOD” (Bring Your Own Device).

Creating Apps for a Multi-Plat World

If it is firmly established that the future is multi-platform (and few people seem to argue that point, including Strategy Analytics, who said iOS, Android, and “increasingly Windows Phone” will “continue to dominate”), then the question for software developers becomes simple: What is the best way to build apps for a multi-platform environment?

The word “best” clearly leaves room for interpretation. Depending on the goals and motivations for an app, “best” may mean most cost efficient, richest graphics, easiest to maintain, or any number of things. So it should be said upfront: there is no one-size fits all solution for building modern mobile apps.

But if you fall into the typical category of a business trying to build an app used to share and collect information that reaches all users, regardless of platform, then you have a pretty clear choice: HTML5.

The Problem with Native

Native apps are great. They are. They offer the most direct access to the full capabilities of a device. But therein lies the problem. The process for building native apps does not scale. For every platform that needs to be supported, separate skills, separate development efforts, and separate maintenance are required.

If you want to reach users on iOS, Android, Blackberry, and Windows Phone with native apps, be prepared to learn and use Objective C, UIKit XML, Java, Android XML, .NET, XAML, and a host of unrelated APIs.

For the average business, this model just doesn’t work. It’s expensive. It’s time consuming. And for many business apps, the technical benefit over HTML5 is marginal.

The Solution with HTML5

Like it or not, HTML5 is the only “native” (let’s not forget that HTML and JavaScript run natively on devices) runtime that exists across all modern platforms. The only one. As a platform, HTML5 is the fastest way to reach the most users with mobile apps.

Is HTML5 a silver bullet? Of course, not. No technology can be everything to everyone. For many common app scenarios (nearly everything except rich, animated graphics, like games), though, HTML5 provides an ideal solution that overcomes the primary scalability problem of native app development.

When done properly with the right tools and frameworks, HTML5 apps can be built to look and feel identical to their “native SDK” counterparts. In fact, Mozilla claims that 80% of the apps already in app stores use HTML5 (though I’m not sure how they compiled that stat). Either way, with prominent examples like LinkedIn, it is clear that HTML5 can be used to build modern apps while delivering the scalability needed for a multi-platform world.

Case in point, when the BBC needed an app for the London 2012 Olympic games, what technology did they use? You guessed it: HTML5.

Hybrid Apps Are HTML5

This is the fatal flaw in Strategy Analytics conclusions. In the process of determining that “HTML5 apps are not the future,” Strategy Analytics does concede that “hybrid” apps represent a viable alternative to native app development.

Hybrid apps are apps built using HTML and JavaScript, but then “wrapped” in a native app “shell” or container. They allow developers to work in HTML and JavaScript, with all of its cross-platform benefit, but then wrap the results of that work in a native app container that allows the app to be submitted to app stores and gives the app JavaScript access to underlying device APIs and sensors (like the camera).

PhoneGap (and its related counterpart Apache Cordova) is the most popular example of a hybrid app container. Developers wishing to give their HTML5 app even more power and polish can use the open source PhoneGap tools to package and deliver the final result.

Ultimately (and this is the point), the hybrid app is running HTML and JavaScript! There is no cross-compiling. This is an HTML5 app. It’s just another method of delivery for platforms where native HTML5 packaging is not offered.

If Strategy Analytics recognized this single point, their conclusions on HTML5’s future should be very different.

(More) Native HTML5 Packaging

Hybrid apps exist today only because few platforms offer “native” packaging options for HTML and JavaScript. Developers are forced to turn to solutions like PhoneGap to give HTML5 apps the packaging and device API access needed for app parity. With the arrival of new platforms, though, HTML5 is gaining native foothold.

Google’s Chrome OS, Microsoft’s Windows 8, RIM’s BlackBerry OS, HP’s now open source webOS, and the forthcoming Firefox OS all offer native packaging and device API solutions for HTML and JavaScript. No shell or container needed.

On these platforms, HTML5 apps are every bit as “native” as the so called “native SDK” apps. They have access to device APIs. They have a well defined packaging system. They can support in-app payments. And they can be sold through app stores.

In some cases, as with Chrome OS and Windows 8, these evolutions for HTML5 are also moving back up the food chain to traditional PCs. Now developers can not only target the world of mobile users with an HTML5 app, but cross-platform desktop users, too. It’s truly maximum reach.

Recognizing the Limits

It’s only fair conclude by recognizing that HTML5 apps today have limits. For highly visual, intensely animated, or certain complex app interfaces, HTML5 apps can strain on today’s runtimes and hardware. The device APIs and packaging limits can all be worked around, but performance limits are the barrier worth recognizing with HTML5.

Fortunately, the solution is obvious and coming. As newer mobile processors and new HTML/JavaScript runtimes ship with new phones and tablets, HTML5 will only get faster. Developers that build apps today can watch those apps get more powerful and more capable without touching a line of code. The rapid evolution of mobile hardware and browsers will quickly close the performance gap between HTML5 and native apps (at least, as much as is needed).

So, if you need to build a rich, animated game today, don’t use HTML5. If you need to build a business app that can reach users everywhere and on every major mobile platform, use HTML5! It’s not hype. It is the future, side-by-side with native.


ToddAnglin_164
About the Author

Todd Anglin

Todd Anglin is Vice President of Product at Progress. Todd is responsible for leading the teams at Progress focused on NativeScript, a modern cross-platform solution for building native mobile apps with JavaScript. Todd is an author and frequent speaker on web and mobile app development. Follow Todd @toddanglin for his latest writings and industry insights.

Related Posts

Comments

Comments are disabled in preview mode.