As a dev with a lot of experience in JS/HTML/CSS Electron makes things super easy, especially when it can be part of the regular build pipeline.
Learning Qt means figuring out a whole new stack and build chain. Maybe the result would be better, but with only a few hours a week I didn't feel like it would have been worth the time investment.
For a beginner (that knows C++) I would think Electron is way more difficult than Qt. With Qt you just: 1. Download the Qt SDK, 2. Start Qt Creator, 3. Open an example, 4. Click Run.
I wouldn't even begin to know where to start with Electron. There are so many web frameworks and they're all badly documented... whenever I have to make a website I usually start off thinking "Right, I'll do it the 'modern' way this time - with React or Vue... and Typescript.. and and do I need webpack? and...??" but there's so much badly-documented half-finished stuff out there I usually end up giving up and doing plain Javascript. Doesn't help that the modern web stack is a total hacky mess.
There's a whole lot more to Electron than HTML / CSS and getting started with it is honestly a huge PITA, in my opinion. This is coming from someone well versed in full stack web development who has delivered substantial projects.
This just seems like it's a well designed library for using Qt from Node. If you're going to not using HTML for your UI, not sure it makes sense to market this as an alternative for Electron.
as someone who has done both desktop apps and electron apps, it is much faster to write some html/css and wrap it in electron than to do the same in qt/gtk/etc...
Not to mention, the HTML/CSS combo is possibly the best we've come up with for designing user interfaces.
> It's a lot more work to write platform-specific code without those frameworks
Qt/QML abstracts over a ton of platforms, lets you write UI code in JavaScript, is extremely easy to pick up, has a WYSIWYG drag-n-drop editor and consumes a small fraction of the resources Electron does.
The overuse of Electron is not because everything else is impossibly hard; it's just old-school fashion-driven development.
You realize that maybe for someone, C++/QT isn't a new technology but HTML/CSS/JS are? Or neither are new, or both are new? The person who replied to you was right, you are making the assumption that everyone knows the web stack and knows nothing else.
Electron tries to break the same barrier WebForms did but in the opposite direction. Hopefully it turns out better and doesn't result in a bunch of shitty desktop apps like WebForms resulted in a bunch of shitty web sites.
I want to use html/css/js to create my front-end, Although it is more resource intensive then Qt, it is simply more flexible and has a much richer eco-system to rely on.
Meanwhile the usage of chrome as a run-time is one of the worst parts of electron as every app consumes a lot more memory than a "native" application would need. These days Chrome is so highly sophisticated by now you could easily call it an OS. It comes with a lot of baggage from a Driverstack for Sound, Joysticks and Accelerometers to a whole suite of debugging tools.
Don't get me wrong. Electron is good for what it is: a way to easily write portable apps which can share codebase with a SaaS-Platforms. I would just wish developers would have just taken a different approach e.g. using a more striped down version of chrome or maybe even use Firefox/Servo.
The strong point of Electron is easy _cross-platform_ application development and packaging (spits out .exe, .app and Linux binary), with no further dependencies. Ever tried packaging a QT application for Mac, Windows and Linux? I can tell you it's a painful experience, one I don't want to repeat.
Also HTML+CSS allows for extremely versatile styling and fine-grained control of appearance.
Just last week I added shortcuts to our MacOS and Windows Electron app in about 15 minutes. I didn't read any documentation and I'm not even a developer, just a designer. I can barely make a proper if loop in js and I can't tell the difference between a method and a function either.
Electron is sooo simple. I mean, we've run into some pretty interesting issues like with hardware acceleration and difference in color and font rendering between platforms, but if a guy like me can code, sign and ship a fully functional application, anyone can.
Also, I can really recommend Vue and Quasar for anyone looking at building electron and mobile apps. Really fun!
As a C++ developer who had to learn Javascript and Vue to write an Electron app, it was still faster than writing the same app in QT (which I used before).
> Most electron app I tried have a ratio result/effort far better than any other solutions for the dev.
This is more about the experience of the developer. Anyone familiar with GTK or Qt (possibly others) should be able to bang out a UI pretty quickly, in many cases it will be much simpler than HTML+js+CSS. With Visual Studio you could slap together a win32 app pretty quickly.
But for some reason we decided we had to coddle developers who only know javascript.
FYI Qt like frameworks were here before Electron, this toolkits are not reinventing the Web world for the desktop even if some will use web tech sometimes like JS or cSS.
Also what is the Electron equivalent for QGridView , a table? or you mean Electron + 200+ npm packages, where each project uses different packages and 50% of the packages are the same package but different version
This article seems to miss the point. There's a huge pool of web developers who can write HTML/CSS/JavaScript; Electron lets you have those people use their skills to build desktop apps. It also lets all the others not directly working on the product to write plugins using familiar technology.
The hypothetical business has two choices. Choose Electron, or choose some other toolkit that has native, cross-platform support (like Qt). It's far easier for the business, and the developers there, to take their existing website HTML, CSS, and Javascript; and simply wrap it in Electron (which costs $0), and call it a day. Every other choice is (perceived as being) more expensive.
Qt is a modern toolkit with native-cross platform support, but costs money for commercial use, and businesses and software developers don't want to spend the money on it.
>There are a number of solutions that are either dead or are not ready for production yet, such as React NodeGUI[0], Proton Native[1] or react-native-desktop-qt[2].
Just looking at your 3 examples, I notice they all depend on Qt ... and hence the Qt UI components instead of the more familiar HTML/CSS of Electron.
So the idea of programmers having to learn a bunch of unfamiliar QXxx() like QLabel() etc -- will be a tough sell to gain mindshare. Yes, it's Javascript instead of C++ but the QXxx() will still create a lot of friction for adoption. Also, a dependency on the Qt framework may be worse than Chromium for various strategy/technical/license reasons.
>Is "just stick Chromium into all your apps" seriously the best we can do as an industry? It's resource-inefficient to high heaven,
The complaints about "resource-inefficient" attract a lot of agreement but also ignore the productivity of the developers that get to leverage their existing knowledge of Chromium-based components.
If whatever alternative to Electron has Superior Resource Efficient Technology also comes with unacceptable extra friction (aka learning curve) for adoption, it will then also lose to Electron.
Have you tried developing relatively complex UI with QT? You need to hire a team of engineers and spend man-years of effort to build custom UX that in the web / Electron can be replicated with an npm install fancy-library.
Yes, I hate Electron, but the alternative is not QT; it's something like Sciter.JS with real Web API compatibility (or perhaps a stripped down WebKit2 which is much less resource-heavy).
Learning Qt means figuring out a whole new stack and build chain. Maybe the result would be better, but with only a few hours a week I didn't feel like it would have been worth the time investment.
See for example:
https://nklayman.github.io/vue-cli-plugin-electron-builder/g...
reply