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:

searching for qml calculator on google doesn't take you to a canonical page

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.

Glass Ceilings

Pseudo-declarative means of course that your markup isn’t a rigit declarative form. You can bust out of the declarative form and gain turing completeness inline. Hopefully the transition is subtle in the tech in question. For example, HTML’s hand off to JavaScript is in no way subtle: SAX parsed HTML, with an escape mechanism to YACC parsed JavaScript is ugly, if you know what I mean. There specifically is a place where QML excels. It has a seamless handoff to JavaScript from its pure QML syntax. QML has a glass ceiling though - true heavy lifting for it is done in C++ - a language that the majority of developers are not productive in and won’t be after some effort.

Node.qml

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

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.

Google’s Flutter.io

One day you’ll just be able to search for ‘Flutter’ but Google UI tech hasn’t taken over the search ranks yet. It is a new and very compelling pseudo-declarative UI techology. It is aiming at all the same categories of solution that QML is. But whereas QML is GPL and commercial dual-licensed, Flutter is BSD licensed. Flutter has a few examples, but they are not standalone. They’re also not single scripts, not intuiitive given Dart is the language Flutter sits on, rather than JavaScript. Time will tell whether Flutter gains traction, and whether its examples get repos of their own, and gain siblings in the single-script intuitive style. Time will also tell whether Flutter has glass ceilings that impede adoption.

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).



Published

November 15th, 2016
Reads:

Tags

Categories