[Interest] QML vs Electron

Shawn Rutledge Shawn.Rutledge at qt.io
Thu Feb 15 13:40:45 CET 2018


> On 15 Feb 2018, at 12:23, René Hansen <renehh at gmail.com> wrote:
> 
> In my opinion Qt, (as a company), is directly responsible for the mess that is Electron and todays scape of the app-world. I worked for Nokia back in 2011, when they were trying to build, and miserably failed, the next-gen phone os platform, entirely as a web-runtime. The switch to a Qt/QtQuick approach on top of Meego was such an improvement in speed and overall resource usage. Being able to natively bridge with ease, while still keeping the door open for Javascript devs. was, and still is the single most killer combo out there.

That phone can still be built, and it’s what I want too.  Ubuntu’s version looked promising until they dropped it.  Jolla did their version.  (Now if only they could ship their tablet, and refresh the phone hardware, and sell lots of them.)  Next puri.sm is up to bat.  Everyone is finding it hard to compete with the duopoly though, so far.

> As an engineer, being witness to the rise of Electron based apps, has left me completely baffled so many times. How could Qt have such a major head start and still fail to position themselves, as the de facto cross platform development framework. I mean, they even *had* Javascript, fer crying out loud! I've never been able to come up with a good reason for this. I've resorted to thinking that, either, A, Qt didn't *want* to be dominant in that space, and has spent efforts expanding in other markets or B, they've had one of the worst marketing divisions in modern tech history.

OK, from your perspective are there a few small, achievable features we are still missing?  Or mostly just marketing focus?

> Imo building native apps completely on top of a web-runtime, will *never* be a good idea. I don't care how much Javascript developers, are a dime a dozen, it's just plain bad engineering and I weep a salty tear, when I see something like Atom take a good 6 seconds to launch on my 2015 MacBook Pro, while eating away 359MB of memory, before even opening the first file. (I'm not an Atom user, this is just an example)
> 
> How can that be acceptable, in, any, way?

IMO it isn’t acceptable, and so far it’s still possible to pretend those apps don’t exist.  I hope that continues.

> I know, QtQuick does ship a web-runtime in order to execute JS, but go and try to open the "texteditor" example from QtCreator. It flies open even in Debug mode, and consumes about 24MB on launch. It is an entirely different beast!
> 
> How on earth could Qt drop the ball so hard on this one…

OK so maybe you are kindof focused on text editors or apps that contain editors along with other stuff?

I think maybe a fancier editor (like Creator’s) should be available as a reusable component: as easy as importing it and using it in any QML app.  But management probably doesn’t expect us to make a lot more money by getting us ready for the 1980’s like that (even though text editing is still just as relevant as it was then).

> Every single time I have to run an Electron, or insert-name-of-other-js-based-app, I get that sour grape taste in my mouth, because it didn't have to come to this. I really do blame Qt.

Well the idea that the browser could be used to build applications goes way back… Active Desktop is about the earliest attempt I can remember.  I think the web needs re-architecting too, so having one efficient platform for applications regardless whether they are online or locally hosted is not impossible… but we’re too dependent on the existing web.  Incremental improvements are easier, but won't make it more elegant as long as every layer must remain, for backwards compatibility.  As long as the current web architecture continues, the temptation to make apps portable via browser-based UIs will continue.

You could also blame Java for not becoming the eternal universal platform.  In one way, that game was over way before Qt Quick got started.  And yet it lives on in Android, despite taking so long to get there, and no longer being “cool” by then.

(disclaimer: opinions are my own)



More information about the Interest mailing list