by drinchev · 8y ago · 0 comments
First, the author is not doing this for his CV.
Second, the benefits of using electron are enormous for any JS developer and there are a lot.
Third, I also hate electron apps and wouldn’t use this app, but I’m not going to jump back to “why electron is bad” discussion, since I can’t suggest anything better in 2018.
I think they are still unmaintained and also are lacking the community around it. I think GitHub embracing Chrome-wrapped-apps was a significant move, since no other company did something similar for desktop javascript applications.
Maybe we will need to wait a bit more, until some of the big tech companies realises that having better QT / GTK bindings and build tools, examples, proper documentation will benefit a lot the company and the community around it. Until then, we are stuck.
That seems to be one of the main drivers behind Electron's popularity, others being easier cross-platform support (or at least the perception of that) and the vote of confidence in its stability from the likes of MS using it in their products (primarily VSCode in MS's case).
What would be your alternate suggestion, and why? (genuine question rather than a rhetorical dig: I plan to tinker with Electron for a couple of projects soon so if there is something better (or simply that is a suitable alternative to consider) out there I'm not aware of, I'd like to be made aware)
* package management and modules actually work
* huge ecosystem of packages
* ability to use native code modules in needed
* has webassembly too
* runs a huge range of other languages. It can fill a role similar to the JVM and .Net runtimes in this respect.
Learn a new language (Python/C++/other) in order to learn and use a different framework (Qt)? Thanks for your advice I'll down tools right now and get on with that using my time the way I want to.
(Actually I've never developed anything using Electron yet, though some personal projects may get implemented that way in future should they ever get off the ground)
I fully understand much of the criticism of Electron and similar: the results are rather bulky in terms of both package size and memory use (and if you aren't careful sometimes CPU use) which can add up to quite a performance hit if running a number of small apps/tools that are large because of the framework. For interactive (or script-called) non-resident utilities startup time can be a significant issue too.
But there are a lot of entitled people out there who seem to be of a mind that because they don't like Electron (for those reasons or whatever else) they have the right to demand that developers stop using it. If you don't want to use an Electron driven application then the solution is to not use that Electron driven application. There are no doubt alternatives out there. If not then the deep knowledge you have that makes you an expert on why it would be better developed other ways should allow you to write your own and compete.
This is true for both paid-for services like this (show them who is boss by collectively voting with your wallets) and free and/or open source options (in which case making demands of the creator/maintainer seems even more egregious IMO).
</rant>
well it might in relative terms, but a pyqt app is almost certainly going to be an order of magnitude faster than electron.
But pyqt apps are way faster than electron
If you think Python and JS are about the same speed then it is because of Qt itself, but certainly not because of CPython.
This will allow you to fully interoperate Qml and .NET (Mono/.NET Core/Full Framework).
Qt had pretty good Java support with Qt Jambi. But nobody cared and they cancelled the product.
Disagree. I'd argue using Electron actually holds back developers, because they don't learn languages other than JS.
First of all, JS isn't a bad language. It's also a lot different in 2018 than at its worst in 1998. It's becoming so common because it is a pragmatic choice that is fine to work in in 2018.
Secondly, there is the giant ecosystem of transpile to JS languages: Typescript, CoffeeScript, PureScript, Elm, Haxe, Fable, etc.
If that doesn't count, Electron's duct tape itself and many Node packages are native code in C/C++.
Further beyond that, Web Assembly is already expanding the language diversity in the Node world. An immediate example is that the major source map processor used by a number of debugging projects (including VSCode) has already moved parts into Rust via Web Assembly: https://hacks.mozilla.org/2018/01/oxidizing-source-maps-with...
Is "continuing to use JS skills" a bad thing? What makes "branching out into other things" a better thing? We will likely continue to disagree that JS is a bad language. While I agree that learning a gamut of languages is a good idea for any developer (and will heavily encourage devs to challenge themselves to try to learn different languages with different paradigms to keep from growing "stale", to keep up lifetime learning), it's not positive or negative value for a platform like Electron if it "requires" learning a new language to use it. Do you maybe think people are more likely to learn JS as a first language? That too is an interesting assumption.
Beyond those value opinions, existing JS skills may not be the only reason to use Electron. Existing HTML/CSS skills may be the more important reason for some developers. Cross-platform GUI toolkits haven't kept up with HTML/CSS in a lot of areas including ease of testing and availability of designers with design skills. Use of JS may be entirely orthogonal to that decision.
(Certainly in my own usages of Electron, that has been the larger factor. Xamarin seems like the next best bet, but it's still a lot easier for very small teams with no platform-specific UI designers on hand to audition design work in a handful of browsers than to bounce back and forth between a variety of iOS and Android emulators and devices.)
Whether or not that it is "very few" people using Electron today that don't also want to directly use JS is a demographic question that you also seem to conflict with some sort of value judgment. Even if "very few" people are using anything more than "just JS", that doesn't mean it is valueless that people have an option to leverage Electron with other languages.
Even if demograghics did matter, I already pointed to a case where Rust-sourced code is shipping in major Electron apps (I know VSCode has dependency, I believe Atom has a dependency). VSCode is written entirely in Typescript, and I don't think it's the only major Electron project doing so (and if we start to play the dependencies game, a lot of Open Source in the Node world is Typescript). Even Atom seems mostly "vanilla" JS, but still has ~7% of its source in CofeeScript, and its "vanilla" JS has a lot of ES2015+-isms that would look unrecognizable to older versions of JS, and I've heard it argued that ES2015+ starts to be a different language than what a lot of people that have not followed JS in the last few years imagine when they discuss JS.
"Thing X is bad because it discourages people from learning about things which are not X."
I would argue that JS platforms actually make it much easier to try out other languages because change languages while keeping the rest the same. Tons of languages compile to and/or run on top of JS.