"New open standards created in the mobile era, such as HTML5, will win on mobile devices (and PCs too)." – Steve Jobs, April 2010
By Chris Witeck, Principal Technology Strategist at Citrix
When Steve Jobs wrote these words back in April 2010, he brought forth HTML5 into the mainstream and ushered in a whole new conversation, and often a debate, on the role of open vs. native development tools and the value of building native apps or building for the mobile Web. Here we are, over 4 years later, and where are we now? Have open standards like HTML5 simplified development on mobile platforms, making it easy for mobile developers to target content across multiple device platforms? And are they writing for the web? Or are they writing hybrid apps that use open standards combined with some sort of native app wrapper? This can be a hard set of questions to answer since there are many different considerations involved, and often the answer is: "It depends". In this article we will look at some of these considerations; we will examine current usage of mobile developer tools, and also look at an example of how Citrix Labs approached mobile development to solve a particular problem.
Developer Economics produces a quarterly report that researches the mobile development market. There is plenty of good information in this report regarding current trends in mobile development. However, at first glance there appears to be some contradictory statements in the data:
So is HTML5 the most popular mobile development language, or is it further down the list? If it is not being used to target content for mobile browsers, what is it being used for?
In reality, the data is not that contradictory when you dig deeper. When you look at development languages by platform, you see that primary development platform relates to the primary device platform the developer is supporting. For example, an iOS developer prefers Objective-C whereas an Android developer prefers Java. HTML5 is then used as a secondary platform, either to complement their primary platform or to more easily build Hybrid apps, which are apps that combine HTML5 with native code. This makes it easier to support platforms outside of their primary focus by leveraging HTML5 to support multiple platforms yet still using some native code to publish apps using the app store distribution model that consumers are familiar with.
Will we see more mobile developers focusing their efforts on hybrid apps to extend their platform reach? The answer here can also be categorized as "it depends". It depends really on the target audience, and the type of app being produced.
Developers writing consumer focused apps will continue to do quite well writing native apps just for iOS and Android as many consumer focused developers are often quite content to pick a popular platform and stick with it. It keeps things simple and the compensation for popular titles on iOS or Android can be quite lucrative.
However, in today's Enterprise there are different constraints. With BYOD (Bring Your Own Device) or CYOD (Choose Your Own Device) increasingly the norm, a successful Enterprise app likely needs to support multiple platforms out of the gate, something my colleague Simon Farrugia pointed out where he wrote how multi-device work is the norm in the workplace. This was also reinforced recently by Gartner who suggested that Hybrid apps will be the majority in the Enterprise by 2015 whereas consumer focused apps will have a more even mix between native and hybrid approaches.
So this infers that Enterprise app developers will be the ones investing in HTML5 as a viable development option to reach all of the devices that workers are brining into the Enterprise, but how good is HTML5 as a development platform for targeting the Enterprise use case? This this next section delves deeper into a Citrix case study where the Citrix Labs team used HTML5 and the lessons that were learned.
If I were to quantify the Citrix approach to mobile app development and the tools we use, the answer would again be: "It depends". However, I can tell you the direction in which we are headed. With our focus on "Mobile Workspaces", we have stated clearly that our focus is ANY-ANY-ANY.
"Allow any app of any era to work on any device, from anywhere"
So this definitely means we will be increasingly focused on delivering experiences that meet this mantra, and this will require investments in tools that allow us to deliver apps that work well across any device. One recent example is the Citrix Talkboard app.
Talkboard is a simple and intuitive Whiteboard app that allows collaboration amongst multiple app users. The current version is only for the iPad. Given the historical dominance of the iPad, starting with iOS to test a concept definitely makes sense. However, the dominance of the iPad is being challenged as other tablets work their way in the market.
As we mentioned above, in today's enterprise it is important to support multiple platforms, especially with an app designed to support collaboration amongst multiple distributed users. So the question then is, what to do next? Does it make sense to pick another popular platform, like Android, and develop a native app? Or is this a case where HTML5 makes sense to write once for multiple platforms? Asking a question that way it sounds like a simple answer, write once with HTML5 and be done with it. However, the answer is not that simple.
While the premise of HTML5 is simple, an open standard for all mobile platforms (as Steve Jobs alluded to), in reality things are a bit more complex. HTML5 is not really a single unifying development language or tool but is a collection of different features that have different development lifecycles. Different browsers are phasing in support for these features at different rates. Also, while HTML5 is an open standard, it is still not yet fully defined and agreed upon as multiple standard bodies are weighing in. (See these 'Five Myths of HTML5') So with the question we just asked, if it makes sense to use HTML5 to write once for multiple device platforms, the answer comes back to the phrase: "It depends". It depends on the functionality of what you are trying to develop matched against the current lifecycle of HTML5 features and browser compatibility.
Coming back to the Citrix Talkboard app, in this case would it make sense to create an HTML5 version to extend support beyond the iPad? It turns out much of the collaboration features embedded within Talkboard are dependent on specific HTML5 features that only recently started to become mainstream. I talked to Shashi Uli, a Senior Manager of Product Development within Citrix Labs, regarding the evaluation of HTML5 as an option for Talkboard, and here is what he had to say:
"Various HTML5 features in browsers have been lit up in stages, Chrome being first adopter, Safari being the last. Some of the first features supported things like basic canvas2D support - writing simple lines/shapes and JPEG images on a canvas, which is what our Citrix GoToMeeting and the HDX Citrix Receiver HTML5 clients initially used. These capabilities have been around for a few years now. However, for Talkboard we needed additional capabilities. WebGL, which for example is now used by the HTML5 Citrix Receiver, was the next step in HTML5 support that allowed us to do OpenGL like 3D graphics right on a browser canvas. Talkboard for iOS uses OpenGLES for iOS and the Talkboard HTML5 version needs WebGL. The APIs are very similar. WebGL is what makes the beautiful brush strokes in talkboard possible, as opposed to flat looking lines. However, WebGL only recently became an option for us as WebGL support within key browsers, like Chrome, IE and Safari, only occurred in the last year or so."
So while it may not have made sense to look at HTML5 several years ago when we were developing the Talkboard iPad app, feature and browser maturity have reached the point where it is worth considering. The Citrix Labs team recently did take on the development effort to create a Talkboard HTML5 prototype and the results are encouraging. As this video shows the user experience looks identical between the native iPad app and the HTML5 browser experience.
So does that mean we are done and should take our Citrix Labs prototype and release it? There are still more questions to consider. Do we release Talkboard for HTML5 as a browser app, meaning users would need to launch their mobile browser and navigate to a bookmark? Or do we go the hybrid app route mentioned above and combine the HTML5 code with native code so it is easier to put Talkboard into an app store that consumers are familiar with?
Going the hybrid app route may appear as the better option since consumers are typically accustomed to downloading apps from an app store, but in this case it may be the more complex option. As we have discussed, a hybrid app is essentially a native app wrapper around the browser. The way this usually works is that the native app wrapper will use whatever default browser is on the device, and that is where the complexity comes into play.
The Google Chrome browser has quickly added HTML5 features, and was one of the first to add WebGL support. Yet Google Chrome is most often not the default browser on a Google Android device (especially older devices), a separate Android browser is. In the case of the Talkboard HTML5 prototype we were just discussing, the WebGL component required is supported on Google Chrome, but is not supported on the Android browser. Additionally, it is also not supported on the underlying WebView that Android developers can use to deliver web components as part of a client application (not supported as of Android 4.4 KitKat, but future support is promised with an upcoming version currently available to developers). So a user using Talkboard packaged as hybrid app on an Android device will find that it will not work, even if that user frequently uses the Google Chrome browser on that same device. This is not just a problem for Android devices, we've seen similar complexities on other platforms as well.
Based on our experiences with the Talkboard HTML5 prototype, you could argue that we should shy away from HTML5 given the complexities we have encountered. However, at Citrix we are focusing hard on delivering user experiences that work on any device and HTML5, despite the underlying challenges, is evolving in a promising direction to support this goal. We plan to actively leverage HTML5 in certain situations and evaluate platform and feature maturity issues that may stand in the way. In the case of the Talkboard HTM5 prototype, we plan to move forward with an updated prototype as soon as the needed features make their way into the devices. So to answer the question of native app vs. browser app vs. hybrid app and where HTML5 fits into all of this, the answer is of course: "It depends".
Citrix Labs is an applied research organization within Citrix. To get updates on what the Citrix Labs team is following as well as projects the Labs team is working on, you can subscribe to the Citrix Labs LinkedIn group.