10 ms·
Every time I hear about Electron, I have mixed feeling about it, is it : * one the best thing that happened to desktop software as it enable web developers to
by polote 7y ago
Every time I hear about Electron, I have mixed feeling about it, is it :
* one the best thing that happened to desktop software as it enable web developers to build desktop portable app
* one of the worst thing that happened, because it makes the desktop world rely on Google and decrease even more the expectations on how much resources an app should consume
What are your opinions ?
- kgraves 7y agoThe latter, I have a 3GB laptop. Almost any application I use that is electron makes my laptop scream for help (fan spinning furiously) and freezes it up. I have to kill the application before it consumes everything. Electron applications like VS Code are an exception and slightly gives me hope.
- stevewodil 7y agoDoes anyone know what makes VS Code an exception to this? Going to be working on an Electron app, so I'm curious about what optimizations have been made there.
- 52-6F-62 7y agoI can't speak to VSCode, but I've been probably a hard use case for Electron development as I work in an industry without a ton of resources to throw at development, limited time, and less supportive environment for development (in spite of a pressing need to keep up). I've found keeping as precious little of the work in the render process as possible has helped a great deal. Send everything to the main process and use the event/messaging system to update the state. Then things that you're used to doing to maintain application performance in a web browser apply. Keep the compute in the back as much as possible. And depending on the task, offload compute to a native module [if you're capable and] if the expense between NodeJS <> native module is worth it (more intense compute tasks). There's probably more and more experienced advice out there, but this is my experience so far.
- jayjader 7y agoIf I recall correctly, VS Code bundles its own Electron that Microsoft's team has spent considerable time & effort optimizing for it.
- mdgrech23 7y agoPretty sure they forked electron. Not sure what they did to it. Also they probably drop down to native for a lot of tasks.
- Matthias247 7y agoNo. They are even contributing to upstream Electron - and they did this before Github was acquired by Microsoft. They just run more efficient software on top of electron than others do.
- armandososa 7y agoMaybe something like: https://jlongster.com/secret-of-good-electron-apps https://jlongster.com/secret-of-good-electron-apps
- kitsunesoba 7y agoIt’s likely just sheer difference in quality of engineering. For most companies that choose Electron, performance was never of any value in the first place and that’s reflected in the engineering regardless of how/what it’s written in. It just happens that bad code is much more egregiously bad with JS/Electron than with other stacks.
- deleted 7y ago[deleted]
- rimliu 7y agoImagine if desktop developer wanted to go into web development. I assume he would learn HTML, CSS, JS. Why cannot web developers wanting to create desktop app learn new languages and SDKs? I've spent many years as a web developer, and a bit fewer years as iOS developer. Now I am back with web again, but I still thing way too much of the recent trends are being optimized for the developers at the cost of users.
- cztomsik 7y agoWeb & JavaScript is really great platform for quick prototyping and when you're doing UIs, it's all about being able to iterate fast. It might change a bit with Flutter & SwiftUI but I still find web & CSS to be a better authoring model. Note that I've been doing (native) desktop programming before so I can compare.
- gridlockd 7y agoThe main thing that Electron does is solve most of the platform abstraction issues. The only contender that comes close to this is Qt. However, if you want to hire Qt developers, that's a much smaller pool and then you also need to pay Qt license fees for each one. If you want to develop truly native applications, now you need to maintain builds for Windows, Mac OS and perhaps even Linux. You need developers familiar with all of these native frameworks. Optimizing for developers isn't necessarily worse for users, if they can get more done in less time, users benefit. It's just not so obvious. No user will ever complain about a product they aren't using because it won't ship until next year with half the features.
- de_watcher 7y agoYou don't need to pay Qt license fees if you don't do secret modifications to the Qt library itself.
- solarkraft 7y agoAre you sure you don't need to pay about 5k€/seat/year for commercial development?
- crispinb 7y agoHaven't we had enough opinions on Electron, for and against, to last several average lifetimes?
- hombre_fatal 7y ago@dang should start stickying his comment with links to every previous Electron release submission for people who want to replay all the belabored arguments (dismissals) again and again.
- pjmlp 7y agoThat Electron fad will eventually die as HTA and XUL did before it. With my Web developer hat, I see the future as PWAs and if you really need more than Web APIs allow, by all means create a local daemon that uses whatever browser the user has installed. All my uses of Electron are forced upon me, if native versions are available and I am allowed to choose, native wins.
- CodesInChaos 7y agoPWA is the opposite of what I want. I want signed packages/manifests with well defined content (plus binary transparency). Not each application shipping its own downloader code which caches an ill defined set of files locally.
- megous 7y agoIt's great tool for personal use, to write quick single purpose UIs in webtech that can access DB directly, without the need to write the backend or much with REST APIs. For personal use, you also don't need multiple runtimes for multiple electron apps. You can just use the single shared one (or even system one; for example archlinux has electron installable via pacman), reducing memory use. It's also pretty good tool to write your own UI for other people's websites.
- canada_dry 7y ago> own UI for other people's websites ... // ... single purpose UIs in webtech that can access DB directly Can you point to some good examples of these use cases?
- megous 7y agoI use pg-promise for DB and UI is a bunch of vanilla JS. You can get data with XMLHttpRequest inside electron from any origin and then just process the returned document with regular web apis. Sorry, I don't have anything public.