It's a great prototyping environment, and people have built businesses around Electron apps (VSCode is built on Electron, I believe). The apps I've built are big, kinda slow, and as others have mentioned tend to eat memory.
Ask HN: Is Electron really that bad for desktop apps?
11–20 of 28 posts
Re: Ask HN: Is Electron really that bad for desktop apps?
#12I've built a few Electron apps now, one of which I use quite a bit to track ticket prices in secondary markets. It's a great prototyping environment, and people have built businesses around Electron apps (VSCode is built on Electron, I believe). The apps I've built are big, kinda slow, and as others have mentioned tend to eat memory.
Re: Ask HN: Is Electron really that bad for desktop apps?
#13It is hard to understand people cares about memory useage when desktops nowadays have a lot of RAM. What average Electron apps annoys me is their constant high CPU load. Some apps take ~10% of CPU load all the time.
I think Electron itself is fine. Look at VS Code. It is fast even though it is written in Electron. The real problem is the bad habits of average Electron apps developers. The Electron devs usually come from Web where users can just press a refresh button or close it when browsers are slow. They don’t care about optimizing stuff.
Re: Ask HN: Is Electron really that bad for desktop apps?
#14I've built a few Electron apps now, one of which I use quite a bit to track ticket prices in secondary markets. It's a great prototyping environment, and people have built businesses around Electron apps (VSCode is built on Electron, I believe). The apps I've built are big, kinda slow, and as others have mentioned tend to eat memory.
Wat. Microsoft isn't "built around" VSCode.
Re: Ask HN: Is Electron really that bad for desktop apps?
#15This is half the problem with Electron apps. I know perhaps Windows users are used to the random bullshit UI every developer comes up with (heck even Microsoft between it's own different software), but macOS users generally get very consistent UI's from native applications. Whatever you create using CSS is not going to fit in with that. If you need your app to be some special snowflake of UI design to stand out, it sounds like the actual functionality of it is commonplace or marginally different at best.
Also consider usability/accessibility. A native (i.e. Cocoa) macOS app gets lots of accessibility features 'for free'. I've heard it's possible to provide some/all of the same via Electron, but that its more work, and it's not done by default because it hurts performance even more than regular Electron apps.
Your argument about your reasons is literally the argument people use against the concept of Electron. "I want to do this, but I dont know how.. can I take a giant shortcut, and expect no repercussions?".
Electron is like those old Road Runner cartoons, where Wile E Coyote orders a "DIY Rocket" from ACME Corp, and sure enough, blows himself up.
If you know web dev, make a web app. If you want to make a native app, learn C/C++/Swift/ObjC/Java whatever.
Edit: I will clarify this with context. I do not write native applications. I have written a very quick (like, ~1-2 days total dev time) Cordova/PhoneGap app using similar tech, as an internal data-capture solution for people on a project (at the time, Safari on iOS didn't allow browsers to upload photos, and we needed to capture a lot of images quickly from our team on location, so I wrote a simple phone gap app and backend server, ran it from my laptop and installed the iOS apps from my laptop - it was never intended to be distributed)
So, that is one situation where Electron-type apps might be acceptable - if you need to do something quickly for an internal project, where a native browser doesn't give you the API, but Electron does. But Thats a lot of qualifiers, and you wouldn't be asking about it here if that was your intention, I imagine.
Re: Ask HN: Is Electron really that bad for desktop apps?
#16Depends. I've downloaded a fair number of Electron apps, and ultimately deleted or aborted the download of most of them. VSC is the one that currently survives. If it's something that needs most of a browser and HTML - like an email client that cropped up as a Show HN recently, or a client for a wholly online service, Electron may be the right choice. If it's something more trivial like a notepad, reminder, or timer,…
I disagree. These are cases where it's especially bad to use a HTML view as the application UI.
If your application is essentially a HTML page, and it's meant to render content from a foreign source, which is also HTML, JavaScript, what have you - how do you do that? An IFRAME?
You know that Electron apps have lower security sandboxing than a regular web browser right? Who in their right mind would use a web browser to render a html page as the UI of a web browser, and hope that the foreign source page doesn't break out of it's rendered context, to influence the appearance or routines of the 'browser' that loaded it?
Re: Ask HN: Is Electron really that bad for desktop apps?
#17Re: Ask HN: Is Electron really that bad for desktop apps?
#18Re: Ask HN: Is Electron really that bad for desktop apps?
#19Firtstly writing Qt desktop apps in Python is pretty popular so we don’t need to stick with C++ to write Qt app. It is hard to understand people cares about memory useage when desktops nowadays have a lot of RAM. What average Electron apps annoys me is their constant high CPU load. Some apps take ~10% of CPU load all the time. I think Electron itself is fine. Look at VS Code. It is fast even though it is written in E…
The problem with the RAM consumption is not when you run a single Electron app in isolation, it's when you try and run a few of them and suddenly you're running hundreds of Chrome threads and you've used 8GB RAM.
Re: Ask HN: Is Electron really that bad for desktop apps?
#20Consider Chromium Embedded Framework, or Sciter. These too let you define your UI with JS/HTML/CSS, but you're not shipping a node.js server with your app, which makes your app much lighter.