Paul Hammant's Blog: QML's Squandered Opportunity
TL;DR: QML has glass ceilings and few cohesive standalone examples. That’s enough after seven years to impede it’s adption enough for new entrants like Google’s Flutter to side-swipe it.
Standalone, simple examples missing
I blogged about Qt Markup Language (QML) in 2009 (link). It was a week before buddy, Miško Hevery, launched AngularJS. QML was formerly known as ‘Qt Declarative’, and before that ‘QtQuick’, with it’s earliest name being ‘Kinetic’. Back in 2009, I highlighted a calculator app that was spread over several source files. The app still exists but it’s hard to find a canonical place for it online, that’s easy to clone, build and launch:
Use of HTML’s Canonical link element could de-dupe
It’s not even a short example when you find it - it is many files. Successful showcasing of new pseudo-declarative UI technologies requires you to put everything in a single source file, in my opinion. Sure, you’d not make Photoshop like that, but it rams home the simplicity of your tech in a single script, with the reader assuming they can modularize later.
Oleg Shparber made Node.qml, which is a stroke of genius merging of two technologies to avoid that glass ceiling, but it lacks forward direction for now. Oleg found it hard to keep abreast of underlying QML framework changes. Code for that is here if you’re interested.
AngularJS web apps (moreso than Angular 2.0) can be marked up in a single source fragment. Here is Ashish Singh’s AngularJS calculator inlined in this page:
That’s discussed in another blog entry of mine from six months ago. That blog entry includes the 190 lines of source in a single div (all hacky prior to a proper WebComponents implementation). Angular’s adoption over the same timeframe was huge of course. It was easy to get into, and the glass ceilings were fewer given you understood that web-apps have limits on what they can do.
If you’re going to hook people in to your technology, it is via single script / or self-contained examples. That’s how it was for me with Angular in 2009 - admittedly not a calculator app.
Tutorial and reference doc obsession
Many if not most technologies that are pitched at the masses think they can get to their adoption goals via tutorials and reference documentation only. Many leads of open source techs sell things in the same way they’d buy them, and insist on focussing only on those two. Sigh.
Examples and pairing
There are lots of us that need a third way of growing in understanding of technoligies: through accessible and focussed examples. There’s a fourth way too - learning a technology through pairing with someone with expertise. For me, I prefer that way (where I’m not shamed for not knowing the tech already). In lieu of pairing, I like tight self-contained examples (the major theme of this posting). The obsession with tutorials and reference docs (without copious examples) is like a blind spot sometimes. Stackoverflow is proof of my point: examples first, with explanatory notes. In fact that style dominates there. There are barely any tutorial style responses to Stackoverflow questions, and links to reference docs are offered only where they’re decent (they have copious examples).