X
Tech

Should your next mobile app be an HTML5 web app?

Building a smartphone app - should your developers be going HTML5 or native?
Written by Natasha Lomas, Contributor

Building a smartphone app - should your developers be going HTML5 or native?

HTML5

HTML5: The future of mobile apps?Photo: W3C

If your organisation is still getting to grips with smartphone apps it may be in for a shock - an even newer class of app is bearing down, one which promises to cut multi-platform development hassles and hurdle compatibility issues. Say hello to the HTML5 mobile web app.

HTML5 is the newest specification of the software code that web pages are created in. It adds rich functionality to browsers - so it's goodbye annoying plug-ins, hello natively streaming audio/video and more. This new specification turns the browser into a rich runtime environment, meaning web apps running within a browser can effectively match the functionality of, and even replace, native mobile apps.

"It's an inevitable trend," says Nick Dillon, analyst at Ovum. "We're going to see much more stuff moving to web apps, and away from the native mobile apps which we've had of late. It's a natural evolution.

"There's an obvious parallel with looking at the PC desktop world in the way that pretty much everything now is going to web apps and online, and all the advantages and all the reasons behind those moves are going to be largely similar to the motivations in the mobile world."

There are several big potential advantages - in the words of Dominic Shine, CIO at events organiser Reed Exhibitions (RX): "The promise of HTML5 is to provide a more generic approach to developing mobile apps that will work across all platforms without the cost and complexity of creating and maintaining apps for iPhone, iPad, Android phone, Android tablet, BlackBerry and Windows Mobile."

The hassle of maintaining mobile apps across multiple platforms is all too often a recipe for buggy apps and development headaches, and the high cost of developing apps often means companies have to limit the number of mobile platforms they develop for - excluding any customers who use devices on alternative platforms.

Companies also have to tackle the app store factor - which can mean finicky rules, revenue slicing and hoop jumping that can delay or reduce the effectiveness, fiscal and otherwise, of apps distributed via official stores. As Ovum's Dillon notes: "If you want to do an app on the iPhone there's one route to market and Apple sets the terms."

Little wonder there is appetite for another way to make, maintain and monetise mobile apps. HTML5's promise is to streamline and simplify the business of developing and maintaining mobile apps. It also holds out the hope of giving back control to the app creator. But can it live up to all this hype?

The FT's HTML5 web app - more popular than its native iOS app

Newspaper group the Financial Times launched a web app for iOS devices this June - encouraging users of its existing iOS app to switch to the web version as it would no longer be updating its native iOS app.

The new web app has proved to be more popular than the FT's native iOS app, according to the paper, with more than 700,000 people tapping into it.

The FT says its new web app is...

... faster than the native app and offers more content, including videos. Like its old iOS app, the web app works offline but content is automatically updated - unlike native apps which require the user to update them manually. The web app can even be added as an icon to an iOS homescreen, appearing to all intents and purposes like AN Other iPhone app.

The paper's original iOS app was pulled from the App Store in August after failing, intentionally, to comply with Apple's in-app subscription T&Cs - Cupertino takes a 30 per cent cut of in-app subscriptions. While industry watchers speculated that Apple's top-slicing of subscription revenues had driven the FT away from native iOS apps, the main driver for the switch to HTML5 was simplifying its app development, according to Steve Pinches, the FT's group product manager, emerging technology.

The FT's HTML5 iOS app running on an iPhone

The FT's web app for iOS devices, running on an iPhoneImage: Natasha Lomas/silicon.com

"The original driver... was around consolidating our code base so that we weren't having to develop multiple apps - which gets very, very expensive," he told silicon.com. "Also you're always playing catch up - it's just like spinning plates the whole time. As soon as something gets developed on the website we then have to go back and build it on to four platforms - it's always behind. We wanted to be able to limit that to just one code base."

That said, Pinches concedes the ability to control its business model is another key benefit of HTML5 versus iOS for the newspaper. "We've spent a lot of time over the last few years getting to the point where we have a direct relationship with our customers and we're able to offer them one username and password which allows them to access all of the services, no matter what platform they're on. So we're selling the content, we're not selling access on a particular platform.

"You don't pay for the FT on Android, you pay for the FT content. So that's fundamental to the way the FT works and we needed to be able to do that. So the web app is our way of being able to make sure we have that control and we're able to deliver that," he says.

There are other advantages to mobile web apps versus native apps too, according to Pinches: "Native apps are great in a number of ways but one problem that besets them is they are little islands of content. And it's quite difficult then to join those islands up - whereas obviously a web app is just part of the internet and so it's a lot easier to take advantage of the whole link economy."

HTML5: What skills do my developers need?

The skills required for HTML5 development are also less specialist than for native mobile app development - and thus should be easier for...

...businesses to acquire...

"It's certainly easier to cross-train people," notes Pinches. "HTML5 and CSS3 and the technologies around that are all extensions of web technologies that have been in existence since the birth of the web, so it's very easy to take one of our coders who's used to using JavaScript and HTML, and give them a few books and a few things to play with and get them trained up.

"Whereas if they start coding in native objective C [the language required for iOS development] it's pretty much starting from scratch. Although there are similar principles, it's a completely different language for iOS and then you have to find someone who also can do Java-type programming for Android and so forth so it can get very difficult. Whereas [web development] is one skillset we've already got and then it's just a case of retraining a few people."

Gartner analyst Bill Clark, research VP at its mobile and client computing team, also makes this point. "If I'm a CIO, or if I'm in any kind of IT shop or a software vendor, [web developers] are the most plentiful developers that there are and also they tend to be less expensive than the guys who can do the Java and C++ kinds of things," he says.

RX's Shine says CIOs seeking HTML5 skills either need to train up existing staff or turn to a skilled outsourcer to get the right skills.

"You simply can't go out and hire an expert HTML5 developer," he tells silicon.com. "The few people who can genuinely claim that title are all working in specialist mobile shops. That leaves the CIO with the choice of training up existing staff with HTML and JavaScript skills or outsourcing the development work. Which works best for any given team will depend on the people there and existing workload."

"I would recommend partnering with expert mobile development organisations and looking hard at which of these really understand how to maximise the opportunity, as opposed to those who are just happy churning out bespoke apps for each platform, which are a revenue cash cow for them and expensive for you as the customer," he adds.

HTML5: cross-platform panacea - or not?

The eagle-eyed among you will have noticed the FT's web app is iOS-only - so it's not exactly living up to that HTML5 cross-platform promise. Not yet anyway.

This is because...

...while HTML5 holds out the promise of cross-platform development, additional development work and testing is still required to ensure compatibility across all the different platforms and devices.

So, in the FT's case, the paper chose to limit access to its web app to the iPhone and iPad until it could ensure a good experience across other mobile platforms and devices. Access via other platforms will be rolled out once it can guarantee the experience.

"[HTML5 is] definitely not a silver bullet," says Pinches. "There are fairly significant tweaks you have to make on each platform but they're much less than you'd have to do building native applications. The main issues are around screen size of course. HTML5 helps but it doesn't solve the issue that you're still developing things for small, medium and large-screen devices. Within those three buckets, there are multiple sizes and you have to test across all of those."

"The big challenge for anyone developing web apps - particularly mobile web apps - is testing," he adds. "It's very difficult to automate testing across actual real-life mobile devices. It sounds trivial, but that's a huge challenge - because there's so much more variation than there is on the desktop web. So we have to do a lot of manual testing. And we'd love to automate a lot of that but we're still waiting for the tools and services to catch up. There are a few things out there that can help but it's nowhere near as easy as testing desktop-based apps."

"More and more apps are being built in HTML5... "

The FT has been a front runner in launching a fully fledged HTML5 mobile app. But other companies are already writing mobile apps in HTML5 - even if they end up packaging them in a wrapper of native code so they can sit within a native app store such as Apple's iTunes App Store or the Android Market.

"More and more apps are actually being built in HTML5 - essentially HTML5 apps with a native wrap around them," notes Ovum's Dillon. "[For instance] the Google+ app for iOS: the actual core bit of the app, and even the UI, is running on HTML but it's just packaged as an app so it can go into the app store, and be distributed that way and you can have all of the discovery benefits that come with it."

In the FT's case, the paper began its own web app journey...

...via an Android app it launched last November - built almost entirely in HTML5, according to Pinches. "It was really off the back of that we realised that actually this was quite possible and we could do this to iOS," he notes.

"If you look at what a lot of people are doing they're actually quietly getting on with it in terms of HTML5," he continues. "A lot of native apps that you'll see in the app stores now when you actually look at it, they're built using HTML. They have little native wrappers around them but primarily they're HTML - so people are moving their underlying code bases to web technologies. You can see that happening already."

RX's Shine believes that while it is still early days for HTML5 - he flags up that "it will be years before a stable standard emerges" - it is still worthwhile kicking its tyres and seeing what it can offer now. The company plans to use a mixture of HTML5 and native app extensions in the development of a global integrated mobile ebusiness platform, partnering with a specialist mobile company to create the system.

"It's early days but we feel good about the timing of this development as HTML5 now seems ready for prime time to a much greater extent than 12 months ago," says Shine. "We're exploring how we can use HTML5 mobile web apps offering two levels of service: rich, enterprise-level facilities when connected, and simpler on-the-go task-oriented functions when offline.

"We're not there yet, and we still have to sell the concept to our internal customers, but that's our current thinking."

"The opportunities of HTML5 appear to be significant. I am fairly confident that Reed Exhibitions will bet its mobile platform future on HTML5," he adds.

When is HTML5 not suitable for a mobile app?

There are still some types of mobile apps that need to be built as a native app, as Ovum's Dillon notes. But he says the vast majority of apps aren't...

... doing enough to merit native code.

"A large percentage of apps aren't doing anything too fancy and from the technology point of view could easily be delivered through a web browser. There are a few exceptions - any apps that use any kind of security or advanced graphics like gaming that actually need the performance of being installed natively on the device. But the majority of apps that are purely informational apps or social networking or anything along those lines can actually very easily be delivered through HTML5," he says.

"So we're getting to the point now where the difference between the two is pretty close [albeit] there's still a few gaps that do exist - in terms of performance advantages, and APIs that allow access to sensors on the device."

The FT's Pinches echoes this point. "Generally speaking, anybody who's delivering primarily text and image-based content, there's very little reason to do it in full native code," he says. "Anyone who's not dealing with really, really, really rich content which has to be stored for offline usage would have to justify why they weren't using HTML - they'd have to make a pretty good case for not doing it.

"Even games publishers now. You've seen what Angry Birds has done in the Chrome browser - they released a whole game as an app in HTML5. So if you can write Angry Birds in HTML5 then you should be able to deliver a [text and image-based app such as a newspaper app] in HTML5."

The rise of Webkit-based browsers has given HTML5 a particular leg up in the mobile space, as Google noted back in 2009, in a blog post anticipating HTML5-enabled mobile web apps.

The rate of uptake of the shiniest, newest smartphones has also helped the standard gain traction as newer phones tend to be more powerful - and thus more capable of delivering an app-like web experience via HTML5. Pinches notes that less powerful handsets, such as the iPhone 3G, which were not able to adequately support the HTML5 experience are now less prevalent among the FT's readership, further closing the functionality gap between a native app and a web app.

"Increasingly the [technical] issues we faced six months ago have already been solved," he told silicon.com. "Also new versions of the browsers that are coming out support new features - things like position fix, which allows you to put elements on the page that stay there when you move up and down the page, which makes things feel more like an app - those are being supported in the new version of iOS so it just means we can do more stuff."

Ovum's Dillon also makes the point that even feature phones will be able to access HTML5 apps in the not too distant future. "In the feature phone market, we're expecting to see HTML5 browsers start emerging in the next 12 to 18 months - so they'll start coming online and that will be a whole new area of users that will potentially come on and use your services whithout having to build any new apps or learn any new technologies to write [apps that can address this market]," he says.

HTML5 apps vs native mobile web apps

But is there really nothing a native app can do that a web app can't? "There's not been a feature yet that we haven't been able to do," says the FT's Pinches...

"We've had to be quite creative in the way we've delivered some features but actually there's a benefit to that approach - the constraints that have been put in place by using HTML are actually quite helpful constraints.

"For example, you can only store a certain amount of information in an HTML5 application for offline use but that's a good thing because it means we've had to think very carefully about what data we deliver - which means the user is downloading less data."

The FT's web app does prompt users to increase the amount of offline data it can use to up to 50MB but it can function without this additional increase.

"It's good for their mobile bills, it's faster, it's more efficient. So we've just had to work a little bit harder, and think a little bit harder about how we do it. Whereas with a native app you just chuck everything in there and you get these great big bloated applications.

"Some of the content apps can be 800 meg which is insane and it takes a hell of a lot of time to download those apps. Whereas ours is round about 25, 30[MB] at the top when it's full of content," Pinches adds.

The FT does have another app which is available on the iTunes App Store. This free native iOS app is its companion to the 'How To Spend It' weekend supplement. "Again, it uses a lot of HTML within the application - but it is a native app. The reason really that we went native with that one is that it's a very, very graphically rich application," notes Pinches.

"It's also a free application. So some of the concerns we had elsewhere won't apply and we just take a pragmatic view with every app we launch. [The magazine is] a very different content proposition to the rest of the FT - so the linking between the two isn't quite so important [as with the main newspaper app]. It stands on its own two feet as a product and we really wanted to make sure that we replicated the really luxurious, rich feel and so the native code really allows us to do that."

HTML5: So what are the bad points?

On the disadvantages front, web apps do exist outside the cosy confines of app stores such as Apple's iTunes App Store, with their 'one click to buy' simplicity. Apple's platform also offers...

...in-app payments and its own advertising platform, iAd, furnishing app makers with built-in options for monetising their apps.

Going 100 per cent HTML5 also means going it alone on the marketing and discoverability front. The ability to control one's own app destiny comes with a price: marketing that app without the help of any official channels.

"The big issue at the moment is there is no [HTML5] app store," notes Ovum's Dillon. "An app store brings benefits, not just marketing and discoverability, but for people who've got to make money from [their app] it's also got a pre-built, integrated monetisation aspect to it as well and none of that really exists for web apps and HTML5 apps."

However, this is likely to matter less to big, well-known brands than smaller, less well-known brand names, as Pinches notes: "[Not being in an app store is] obviously not such a disadvantage for big brands who people can find."

The lack of an HTML5 app store is also likely to be rectified in future. Ovum's Dillon believes search engines are likely to close the discoverability gap by offering dedicated web apps search pages to collate and categorise HTML5 apps - effectively creating online app stores for web apps. "Currently you could very easily see [search engines] putting an extra tab on their search, to have a web apps tab. And just categorising web apps within that and having that as part of their search," he says.

On the monetisation front, the future is less clear. "Nobody has really nailed this," says Dillon. "There's obviously PayPal and credit cards but in terms of just having that integrated experience and simplicity which is really what drives app purchases. If the user comes up against any kind of complication or difficulty when they're buying an app, a lot of these are just impulse purchases anyway so they'll just turn away, go elsewhere. So I think that's going to be a critical issue for making [web apps] work."

HTML5 also still has some technical knots to iron out. The standard itself has not been fully ratified - and this is not due to happen until 2014.

One area where it remains fragmented is local storage. "Within the caching spec for HTML5 there's four variations on how to do caching," notes Gartner's Clark. "So if I'm the poor app developer I have to pick one or two of those, and then once I understand how those are supposed to work and then more so as I test my app, I've got to test against [all the] different [mobile] browsers because the spec leaves wiggle room for how the browser manufacturers implement those. So in some sense, all that testing and fragmentation that was at the OS level is now just happening at a layer above, in the browser layer."

By 2015, half of mobile apps will be written in HTML5

Even so, Gartner predicts that by 2015, half of the mobile applications that would today be written as a native app will be delivered as a mobile web app. Research conducted by the analyst indicates...

... that around 40 per cent of enterprises are using native as their primary app strategy versus around a third using HTML5.

"What that says is that today HTML5 is still playing catch up to native development, but in four years it will probably double the market position," adds Clark.

There is a third way: cross-compiler tools such as PhoneGap which purport to offer the best of both native and web app worlds by generating the app in the native language that's needed for each device. The development mantra for cross compilers is 'write once, run everywhere'. However, the reality of cross-compilation is rarely as straightforward as this promise.

HTML5 is at least backed by some very big names - not least Apple and Google. Even Adobe and Microsoft have made moves to support the standard in recent years, despite previously being less than keen on the new web world order.

Hello HTML5 apps, hello hybrid app stores - and better native apps?

Will HTML5 ultimately put native app stores out of business? Not likely, says Ovum's Dillon, who rather sees the rise of hybrid app stores which list both HTML5 apps and native apps as the most likely future scenario.

"The consumer doesn't really care whether they've got a native app or a web app - it just isn't a concern for them. What matters to them is finding it easily, all the benefits that the app store has brought in: having that logo you can go to, single place to access them, nice search and being able to find them, rankings and being able to pay for it easily and download it to your device. That's the benefit that app stores bring for them, the technology's kind of irrelevant," he says.

HTML5 won't kill native apps either, says Gartner's Clark. "Wired networks will always be faster than wireless networks because of the nature of the physics involved. So there's a corollary to that in the development area in that the best user experience will be written native," he says.

"In order to take advantage of [certain device hardware/features] it has to be down at the operating level on the device. And also the fragmentation of devices is not going to go away so there's no way that a standards body like the W3C [which will ultimately ratify HTML5] is going to be able to spec the most compelling awesome user experiences, so that's why Gartner's not saying that native mobile will go away. There will always be room to innovate - to have those ultimate, awesome experiences."

Apple will simply continue to expand what native apps can do to ensure there is a reason to download a native iOS app over and above a web app, adds Ovum's Dillon. "What they will do is continue to innovate their own third-party app platform to attempt to keep it one step ahead of HTML5 apps," he says.

"I imagine what they'll look to do is really keep trying to push the boundaries [where native apps have an advantage over HTML5] and try to maintain an advantage on their native app side - which will hopefully keep drawing developers and users to continue using their proprietary platform."

Building an HTML5 web app now? Read these tips first...

So what tips does the FT's Pinches have for companies that decide to switch from native mobile app development to HTML5?

Firstly, be very sure about...

...your IT team. "You've got to have confidence in your developers - you've really got to make sure they do really understand offline storage particularly, because that's a very thorny and difficult to implement technology," says Pinches. "We've had some serious issues with how we implemented it and we've had to work very hard to make that work. So make sure you've got real confidence in your developers."

Next up, be very clear in communicating to the business what your planned new web app won't be able to do from day one. Limiting the scope of the app will ensure you can build a quality experience for all your users - but you need to make sure the business is aware of any limits.

"Make sure you're very, very clear to the business about what you're building. As soon as people hear 'HTML5' they think cross-browser, they think it's going to work on everything. So I would say be very clear that you're launching an HTML5 app for iOS [for instance] - for Apple devices - to begin with, and that you're going to block it on other devices and then as you're happy with it on other devices then roll it out. So [be sure] the business knows what they're getting. That's very important."

Thirdly, Pinches says, speed is of the essence. It's better to get an HTML5 app to market sooner rather than later. "Try to get it out to market as soon as you can - so you can develop it in a live environment rather than spending ages developing it. Because the mobile market's moving so quickly, if you do that, by the time you've launched it things have moved on anyway. It shouldn't be that expensive to develop so get something out - even if it's in beta. And see whether or not your users like it."

RX's Shine agrees. "All companies should be exploring HTML5 to understand the possibilities - this area is evolving rapidly. Mobile changes so quickly that the notion of too soon doesn't really exist any more, so you've got to catch the trends that are going to be big as early as possible."

"My recommendation is to try every HTML5 service you can to learn about the user experience," he adds. "Make sure you have different devices to try them on and get your business and tech teams familiar with the opportunities and differences. Keeping in touch with these new services means you can engage and challenge your team to deliver to a similar standard."

Lastly, says the FT's Pinches, think about whether you can be creative when it comes to the look and feel of your web app. If you're developing an entirely new app - rather than migrating a native app - you don't necessarily have to try to mimic a native app experience. "We had to make an effort to make [our web app] look like our native application, because we were migrating users and we didn't want too much of a shock. But I think people shouldn't necessarily feel that they have to do that. They should think more about the UI, it shouldn't necessarily have to look like a native application.

"More and more web apps, if you look at what Google are doing, have their own identity - they look like very advanced websites, as opposed to trying to mimic Apple native applications, because they're designed to work cross-platform. [So] what we're seeing more and more is web apps are developing their own identity."

Editorial standards