Tim Bray recently wrote a good article titled “Web” vs “Native”. He starts off by saying the debate shouldn’t be labeled “Web” vs “Native”. Any connected “Native” app that makes http calls is a “Web” application. (e.g. App Store, IMDB, Pandora, Maps, etc.) I agree with this point and think the debate should be framed “HTML5” vs “Native”.
The language used to code the majority of mobile applications will determine the ecosystem that will prevail. Currently, that’s native code, meaning you’re writing Objective-C in XCode for iOS and Java in Eclipse for Android. If you need to support the other mobile platforms, then going “Native” truly becomes a nightmare because you need to spread your development resources very thin to handle the breadth of native code you need to write and iterating your product becomes a time suck because you’ve just multiplied your code base by the number of platforms you need to support with very little reusable client code.
Whenever Steve Jobs announces the next iPhone, it’s like the starting gun has been fired for a new race to build the next Killer App to get into the App Store before the next wave of buzz and euphoria. To do this, you need to race with tens of thousands of other developers to reach the promised land of “Top 50” Apps. The earlier you get on the list, the quicker users will want to try your app and keep you longer on the “Top 50” list. How are you going to do that if you’re just not shipping fast enough?
HTML5, on the other hand, is said to be the true promised land. HTML5 is the next evolution of the web page standard to incorporate “Native” application behaviour to websites. HTML5 apps can store files locally on your computer, work offline, know your location, run multiple actions at the same time, display video without Flash, display graphics better, and do a few other things that make web pages look less static and act more dynamic. The great thing is that all major PC and mobile browsers will support the HTML5 standard. This theoretically means you write two HTML5 versions of your app, one for desktop browsers and one for mobile browsers. The two versions will be able to share some code and will work on the majority of mediums your users are on. Beautiful dream, and by and large, I think this will happen but the rollout will not be as clean and dreamy as the HTML5 purists have in mind.
What will push HTML5 apps forward is the decision of the Android architects to support multiple resolutions on the Android platform. Every mobile development shop I’ve spoken to has or had an iOS project that required porting to the Android platform and not one has had a good experience doing the port. The challenge is, UI designers for iOS often used fixed positioned layouts for their aesthetic designs. On iOS, this is not an issue because you essentially only need to design for two screen resolutions: iPad’s 1024x768 and iPhone 4’s 960x640. (For older phones, UI designers scale down the retina images to half size, so 480x320 is not an issue) UI designers love fixed layouts because they have complete control over the screen’s real estate. Asking a UI designer to design for iOS is like asking a fashion designer to create a custom shirt or dress for you. Now you ask the same UI designer to do the same for Android and it’s like designing for you, your younger brother, and your older brother. On iOS you get couture. On Android, you get a hockey jersey; it conveys the message, allows for stretching, but it ain’t pretty. In more concrete terms, the iOS UI will have a customized, polished interface while the Android UI will look like a website, with headers, footers, menubars, and buttons all designed to stretch. Business stakeholders that pay for these Android development resources will not see the cost benefit of coding a UI in native Android when it looks and works the same as an HTML5 app. This will start the train for HTML5 apps.
First, they’ll appear as HTML5 hybrid apps produced with a tool such as PhoneGap. Hybrid apps contain standardized HTML5 code whenever possible, but have non standardized javascript APIs that tap into the native platform’s device capabilities. The major benefit of hybrid apps is that they can be packaged to be delivered to all the major mobile App Stores. This offers mobile developers two ways to distribute their HTML5 apps: through an App Store and through the browser.
Second, there will be one or two dominant libraries/SDKs developers will use to build HTML5 apps, because hand tweaking HTML5 code for every variant of browser is currently too laborious a task. JQuery and Sencha are the two dominant client side libraries that could be the go to library for HTML5 apps. I’m personally rooting for GWT by Google because it’s integrated with Eclipse, it’s a proven SDK used by the GMail team, and the Java abstraction that outputs unique code to the different browsers is a very innovative idea and I think has a lot of legs. Why the GWT team hasn’t already created a set of mobile UI class libraries I don’t understand? It’s a major opportunity in the mobile HTML5 library/SDK space. If someone knows about an open source effort to create a mobile UI class library for GWT, please email me!
So there it is. My prediction is that mobile shops will still code native for iOS because native apps will still look, work, and feel better than HTML5 apps, and all other mobile platforms: Android, Windows Phone, BlackBerry, etc will see HTML5 apps emerge.