Just as in the ’90s, there’s a bunch of hype these days around solving the cross-platform development problem. Mobile platform fragmentation is killing developers, and if only every device supported some common language or technology engine we could all Write Once and Run Anywhere.
WORA was, is, and always will be, a fallacy. WORA reminds me of the mole in whack-a-mole. It just keeps popping up and the realities of competing platform vendors keep whacking it back down. What drives me crazy is not the “Run Anywhere” part that most people throw out and replace with something else (like “Optimize Everywhere” , “Suck Everywhere”, “Test Everywhere”, or “Outsource the optimization“).
It is the “Write once…” part that’s the most dangerous. We all wish the world was rainbows and unicorns, and “Write once…” implies that there is a world where you can actually write an app once and it will run on all devices. But this is precisely the fantasy that the platform vendors will never allow to become reality. Stop asking for it.
“Mobile fragmentation is going to get significantly worse over the next few years. While this fragmentation will be bad for end users in some cases, it will be particularly bad for developers.”
– Me on LockerGnome, Oct 22, 2012
HTML5 is awesome in many ways. If applied judiciously, it can be a great technology and tool. As a tool, it can absolutely be used to reduce the amount of platform specific code you have to write. But it is not a starting place. Starting with HTML5 is the most customer unfriendly thing a developer can do.
“We start with the customer and we work backward” – Jeff Bezos
“… you gotta start with the customer experience and work backwards to the technology.” – Steve Jobs
Like many ‘solutions’ in our industry the “Hey, write it once in in HTML5 and it will run anywhere” story didn’t actually start with the end-user customer. It started with idealistic thoughts about technology. It was then turned into snake oil for developers.
Not only is the “build a mobile app that hosts a web view that contains HTML5” approach bass-ackwards, it is a recipe for execution disaster. Yes, there are examples of teams that have built great apps using this technique, but if you actually look at what they did, they focused on their experience first and then made the technology work. What happens when the shop starts with “we gotta use HTML5 running in a UIWebView” is initial euphoria over productivity, followed by incredible pain doing the final 20%.
Developers really want to believe it is possible to “Write once…”. They also really want to believe that more threads will help. But we all know they just make the problems worse. Just as we’ve all grown to accept that starting with “make it multi-threaded” is evil, we need to accept “Write once…” is evil.
There is no “Write once…”. I wish there were. I know you wish there were too. But I wish my daughter had a baby unicorn to ride too.
There is, however, “Focus on creating the best possible user experience on each device and try to get as much code re-use as you can along the way.”
Focus on the experience, try to get code re-use.
Not as catchy, but far, far, more realistic. And helpful.
Edit: February 22, 2013 – Shortened title to make it less inflammatory.