On 2/14/2018 8:21 PM, Jason H wrote:


Sent: Wednesday, February 14, 2018 at 8:45 PM
From: "Bob Hood" <bho...@comcast.net>
To: "Qt Interest" <interest@qt-project.org>
Subject: [Interest] QML vs Electron

I'm starting to see more and more software being written in, or being ported
to, Electron[1] (e.g., Skype's latest v8 update now uses Electron).  I know
QML is supposed to be Qt's solution to cross-device development, so I'm
wondering if anybody here has had opportunity to actually use both, and what
insights they might have in terms of comparing QML's declarative design to
Electron's HTML5 approach.
I cannot think of a worse programming paradigm. The problem it solves is there is a lot 
of HTML/CSS/JS "talent" out there. That's it. I reject DOM and CSS as the best 
way to do structure and presentation, and JS is a terrible language.

Full disclosure: I'm a hard-core Qt C++ developer, and I've made no secret of
the fact that I'm not crazy about QML.  However, it's getting harder and
harder to avoid having to be cross-device in my development, and while I know
Qt Widgets can run on mobile devices, but it seems like a heavy weight and
somewhat inelegant approach.  Something more designed for the task might be my
only/better option.
I don't see how having a web browser render everything isn't the most heavy 
weight approach imaginable.

On a related note, has anybody done a QML (e)book yet that is focused on its
uses in cross-device development?  The last/only one I saw seemed to focus
only using QML to create interfaces from scratch, and that just turned me off,
coming from the widget-rich environment of Qt desktop.
Widgets are nice, I love them still, but QML is hardware accelerated to the 
core with proper threading. It is unfortunate that QML's UI elements are so 
terrible at actually working and being rendered consistently, as widgets were. 
If we could do widgets in QML, that would be the way to go. The layouts were so 
choice.

Having done X-Platform mobile in Android Native and Qt 2013-2017, it's 
sometimes just easier to just throw it all away and roll your own. The 
platforms have bog differences, there are no physical back buttons on iPhones, 
so you need UI space to compensate. On the good side, this is easy, on the bad 
side, it's not as simple as widgets were - where everyone had the same input 
hardware. On the good side, it is popular to have your own app UI, and there is 
no real platform standard UI layout like widgets had. I so wish I could throw 
something together like in the old days. But UI designers would not have jobs, 
even though the UIs are far less consistent than old. On the flip side, they 
look a hell of a lot better.

Anyway, you can lament it, but that ship has sailed.
If you really want to know what I'm thinking, it would be to ditch JS entirely 
and use ChaiScript in QML.


Thanks for the response, Jason.

If I understand your salient point here, you're advocating the "traditional" approach of just maintaining device-specific, not-necessarily-related code bases that duplicate the same application functionality?  So, use the per-platform accepted coding frameworks -- C# for Android, ObjC for iOS, Qt for dekstops, etc. -- and just develop the required expertise in each area?

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to