4 ms·
Is it actually faster to develop in Electron than with QT and C++? It has been over a decade, but I remember it being both straight-forward and pleasant to sup
by nieksand 8y ago
Is it actually faster to develop in Electron than with QT and C++?
It has been over a decade, but I remember it being both straight-forward and pleasant to support Linux, Windows, and MacOS. I vaguely recall supporting Solaris too.
- mosselman 8y agoI don't know about QT and C++, but a while ago I wanted to try out Electron and I just could not figure out how to build anything with it.
- babuskov 8y agoWeb developers using Electron probably count in the time to learn C++ vs the fact that they already know web stack. ;)
- 781 8y agoAs 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).
- pooya72 8y agoHow and why was it faster? Did it have to do with the tooling?
- deleted 8y ago[deleted]
- jschwartzi 8y agoOf they can just use QML and use JavaScript and a declarative language for their UI.
- laurentl 8y agoI just realized this morning that JavaScript is the new Java. js targets the browser (angular, React...), the back-end (node), the desktop (Electron) and mobile (React native). Just like the Java of old with applets, javax, JME, and of course weblogic and friends, js today allows you to code anything, as long as you don’t mind doing it badly, insecurely and/or wastefully. Due to this ubiquity, a large majority of job openings list js in one form or another as a prerequisite (remember when entreprise code was synonymous with Java?) Once you know enough js to be dangerous, there’s little incentive to pick up another programming language.
- pooya72 8y agoThat's a good comparison, and I think I should qualify my statement. It's the fastest way to develop cross-platform apps when you already know web development. I've only done some trivial apps with QT and Python, and it was pretty straight forward. The UI didn't look as nice as it does with Electron. I'd be interested to hear someone's opinion who has real experience with both. edit: u/781 has some experience with both and says Electron was faster to develop, his comment is below: https://news.ycombinator.com/item?id=19652691 https://news.ycombinator.com/item?id=19652691
- rhodysurf 8y agoYou can style the Qt GUI same as you would style the electron GUI so that’s a false equivalence kinda
- Benjamin_Dobell 8y agoTo be fair to Electron, Qt is an enormous dependency as well. Not as memory hungry at runtime, but Qt 5.12.1 frameworks for macOS are over 260MB. Granted, Qt is at least modular so you don't necessarily need them all. However, given macOS apps don't really support shared libraries (at least in the typical sense), it adds up pretty quickly if you've got a few Qt apps.
- pknopf 8y ago> 260MB That includes all the tooling/headers/.a/etc. See this for the accurate size for the Qt runtime: https://github.com/qmlnet/qt-runtimes/releases https://github.com/qmlnet/qt-runtimes/releases Windows - 43MB OSX - 32.2MB Linux - 57.6MB
- Benjamin_Dobell 8y agoThose are compressed figures (.tar.gz). Decompressing the OSX 64-bit runtime frameworks from there yields 85 MB. Which is less than the figure I had, but I believe is roughly in the same ballpark as the Electron runtime[1]. My original figure was probably debug frameworks (it's whatever Homebrew installs by default). However, I'd already excluded the tooling. [1] https://github.com/electron/electron/issues/2003 https://github.com/electron/electron/issues/2003
- pknopf 8y agoOops, good catch, brain fart. But yeah, 85MB for a complete UI runtime seems entirely acceptable to me.
- 781 8y agoAs someone who wrote GUI apps in most of the frameworks, starting with raw Win32 and MFC, yes, doing a GUI in Electron is massively faster, especially if you use modern frameworks like Vue or React.
- pknopf 8y agoYou don't even need to know C++ to write a Qt app. See Qml.Net (https://github.com/qmlnet/qmlnet https://github.com/qmlnet/qmlnet), or PyQt.