11 ms·
Electron is flash for the desktop (2016)
- forgot-my-pw 8y agoPrevious discussion: https://news.ycombinator.com/item?id=14087381 https://news.ycombinator.com/item?id=14087381
- pvg 8y agoand https://news.ycombinator.com/item?id=14121437 https://news.ycombinator.com/item?id=14121437 of similar vintage.
- untog 8y agoAnd nothing has changed since that discussion, really. The top post is still correct: if Electron didn't exist we wouldn't be seeing a collection of beautiful, performant desktop apps. We'd just have fewer desktop apps, and you'd be using your web browser more. Particularly on Linux. Which, IMO, is fine! I don't use the Slack desktop app, I have a tab open in my browser. It can 'ping' the tab bar to get my attention, and it can send notifications. It works fine.
- michaelmrose 8y agoCounterargument at least SOME people would be shipping actual apps that are worth something. 1 app worth using is better than 5 subpar ones.
- AboutTheWhisles 8y agoNo it isn't, flash was the best way to do many things for the years it was popular. Video, vector animation, simple interactivity. Electron is only the best way to do something when someone knows only javascript and web dev but doesn't want to learn a new language. Maybe a case could be made for severe misconceptions also helping electron like 'a custom native app has to be made for each platform', even though C++ and Qt and many other combinations can be written once with 99% of the source being the same for every platform.
- reificator 8y agoI have never seen Qt be proposed without immediately being shot down for the licensing.
- emilsedgh 8y agoWhich is usually based on just misunderstanding LGPL. You "can" write a proprietary app with Qt and you wouldn't have to pay for it.
- jakelazaroff 8y agoWhy did you put "can" in quotes?
- dx87 8y agoYou have to ensure you keep your business code separate from the Qt code. It's extra work that people might not want to deal with when they are more comfortable with other options that don't require special care.
- camgunz 8y agoTo be specific, if you modify actual Qt code--which you shouldn't be doing generally--then you have to release those modifications. But if you dynamically link your app with Qt you're fine; you don't have to open source anything.
- Buttons840 8y agoYou also must provide the Qt source code yourself, giving instructions on how to get Qt from the official website is not sufficient. You also must allow relinking of your proprietary binary with different versions of Qt. This is easy on desktops but not on embedded or mobile devices. You also may not begin using a commercial license for your proprietary code which you developed using the LGPL licensed Qt, unless you have written permission. Part of this also means you cannot use, let's say, a MIT licensed wrapper or utility for Qt, because that was probably developed against the LGPL licensed Qt, and thus cannot be used with a commercially licensed Qt. There's certainly a reason people worry about Qt licensing. Source: https://www.qt.io/faq/ https://www.qt.io/faq/ (And despite all this, let's remember how great it is that one of the best widget toolkits in the world is open source.)
- SquareWheel 8y agoSeems like yet another complaint about Electron's filesize/memory usage? We already know it isn't great. I don't see what this post adds.
- jamespitts 8y agoComparing Electron to Flash in this way brings in the reader's mind other considerations than performance, primarily closed source and security vulnerabilities. It is a misrepresentation, perhaps unintentional. The article should be entitled: "Electron has performance issues".
- jlv2 8y ago(2016)
- yarrel 8y agoIt's ActiveX for the desktop.
- beamatronic 8y agoOld user here... I still don’t understand how Java failed at this. It was supposed to be the solution. You can, today, make cross platform, mostly native apps, with Java. But didn’t really become ubiquitous like we all thought.
- jazzyjackson 8y agoPersonally I got really burnt out by the number of times software written for Java wasn't compatible with a new release, causing me to dig up an old Java exe that I knew was insecure to be able to take my online class or what have you.
- vturner 8y agoI think we have Apple to thank for that. JavaFX was compelling but alas all rich platforms were sufficiently moot when they killed Flash on mobile and locked iOS down.
- dwaite 8y agoYou could have JavaFX apps on iOS - but you had to deal with the security model not allowing a JIT to run. The only JIT on iOS is the javascript engine (which runs out-of-process).
- reymus 8y agoWasn't Java problem a a branding issue? Java got a bad reputation of being slow and not looking native. Java apps looked like Java apps. Also, they were so slow that could actually tell when the garbage collector was working. by the time Java got fast it was too late. Even now, .Net guys that didn't bother getting to know Java after its first decade, usually say Java is slow. Something similar happens now with people who hasn't used JavaScript in 15 years saying it's not a real language, etc., etc.
- mherrmann 8y agoOne reason must be JVM startup performance. It simply takes long to load.
- 8y ago
- bluetidepro 8y agoThis doesn't align with what I see in my Activitiy Monitor when I open it up and look at the Slack usage. I don't know a ton about this stuff, so maybe it's a relative thing, but my Mac has next to no problems with Slack like he's raging over in this post. The memory footprint is way smaller than his screenshots show. I also have 10 workspaces connected (not sure how that plays into it). > I mean come on. Its a text chat program. Seriously? To boil Slack down to just a chat program is silly, when you look at all the feature it has with it (screen sharing, calling, file sharing, etc.). Electron hate is the new PHP hate. As I've seen many others say before on HN, what people don't seem to get is the experience of using Electron is miles ahead of anything else in convenience. Instead of writing a blog post ranting about Electron, why not be constructive and talk about solutions or alternatives? Wouldn't that be more productive? EDIT: Didn't realize this post was from 2016. Seems way out of date, carry on, nothing to see here.
- morpheuskafka 8y agoI wish people understood that (especially when it comes to FOSS, but even for proprietary software), convenience = more features. With Electron, shipping a Linux desktop app after writing the Windows/macOS one is almost no extra effort. Meanwhile, asking a developer with <1% Linux users to rewrite a Windows Forms app into GTK is not going to happen.
- EduardoBautista 8y agoMaking the experience worse for 99% of users just so that the other 1% can have an app on their desktop that works the same way in their browsers is a horrible idea.
- ahartmetz 8y agoHey, I'd be fine with Slack being completely unavailable for Linux. I don't think any of the places where I have to use it currently would use it in that case.
- x0x0 8y ago2 workspaces 1.3g.
- morpheuskafka 8y agoFirst off, the primary issues with Flash were that it was proprietary, had numerous security issues (due to its open source nature) and required custom, non-portable code. Electron is a free software platform that builds on the open web standards. It uses the Chromium browser, which is available on every major platform (that permits browser installation, that is). And it works with "walled garden" stuff like iOS/Safari, because the modern web actually does a pretty decent job of coordinating standards. If you use Linux desktop, you should be cheering loud and proud for Electron, because that's how Spotify, Discord, and many other apps have full feature parity between Linux and Windows and macOS.
- kelnos 8y agoAs a Linux user, I've stopped using the Slack desktop app; I just keep tabs open in my browser for Slack. I agree that I'd rather have an Electron-based app on Linux than no ability to use an app at all, but that doesn't mean we shouldn't demand better (like React Native!). I run zero Electron-based apps on my laptop. They destroy battery life and slurp RAM to an unacceptable degree.
- antoineMoPa 8y agoLinux user not cheering here. I don't really get the point for desktop apps for things like discord... Why would I want another browser engine running when I can chat in discord in Firefox that is already running? Electron is like starting a tiny VM for every app. The only advantages I see here is for the app developer, who can be more intrusive (full access to run proprietary code on my laptop, send desktop notifications to make me an addict of their service, etc.)
- derefr 8y ago> The only advantages I see here is for the app developer, who can be more intrusive (full access to run proprietary code on my laptop, send desktop notifications to make me an addict of their service, etc.) From most people's perspective, that "intrusiveness" is the reason they're using a desktop OS with desktop apps, rather than e.g. ChromeOS.
- 8y ago
- sidcool 8y agoCan we label this as 2016 In addition, has Slack performance improved since this post was written?
- purerandomness 8y agoIt got much worse.
- pawelman 8y agoPublishing Electron app is like shipping entire OS with any stupid app
- mdhughes 8y agoSlack is a poorly-written Electron app, and unfortunately it's the poster child for it. Discord does more with a fraction of the resources, and is also Electron. Atom is a giant editor framework, and is still less heavy than Slack in normal use. Electron can run quite reasonably when you aren't an idiot/under complex enterprise requirements which probably explains Slack's load.
- nv-vn 8y agoDiscord uses minimum 140mb of RAM when idle on my machine. VS Code is currently idling at 330mb for me (2 files open), and it's a fork of Atom that allegedly performs better.
- tombert 8y agoIt makes me a little sad that JavaFX never really caught on. I thought that Swing was horrible for cross-platform development, but the little I've done with JavaFX is pretty pleasant, and seems to perform at least as well as Electron, if not better.
- pdkl95 8y agoI recently tried to use Swing (for compat. and interop. reasons). While it was obviously "quirky" (partly just from it's age - some of those "quirks" were expected behavior at the time), it appeared to at least be functional. I have very simple GUI needs for this project, slapping a basic UI onto the project shouldn't be that hard, right? Then I discovered the multiple layers of hell of Swing's various layout managers. I never thought I'd actually find something worse than packing GTK+ {h,v}boxes. I think I might end up retreating back to Tk...
- stcredzero 8y agoTcl/Tk interfaces look goofy, but they're very easy to build. You can even build them on a REPL. It's also very easy to understand what they do when you resize. That's going back quite awhile. Why is it that later layout managers just seemed to get a bit worse then stay that way?
- Gibbon1 8y ago> might end up retreating back to Tk You could cross over to the dark side and embrace the Microsoft Heresy. C#/.net Upside: Just works Downside: Other programmers will hate you.
- tombert 8y agoHow well does the .NET stuff work across platforms nowadays? Can I conceivably have a "write once, compile anywhere" mentality? Conceivably if it is any good, you could get programmers to hate you a little more or less by using F#.
- 8y ago
- AlexandrB 8y agoOne victim of Electron and the whole web-app economy is right-click context menus. Actions that would previously be doable by right clicking often require selecting, and going to a hamburger menu within electron apps or apps with a "modern" design.
- eppsilon 8y agoSteve Jobs' insistence on one-button mice was an idea too brilliant for its time... /s
- tiuPapa 8y agoI get how Electron is useful. What I don't get is the why of it. Why should I have open another browser engine when I could just access it on my browser that I already have running.
- thosakwe 8y agoWritable file access, ability to use ES6 and beyond without compatibility issues, media keys, etc. But really I think that filesystem access is probably the main one, at least for me.
- tiuPapa 8y agoAh yes, but I was speaking more about apps that uses Electron to view their web page like Spotify or Discord
- mherrmann 8y agoShameless plug for my library [1] that makes PyQt a very viable alternative to Electron. [1]: https://github.com/mherrmann/fbs https://github.com/mherrmann/fbs
- loudmax 8y agoFlash isn't necessary today because HTML 5 is a shared platform that all modern browsers have in common. HTML and javascript as native as anything else in the browser and they're cross platform. This is critical. The criticisms about Electron's memory and CPU usage are legitimate, but it should not be understated how important it is to have a target for both web and desktops. Maybe WebAssembly will get us there with decent performance.
- fimdomeio 8y agoAt some point in my country for some state fundings the only way to apply was via a windows app. The company I worked at the time, bought a pc just to apply. Sure they would have loved a crappy electron app instead. Electron is not a problem is a symptom. People/companies want to write apps that run everywhere and that is actually a great thing. The problem is OS people not having their own little w3c to fix the problem. Its starting to look pretty clear that sooner or latter all native apps will be coded in html css and some programing language (js or not) for the sake of being easy to port, so please OS people, get us a better solution than electron.
- AnIdiotOnTheNet 8y agoJava runs everywhere and is at least an order of magnitude more efficient than Electron. If it was really about WORE then these developers would be using Java, a language and runtime actually designed for applications instead of being shoehorned into that role.
- slantyyz 8y ago>> Java runs everywhere and is at least an order of magnitude more efficient than Electron. I don't think people are choosing Electron for efficiency. They're choosing it for getting results sooner. Electron lets you pump out a reasonably nice looking cross-platform app that does what it's supposed to do, using a lot of your existing code, in a short period of time. That convenience to developers can easily outweigh the trade-offs related to Electron's many flaws, especially when time and resources are very limited.
- AnIdiotOnTheNet 8y agoExcept, you know, for the users who's time and resources are the ones being wasted. But who cares about them, right?
- neurotrace 8y agoBuilding GUIs in Java is a massive pain in the butt. Building GUIs with HTML and CSS is a breeze. That's a major difference.
- mariopt 8y agoElectron is the only decent solution for building a cross OS app in 2019. I challenge you to give me a stack that It's fairly simple to maintain on multiple desktop platforms, build UIs, has plugins to support most of the feature we're used today in a browser, etc. Don't forget that javascript now runs on the server, having a single language for everything is amazing. The browser just became the best ecosystem for build apps and the native development frameworks are years behind the browser. The default set of Widgets available will make you waste months building your own widgets versus downloading a js plugin and it's done in 30 minutes. Electron just gets things done, period. There are examples of fast Electron apps like Realm Browser. You can also build the UI with Electron and Javascript while you do some IPC with smaller binaries written in C++, Go lang, C#, etc. to try to improve the performance of some operations. It is possible to write good and fast Electron apps. Don't forget that many js developers came from jQuery and other backgrounds and might not have the best ideas when it comes to build desktop apps and even understanding an OS architecture. I don't mean to be mean with these developers, we need to acknowledge that these days lots of companies just want Javascript developers and any cost. Another major benefit of Electron is that platforms like Linux do get some support which is really great. Without electron, I could not use Linux to work on projects that use Slack for example. Without electron, many developer tools wouldn't exist at all and most likely they would be tied to windows and/or mac. Linux would be the biggest looser for sure. Don't think it's fair to shit on Electron, I love fast apps but, sometimes, buying more RAM and a faster CPU just solves the damn problem. I'm not saying people should write slow apps but at the end of the day I've stuff to get done. I would rather see a better collaboration to try to improve Electron because... we need it. Either this or the native development tools need to wake up to 2019.
- saagarjha 8y ago> Electron is the only decent solution for building a cross OS app in 2019. It's not decent. > I challenge you to give me a stack that It's fairly simple to maintain on multiple desktop platforms C++ core library, thin UI layer on each platform. > The default set of Widgets available will make you waste months building your own widgets versus downloading a js plugin and it's done in 30 minutes. Why would you build your own widgets? The ones the OS provided have had years put into them.
- deleted 8y ago[deleted]
- mic47 8y agoTab in browser provides way better user experience than electron app (or native android/ios app). With website you can to mind-blowing things like: * Open other part of your app in new tab. * Open other part of your app in new widow, and have time side by side. * Open external link in new tab, in the same window (OMG!!!). * I can send link from the web app to someone else. * Consistent back button. * Use browser extensions. * Have cookies (i.e. I am logged out of most of the things in your in-app browser). Composers are generally thing that are better in apps, but as long as I don't need to compose complex stuff, web app always wins. And if I do, I'll prefer to use native/electron app only for composing, not for consumption.
- felixfoertsch 8y ago> Open other part of your app in new tab. Unless the developers forbid it... and always finding new ways to forbid it... Man I hate the new web.
- mic47 8y agoThis is more of an old web, and because of bad design: keeping state of the app on server, rather than in the browser (or are you referring to limiting open in new tab?). But yes, I hate the new web too (sometimes).
- felixfoertsch 8y agoI was thinking of web apps like MS Teams that just simply do not allow to open a new tab on click for whatever reason. I can open the app in two windows just fine, but I can't right/middle click on something to tell it to open in new tab. Why would I not want be able to open a Word Online document in a new tab directly? There are other apps, that are even worse. Allowing something to open in a new tab/window but identifying that there are multiple windows open and just disabling all but the main window... I don't understand developers that do this. I always felt that multiple tabs is a strength of the web. They worsen it somehow.
- xvilka 8y agoRevery UI[1] framework is like Electron but without a browser. [1] https://github.com/revery-ui/revery https://github.com/revery-ui/revery
- stcredzero 8y agoIts built on top of electron, so when you download slack you're actually downloading a complete copy of Google Chrome. Chrome, at the time of writing is 15 million non-comment lines. When you download slack, 99% of the code is 'below the water'. And chrome is a hog. Its huge and complicated. It uses ram and CPU like nobody's business, and it totally thrashes your battery life. I remember when Chrome was the shiny, nimbler, new kid on the block.
- Gibbon1 8y agoReminds me of a nerd friends comment about why Eclipse exists, because in the late 90's some people thought Emac's was a bloated pig.
- stcredzero 8y agoActually, Eclipse was a port of the "Visual Age" family of IDEs which started out implemented in Smalltalk. Smalltalk started out as something like Lisp, without the insanity of coding in your data representation. (Unfortunately, it means you don't have the insanely great benefits of coding in your data representation.) Emacs was actually a great way to do work over a slow modem connection back in the late 90's.
- butz 8y agoLike Flash was replaced with web technologies, Electron soon will be replaced by Progressive Web Apps. Just have to wait a bit longer for browsers to securely implement missing functionality, like access to file system. Although for most apps that doesn't need any advanced APIs we can use PWAs today.
- k__ 8y agoFor people who don't like Electron, but still need it's features, I recommend Revery. https://www.outrunlabs.com/revery https://www.outrunlabs.com/revery It's build with Reason/OCaml and builds native self-contained binaries (~3MB for simple apps).
- efficax 8y agoI hate Electron too, but the bi-monthly hour of Electron hate on here is a little tiresome. It's clear that it solves some major issues from a development standpoint for a lot of organizations, and it's here to stay. Slack isn't going to rewrite their app (hell they can't even implement dark mode). It's just another thing we have to get used to.
- chxei 8y agowhy can't all Electron apps use same chrome base like a lib?
- bixby42 8y agoSilly post. Visual Studio Code also uses Electron, and has yet to spin up fans on my machine. I use it every day, all day, on a variety of platforms. There seems to always be someone who thinks there clever complaining about bloat and then pointing to C or now trendy Go and/or Rust. It rarely is. Perhaps Slack was doing some sort of internal auto-update when the CPU started thrashing. Of course figuring that would kill a good blog rant about bloat. I sure hope the author doesn't run Windows.
- deleted 8y ago[deleted]