2013/03/14

Software Rants 10: The Crossroads of Toolkits, circa 2013

I'm making a prediction - in 5 years, the vast majority of application based software development will be done in one of two environments - html5, or qt.

Those sound radically different, right? What kind of stupid tangent am I going off on now? Well, the biggest thing happening in application world is a transition - the world is slowly getting off the Windows monoculture thanks to mobile, and the most costly shift is that every new device OS, from blackberry to ios to Android to the upcoming Ubuntu Phone and Sailfish, plus the growing GNU/Linux gaming scene and OSX adoption, so the biggest deal is finding a development environment where you can write once, deploy everywhere.

And the only two runners in that race right now are qt and html5. I'd mention Mono and Xamarin, but the C# runtime is so slow and huge on mobile platforms the performance isn't there, and the momentum is moving towards qt anyway. Here are the respective pros and cons:

Qt
  • Optional native performance if written wholly in C++.
  • More practically, write applications in qml (for layout and styling) and javascript, and stick any performance critical parts in C++, and since signals and slots makes the transition seamless, take advantage of rapid deployment and high performance.
  • LGPL apps distribute the qt libraries through a bundled download assistant that will retrieve them once for all local qt apps, so they aren't redundantly cloned. Downside is that with low adoption the downloader is a hindrance for users.
  • Integrates nicely into most toolkits appearances. For example, it uses the options conditional button in Android, and supports gestures.
  • As native apps, qt apps are local, offline capable, and are exposed to the file system and all other niceties of a first class citizen program.
Html
  • Most pervasive platform, but not concrete. qt5 is stable and shippable, and because Digia controls it you can expect forward updates to fall through without a hitch. Banking on html5 webapps means you aren't supported on unupdated devices as much (not that much of a problem in, say, 2 years) but older devices (which tails out more and more as compute power for the consumer plateaus) mean fewer browser updates, and the need to have tag soup trying to figure out what features you have available.
  • Not solid. At all. Webaudio is still sorely lacking, webrtc isn't finalized, webgl is still experimental, and input handling is nonexistent. Local storage is too small to cache any significant amount of an app, especially for offline usage.
  • By being web based, you have inherent access to all the resources of the Internet, whereas qt requires web APIs to access the same things.
  • Inherently cloud based, explicit cloud configuration required for qt.
  • Qt generates installable apps for its target platforms as native local applications. html5 apps are cloud based and thus only as slow as the web page load times to access them to get into. So a lower barrier to entry.
So where is all this crazy "one or the other" mindset coming from? It is becoming increasingly silly and infeasible to use native widget toolkits and languages for every platform you target - what could be boxed up in one html5 or qt app with two skins (one mobile and one desktop) with shared logic and build infrastructure, debugging, and testing, in three languages (qml/js/c++ vs html/js/css) would require, in native form targeting every platform:
  • Objective C + Cocoa for ios
  • Objective C + Quartz for OSX
  • Windows Forms + C#/C++ + win32 for Windows
  • WinRT + C++ for Windows Phone
  • GTK (or qt) + c (or C++) for Linux
  • Java + ADK for Android
  • Qt for Blackberry, Ubuntu Phone, Sailfish (anyway).
With the exception of Windows Phone (which won't succeed, and will bomb pretty bad anyway, and qt could just get platform parity with it if it ever became popular) qt works everywhere, and is actually required on the newest mobile platforms anyway. Likewise, html5 apps will work everywhere as long as you are targeting IE10+, Firefox 16+, Chrome 20+, ios5, Android 4.0+, etc. Qt isn't as limited against backwards systems because it exists natively as a local app.

Nothing else comes close to this device parity of these two platforms. Any new application developer is naive not to use one of these, because all the others listed are dead ends with platform lock in. The plethora of backers of the w3c and Digia are from all these platforms and have interest in promoting their continued growth and the platforms themselves realize that being device transcendent makes them all the more useful.

What I find really interesting is that the interpreted languages of Java / C# are nowhere. Mono is close to being device prolific, but Oracle is a sludge of an outdated bureaucratic death trap and never realizes opportunity since they bought Sun, so they just let Java flounder into obscurity. Which is fine, the language grows at molasses pace and makes me mad to even look at with such critical flaws as no function objects and no default arguments.

But qt does it better, with C++ of all things. I guess GCC / Clang are useful in their architecture proliferation.

Which is one of the main reasons I'm focusing myself on qt, and will be doing my work in the next few months in it. I think it is the future, because at the end of the day, html is still a markup language. It has grown tumors of styling and scripting and has mutated over the years, but you are still browsing markup documents at the end of the day. I just like having access to a system to its core, and qt provides that option when necessary. So I'm betting on qt, and hope it pays off.

1 comment:

  1. Great piece of writing, I really liked the way you highlighted some really important and significant points. Thanks so much, I appreciate your work.

    Crossroads cloud applications



    ReplyDelete