5 ms·
I read the business case section and... I got the rationale right up to the point where it says "You can just pass the cost down to your customers" and compared
by rcarmo 9y ago
I read the business case section and... I got the rationale right up to the point where it says "You can just pass the cost down to your customers" and compared it to my feelings regarding delivering quality solutions.
Electron is a crutch. A crutch that people resort to because it's effectively impossible to write quick and dirty cross-platform desktop apps in anything else, but, worse still, a _debilitating_ crutch that, unless you know what you are doing (and I daresay that is something people should be looking into) delivers overly bloated, resource-guzzling apps that wreck usability, battery life and (most visibly) RAM in _any_ OS.
I don't have 16GB of RAM everywhere. Statistically, NOBODY does, in the sense that the average user (who is not, usually, a developer or a power user) is probably using a Windows PC with 4GB of RAM where a _single_ Electron app can take up over half of system resources.
And I find the initial premises laughable. Whenever I ran Slack on my 16GB MacBook Pro, battery life took a nosedive - visibly so. JavaFX apps like Nightcode are far more efficient (but I digress and am probably summoning a few trolls).
So no, I don't think Electron is defensible. It is _marginally_ defensible if you want to get an MVP out, or if your real desktop app is still in the works. Excusing it by saying it will cost you more to hire someone who knows how to do cross-platform development in something like Qt or Xamarin and deliver a more efficient, higher quality product is not an excuse, it's a cop-out.
- vvanders 9y agoSo what's your answer to Visual Studio Code then? I see Electron as opening up desktop development to developers who previously wouldn't have the been able to do it. Should we gatekeep just because developers don't have the resources to do a proper native app?
- Jtsummers 9y agoHow does Electron open up desktop development to developers? If they were already developers, how were they unable to use any of the many free (or inexpensive) development environments out there? For macOS, XCode has been free for as long as I've been using Macs (2006). For Linux, it's essentially all free. For Windows, yeah, it used to be expensive but setting aside full-fledged Visual Studio, there were lots of options that were either free or cheap. Just because we have a huge influx of developers who only know or want to use JavaScript doesn't mean my laptop battery, memory, and CPU need to cry every time I open up a note taking app.
- j45 9y agoWhat about desktop developers who know better to spend months developing something that can be built in weeks to solve a problem, and then determine if further action is needed? Its understandable if native developers will lean towards advocating for native apps, and non-native app developers don't. There's lots of folks however, who can comfortably do both and may believe value is just not in performance up front, but solving problems that add and create value.
- rcarmo 9y agoThe answer might surprise you: I work for Microsoft and use Code daily. I like it and appreciate the relentless tweaking the team has been doing to wrestle down the Electron bloat (hence one of the parentheses above), but it's not immune to it -- on my desktop Mac (a 7-year-old mid-2010 Mac mini with 8GB of RAM) I routinely have to kill it and fire up TextMate or vim instead. On a 4GB Surface Pro 4 (which is closer to the average I mentioned) I can usually only run Edge, Code, Chrome and the native mail app before things start slowing down -- and by that I mean that every individual app is fast a few seconds after I switch to it, but swapping has begun in earnest and moving to and fro between docs, code and testing lags enough for me to start getting frustrated -- at which point I usually fire up vim inside the Linux subsystem. As an aside, I don't have Slack (or any other Electron app but Code) installed anywhere -- I just use the most lightweight browser on any platform to get at that kind of thing.
- coldtea 9y agoVisual Studio Code is not written by "developers who previously wouldn't have the been able to do it" but by highly expert developers at Microsoft, paid full time for that. Amateurs can and do write plugins for it of course, mainly because JS is easy and popular and with huge already existing npm libs to leverage. But take something like Sublime Text, coded by a single person, multiplatform, with tons of plugins too (though less, since it depends on Python), and with very fast performance. An ST that had a few more hands, and a few more exposed UI controls for plugins would absolutely trump VSCode in all aspects -- especially if it embedded V8 for JS plugins to work there too (not Chrome/Blink/Electron: just the JS engine like it does with Python).
- mixedCase 9y ago> So what's your answer to Visual Studio Code then? Sublime Text, Kate, Notepad++ if you're looking for the same low learning curve or Vim/Emacs if you have experience or are willing to learn either. Two days ago I finally snapped when I was refactoring a codebase that required me to have 4 VS Code windows open. Together with my regular browser I was eating 12 GB of RAM and I had no VMs open as I often do. The system ran slow as dirt despite having an FX-8320 (not a new chip, but it's no slouch and it's still an 8-core), an SSD and 4 more GB of RAM to spare. That's just downright unacceptable. > I see Electron as opening up desktop development to developers who previously wouldn't have the been able to do it. Should we gatekeep just because developers don't have the resources to do a proper native app? Excuse my french, but come the fuck on. I was 11 years old when I grabbed a copy of Visual Basic 6 because "I wanted to be a 1337 haxxor" and was able to drag and drop buttons and text inputs into an empty dotted window, bang them together a bit, copy paste some code from forums and have them working to some extent with no programming knowledge. You're treating JavaScript programmers as if they're mentally deficient just because many of them are new to the industry and don't know tools that aren't fashionable. If they grabbed Qt Creator and QML docs they would be producing lightweight apps in no time.
- stouset 9y agoAnd yet… they don't. You could continue arguing against the mounting evidence that Qt apps simply don't perform as well in the marketplace as Electron apps seem to be doing, or you could accept that perhaps one of your assumptions is wrong. Having used a few Electron apps on macOS, I'll offer a (mostly poorly-informed) opinion: Electron is the first cross-platform toolkit I've seen that has resulted in apps that don't feel out-of-place like their other cross-platform brethren, the software version of the uncanny valley. Even VS Code, the first editor I've actually liked since the original TextMate, somehow doesn't feel out of place (despite being themed uniquely). There was a list posted earlier of popular cross-platform Qt apps, and most of them (VLC, Google Earth, VirtualBox) share a common theme: they're effectively a thin UI around mostly non-Qt content. I'd be surprised if more than 5% of VLC's use isn't double-clicking a video, watching it, and closing the window (perhaps with some scrubbing around the content). Most of a user's interaction with VirtualBox is with the operating system inside of it. And Google Earth (isn't that dead?) has little toolkit-based UI inside of it, with most of the space reserved for flying around the planet's surface. Don't you think it's telling that the most popular cross-platform Qt apps are the ones with the least amount of Qt UI? On the other hand, popular Electron apps like VS Code and Slack are almost entirely about interacting with the UI itself. In the brief window of time Electron has been out, it's resulted in more popular cross-platform apps of this vein than Qt has in the 25+ years of its existence. "Are I out of touch? No, it's the other developers who are wrong!"
- KirinDave 9y ago> Electron is a crutch. A crutch that people resort to because it's effectively impossible to write quick and dirty cross-platform desktop apps in anything else, but, worse still, a _debilitating_ crutch that, unless you know what you are doing (and I daresay that is something people should be looking into) delivers overly bloated, resource-guzzling apps that wreck usability, battery life and (most visibly) RAM in _any_ OS. See, the other word for crutch is " force multiplier". And in one sense, the crutch is for the almost comically broken state of cross platform UI toolkits. GTK+ is inadequate and hard to use. KDE not only mandates language choices and tooling but also offers only marginal improvement. Every "good" and widely praised xplat GUI toolkit is either custom built for a browser or IN a browser. Apple's toolkit gets praise, but is hardly crossplatform. Microsoft is starting to ship an option, but it's not well cooked yet. It's one thing to note the problems with electron. It's another entirely too imply it has genuine competition. As far as I can tell, it does not.
- rcarmo 9y agoIt does if you are willing to step out of the "let's do everything in HTML and JS" echo chamber - hence my mentioning there is no alternative for quick and dirty apps.
- pvg 9y agoCan you think of a Qt or, heaven help you, Xamarin-whatever based app that is really that much strikingly better than something like VS Code, as user interface and experience? OS X app, to narrow it down a little. I can't.
- zzalpha 9y agoConvenient you pick VS Code as your bar, given it's probably the one acceptable Electron app anyone can think of. Meanwhile, I can think of a dozen native apps that behave better than Slack or Spotify or Atom, just to name a couple of obvious examples.
- 9y ago
- pdog 9y agoSorry, but the alternative to using Electron isn't JavaFX or Qt or Xamarin. It's nothing. People weren't writing cross-platform desktop apps before Electron. For that reason alone, Electron is great.
- coldtea 9y ago>People weren't writing cross-platform desktop apps before Electron. Perhaps you weren't there, but they did. By the tons. Heck, take something like Sublime Text, that pisses on Atom on all performance metrics, and is coded by a SINGLE person for 3 platforms.
- matthewbauer 9y agoTo be fair, you can't run Sublime Text as a web app which makes sense for it. But something like a note taking app might want to be available as both a web app and a desktop app. Slack does something like this. In practice, though, very little code written for Electron will run in a browser.
- coldtea 9y ago>But something like a note taking app might want to be available as both a web app and a desktop app. Access as a web app is much less needed in the era were everyone has not just a computer, but also their smartphone with them at all times -- it can just be a regular native mobile app. But even if access as a web app is needed, the web version shouldn't be imposed on all other platforms just because it is the lowest/easiest common denominator for the devs.
- Can_Not 9y agoA lot of us just want to re-use our redux/vuex files. React native and nativescript do this for mobile (much closer to native than Cordova). I haven't seen an equivalent solution for desktop. Most of the options are "stuck with one platform" or "write and maintain a second/third/fourth copy of your software"
- gaius 9y agoit's effectively impossible to write quick and dirty cross-platform desktop apps in anything else, A Tcl/Tk app packaged with StarKit would be better and consume literally one-tenth of the resource, and quite possibly one-hundredth.
- rcarmo 9y agoActually, I've been teaching my kids to write simple Tkinter apps. :)
- mamcx 9y agoTo make a good case with TK is necessary to have something alike Bootstrap or anything that look good. I will love to have a good Widget for multiplatform (and hopefully including iOS) but most toolkits have terrible looks. That alone is a turn-off.
- aidenn0 9y agoI know it's a bit subjective, but I find default-skinned TK apps to be much better looking than the average electron app. [edit] Here's a commercial application with a Tk gui that shows cross-platform screenshots: https://installbuilder.bitrock.com/ https://installbuilder.bitrock.com/
- mamcx 9y agoBut the TK website not show it. Is very ugly! This is a important point. Maybe TCL/TK is amazing but need better press to show of. Is TK available to iOS/Android? How crazy a "TK React Native" could be? I ask because I have a potential project where cross-platform is important and wish a good toolkit to use.
- aidenn0 9y agoSadly it's not been ported to iOS that I'm aware of, which makes it a non-starter if you care about mobile.
- 9y ago
- amedvednikov 9y agoAgreed. That's why I developed a lightweight native client for Slack, Skype and others: https://eul.im https://eul.im It's only 4 MB and handles tens of thousands of Slack messages in one chat without lag.