Leadership, Software Development, Tech Industry, &c

The Polyglot Requirement: Another Argument Against HTML5 For Mobile Apps

After being hailed as the next big thing for mobile applications, HTML5 has suffered a series of setbacks in its quest to dominate application development for post-PC devices.  High-visibility episodes from big social companies, insightful rebukes from industry experts, and critiques aimed at “always-on” connectivity demands have all served to tarnish HTML5’s reputation as a viable mobile platform.  Today, as I reminisced about an editorial that made the rounds recently, I wondered if we should add “the polyglot requirement” to the list of drawbacks imputed to HTML5 regarding mobile development.

Arguments Against HTML5 for Mobile Development

Expanding on the arguments against HTML5 for mobile, we have:

  • The performance argument.  This was brought up by Facebook a while back, when they did an overhaul of their mobile apps.  Mark Zuckerberg publicly stated that focusing on HTML5 had been the company’s biggest mistake.  Some people took issue with this; notoriously, the folks at Sencha came out with Fastbook, an HTML5 re-make of the Facebook iOS app that was ostensibly faster than the company’s own brand-new native iOS app.  However, Zuckerberg’s viewpoint seems to be the dominating trend, whether by direct influence or by independently reasoned consensus
  • The UX argument.  A notorious argument against HTML5 for mobile apps has been put forward by software guru Martin Fowler.  Martin argues that mobile apps should cater to the uniqueness of each platform’s visual and interactive paradigms, instead of trying to offer a uniform non-native look and feel across platforms (feeling strange in each one of them), or emulating each platform’s native look and feel, which may incur in the “Uncanny Valley” phenomenon and negate the economies wished for when using HTML5 as a cross-platform tool
  • The connectivity argument.  As entire mobile operating systems are built on the premise of HTML5, such as Tizen and Firefox OS, critics have argued that these systems will experience significant issues due to connectivity requirements.  Given that iOS and Android dominate the high-end mobile device market, the expectation is that the emerging players will try to take up markets where smartphone penetration is low and conversion from “dumb” phones still offers substantial growth opportunities.  However, those markets may not offer the kind of widespread and affordable connectivity that more developed markets do, bringing into question the actual capabilities that HTML-only devices can bring.  (A similar argument is brought up often against Chrome OS)

Enter The Polyglot Argument

I’m not going to discuss these arguments in detail.  Rather, I’d like to point out another, recent argument that may be added to this list and which I think may be resonating with a lot of independent mobile developers and companies thinking of getting into this space.

In his April 3rd editorial for Dr Dobb’s, Andrew Binstock put forward what he terms is a “quiet revolution” happening in programming; namely, that we now need more than a programming language to develop most applications.  Web applications, in particular, are notorious for this: you typically need to develop different layers in different languages (though some frameworks may offer ways around that).  So I wonder: can this also be another argument against mobile HTML5 apps, and maybe a particularly strong one with developers at that?

An interesting fact about mobile application development is that it’s more similar to traditional desktop application development than to client/server or Web development.  In the 90s, developers thrived by knowing well a single programming language or development environment, as most software was desktop-based.  As the 00s rolled in, the Web became the preferred medium for application development and delivery, and with it began the move towards “polyglot programmers”.  The Delphi or Visual Basic developer of yesteryear suddenly found herself knee-deep into HTML, CSS, JavaScript, and some server language such as Java, C# or PHP (with a good dose of database development mixed in as well).  This came on top of other technical difficulties faced when developing high-quality Web applications, exacerbating for many both the effort of the transition and of the ongoing development work.

When the iPhone launched in 2007, Steve Jobs was initially reluctant to open up native app development capabilities to third parties.  He envisioned a world were applications would be Web-based.  However, after some hesitation Apple eventually came up with the App Store, and we all know the story.  In a sense, mobile development brought along a nostalgic return to the time of single programming language, single-process “thick client” development.  To this date, mastery of Objective-C or Java gives you all the foundation you need to develop great iOS and Android applications, respectively.  (Note well I said foundation - there are many other skills and knowledge required in order to develop truly great mobile apps.)

Unattractive For Both Desktop And Web Developers

Therefore, for desktop developers, the burgeoning mobile app market was a boon.  They had to develop deep skills on a new platform - but it was a single, fairly integrated platform, and it was enough to take on virtually all aspects of mobile application development. It was another iteration of their normal skills upgrade cycle.  To this audience, the idea of using HTML5 to develop mobile applications is a throwback to the disruption brought upon their trade by the Web over a decade ago.

But what about Web developers?  Surely HTML5 would seem a nice path to port over their skills from the Web into “native” mobile, right?  In theory, yes.  As complex Web applications inch closer towards “thick” clients, the required skills to excel at creating them are indeed quite similar to what modern HTML5 mobile app development demand.  Unfortunately, there’s much more to it than that:

  • Device resolution fragmentation. While Apple manages to keep it mostly at bay by virtue of its vertically integrated model, and Google provides more or less appropriate tooling to deal with this on native apps, it is complicated to bridge this properly in an HTML5 application.  Fully possible, but complicated
  • Inconsistent feature support. Hardware-accelerated CSS support is critical for high-performing, visually-attractive HTML5 mobile apps - but far from pervasive.  Browser differences abound - desktop browsers have learned to keep themselves up to date and thus you deal with less variants, but mobile browsers, stuck in hopelessly outdated operating systems and buried under custom skins, provide plenty of variety and the trouble that comes with it
  • Mixed development paradigms. HTML5 mobile application frameworks do their best to keep developers working within that layer, but many times one has to delve down to the native underpinnings of the platform to accomplish even basic tasks.  Integrated notifications, native widgets for complex data input,  storage that goes beyond the browser’s local storage API, all call for tapping into the native APIs and toolkits.  Hence, a Web developer that begins developing for mobile using HTML5 may soon feel as if she’s actually writing two applications: the HTML5 “chrome” or UI layer, bound through JavaScript to the native bits required to fill in the gaps.  Even worse, the tendency is usually for the application to have progressively more functionality moved to the deeper, native layer.

I fully realize that these issues are general to HTML5 mobile application development; they do not exclusively affect Web developers that are moving into mobile.  But they may prove more frustrating to Web developers lured in by the promise of an easy transition.

HTML5 On Mobile Is Far From Dead - It’s Just Too Hard Right Now

I still think that Steve Jobs was right: there is a future where we’ll have robust, rich mobile apps written in HTML5 - and instead of the exceptions they are today, they will be the standard.  But in the meantime, there are many technical hurdles to overcome.  In the realm of development, particularly, the tooling and overall software engineering support is fragile.  The polyglot requirement only adds to the complexities faced by developers attempting to board this revolution.  Until achieving high-quality results with HTML5 on mobile doesn’t require so much effort, it will remain a niche development choice on this space.