What’s the Problem with Mobile HTML5?
A recent research concludes that contrary to the general belief performance is not the main problem with HTML5 but rather the missing of profiling and debugging tools and the lack of certain APIs.
After surveying over 6,000 developers worldwide, analyzing 30,000+ Android Play apps, reviewing 42 HTML5 frameworks and tools, and interviewing 32 top experts on the subject of mobile HTML5 vs. native, VisionMobile has come to a number of conclusions published in the How can HTML5 compete with Native? research report, the most significant findings being covered in this article. The report distinguishes four main routes to market used for HTML5 applications:
- Mobile Browser – web apps or websites tailored for mobile devices and running in a mobile browser
- Native Wrapper – web apps packaged in a native wrapper and delivered through an app store
The key findings of the report are:
- 61% of the developers write for the mobile browser
- 63% of the US Android Play applications cannot be written in HTML5 for the mobile browser because some APIs are not implemented by the browsers yet
- the 37% of US Android apps that could be implemented in HTML5 would become 58% if the browsers would add support for Power Management and WiFi APIs
- 39% of the developers create HTML5 apps for the other 3 routes to market beside the mobile browser
The following chart shows what makes HTML5 attractive:
What developers complain about HTML5 is shown in the next chart:
The most used APIs by US Google Play apps are:
The current HTML5 APIs standardization status and browser adoption is depicted in the following graphic:
The next table indicates the APIs that would make the most difference if implemented for their respective route to market, showing how many more apps could be implemented in HTML5 if that happens:
Route to market
|API||% of apps|
|Mobile Browser||Power management||13%|
|Native Wrapper||Power management||12%|
The report concludes with a number of observations and recommendations for the HTML5 space:
- Browsers should implement more HTML5 APIs starting with Power Management and WiFi. Developers should push browser vendors to implement more APIs.
- A device identity API should be developed to alleviate the fears related to cookies and privacy concerns
- Developers should be better educated regarding the possibilities offered by HTML5, the real advantages and drawbacks
- A Debug API should be developed to enable the creation of a set of debugging tools
However, all the profilers in the world won't help.
Reflows are an inherent flaw in HTML which was designed for documents not for apps, sure you can workaround it by positioning everything absolutely but this is tedious, error prone and not realistically doable. Its over abstracted and this just can't be fixed by any magic of a better rendering engine, JIT or hardware.
There is room for all - HTML5+JS; Native; and Cross-Platform Native (Xamarin)
A better cross platform option is Xamarin. Cross-platform code sharing is about 70% (in my experience) and performance is good.
Dimitar Bakardzhiev Mar 29, 2015