29 ms·
Ask HN: Why aren't there any real alternatives to Electron?
I have to use Discord and Element on a regular basis (which both use Electron). They both use an unreasonable amount of RAM, and I feel this even more as my laptop is quite old and has 4GB of RAM.
I keep looking for alternatives to Electron, which wouldn't require such heavy resources to run, but my searches always seem to come up short. There are a number of solutions that are either dead or are not ready for production yet, such as React NodeGUI[0], Proton Native[1] or react-native-desktop-qt[2].
There's react-native-windows, but I'm not running Windows, and even if that did gain Linux compatibility it seems that they're quite focused on Microsoft-owned platforms.
Is "just stick Chromium into all your apps" seriously the best we can do as an industry? It's resource-inefficient to high heaven, not to mention that it's slow and doesn't integrate with the native platform styles at all. As a JavaScript developer, I'm quite surprised this is the best there is for cross-platform JavaScript development.
[0]: https://github.com/nodegui/react-nodegui https://github.com/nodegui/react-nodegui
[1]: https://proton-native.js.org/ https://proton-native.js.org/
[2]: https://github.com/status-im/react-native-desktop-qt https://github.com/status-im/react-native-desktop-qt
- zagrebian 5y agoWhy isn’t discord.com a PWA already? What are they waiting for?
- mccorrinall 5y agoHave you tried using it on a phone? It’s a horrible experience compared to the app.
- kevincox 5y agoThere are some tradeoffs on the browser version: - No "currently playing" detection. - No global hotkeys. - Reduced noice canceling and other audio cleanup. Maybe a few others that I can't think of off of the top if my head. But for me personally the browser version is way better. I don't want them snooping on what is running on my system, I have a global mute+unmute hotkey (that I trust and works for all apps) and I already have better processsing on my mic at the system level.
- speedgoose 5y agoIt’s already a PWA app.
- zagrebian 5y agoI checked in Chrome on macOS, and discord.com does not have a web app manifest nor a service worker.
- berryton 5y agoYou may be interested in Tauri: https://tauri.studio/ https://tauri.studio/
- farseer 5y agoYou can use JavaFX or QT (with c++ or python) but they are no match for the eye candy that is to be had with html5 and css3. It's your job to integrate with the platform style, you have the flexibility to do so. Resource usage is a problem but has become manageable over the years. See how pretty and efficient VSCode is. And honestly thank God we have electron, before that a truly cross platform ecosystem was limited to Java and that abomination Adobe AIR.
- tjpnz 5y ago>Resource usage is a problem but has become manageable over the years. I'd add that when VSCode started to gain popularity it was common for a dev system to have only 8~16 GB of memory. In most cases that's now more than doubled.
- secondcoming 5y agoThat's great for devs, but what about the end-user? They're likely not all on the latest Macs with gigabit fibre.
- dkersten 5y ago> In most cases that's now more than doubled. Really? I still find it difficult to get a laptop with more than 16 GB of memory. 13" MBP maxes out at 16 GB. 14" does have 32 for $500 more, which might be ok for a company but is certainly a lot for me to spend personally just so I can run Electron apps comfortably. Non Apple laptops are similar. If I'm buying a laptop instead of a Desktop, its for the ability to conveniently bring it with me when I'm not at home. For that, 13" is my preferred form factor. So at least Apple and Dell laptops, I have not seen one with more than 16 GB. I feel its unreasonable to expect me to sacrifice physical comfort just so apps can be written to use Electron.
- sshine 5y agoBuying a gaming laptop, you can easily get 32GB RAM without paying a premium. If you want a MacBook Pro M1 with 32GB RAM, the total cost is easily twice.
- hiimshort 5y agoI haven't gotten around to trying Tauri, but I've meant to. Perhaps you'll find it interesting? https://tauri.studio/ https://tauri.studio/ If memory serves, it reuses the OS default web view and any "backend" or system things are done in Rust.
- Octoth0rpe 5y agoThis saves on the download size of an app, but doesn't significantly reduce the resource usage or non-nativeness of the resulting app. Another pro is that as noted 'system things' are done in rust, but I'm not sure that's a big bonus since your frontend likely has significant bits of js _anyway_. You've effectively increased the language count in your app.
- Otek 5y agoElectron is absolutely unbeatable when it comes to being cross-platform. Because its core is the same as Chromium, every time Chromium, the biggest browser engine without question, is updated to run better, more stable on every platform, and big companies pump millions of dollars into it, Electron gets it "for free". Very hard to compete with that. Additionally, writing Electron applications has a relatively low entry point because it resembles writing web pages to some extent.
- blorenz 5y ago
- F117-DK 5y agowhy?
- blorenz 5y agoWow I didn’t mean for that to be a controversial response. My apologies. The parent comment referred to Electron being “absolutely unbeatable”. That is my belief of not being in the spirit of a hacker or have the willingness to disrupt the status quo. We have accepted Electron’s glaring shortcomings as a whole and consistently complain about it. There are projects out there that try to satisfy these points in each of them has particular trade offs. I hope to see these contenders rise. One thing I do know from my time in tech is not to get too complacent with the single tech who monopolies a problem space. Innovations will prevail.
- avazhi 5y ago
- yes_but_no 5y agoAt this point its hard to come up with interesting arguments. I don't like electron as much as the next guy, but if you ever tried to develop a desktop app you can easily appreciate Electron for what it is. Anyway heres some other choices might be viable these days: - Flutter desktop https://flutter.dev/multi-platform/desktop https://flutter.dev/multi-platform/desktop - Jetbrains Compose https://www.jetbrains.com/lp/compose-mpp/ https://www.jetbrains.com/lp/compose-mpp/ IMO immediate mode guis should be option as well, like imgui, egui. (But afaik you basically throw accessibility out of the window)
- krapp 5y agoThe Lagrange browser for Gemini[0] was built in C with and it's cross-platform thanks to SDL. It's still possible. [0]https://github.com/skyjake/lagrange https://github.com/skyjake/lagrange
- occz 5y agoEven though Compose Desktop is still Alpha, I think you can probably make something viable with it, after having tested it out a while.
- Octoth0rpe 5y agoWorth noting that learning Flutter means learning the language Dart, which is good for pretty much exactly one thing: writing flutter apps. If a friend was seeking to achieve proficiency in either frontend web tooling for the purposes of writing an electron app versus learning Dart, I know which _I'd_ recommend to said friend given the long term marketability of each.
- Barrin92 5y agofor what it's worth I recently tried Flutter out and despite having never used Dart I kind of.. could just write it. It feels like the most unopinionated Algol type language ever and I've you've ever written Java or C# or JS it's very natural to pick up. It bothered me so little that overall Flutter seemed way simpler to me than the web-tech stack because I had also very little experience with web apps.
- gwbas1c 5y agoOn Windows and Mac I make application shortcuts directly in Chrome. These use the same amount of resources as an ordinary tab, but appear just like a desktop application. I have dock/taskbar icons for Gmail, calendar, YouTube music, ect. I don't use Linux, but given that Edge also supports this, I suspect that you can do this with Chromium. I'm not on my computer, but the steps are to hit the hamburger menu, select create shortcut, and then select the checkbox. The words vary, but it's usually something like "run in separate window" or "run as application."
- moron4hire 5y agoI do this for a lot of stuff (probably a dozen different apps, on Windows, Linux, macOS, and Android), but there are apps that wouldn't be able to rely on this. VSCode, for example, wouldn't have good enough system access to work. However, the are some apps that could do this, but have hidden some of their features in the Election version. E.g. it's frustrating that Slack can't have multiple groups in a single browser tab.
- kevincox 5y agoThe added benifit and drawback here is that you keep the app in the browser sandbox. For me that is what I want 95% of the time anyways. But for apps that really benifit from accessing native resources with no permission requests it is a downside.
- laurent123456 5y ago> Why aren't there any real alternatives to Electron? Because it's not as easy as it seems to create a proper cross-platform framework. And even if there was an alternative, these days you often need rich text, images, videos, etc. all of which are essentially HTML pages. So you'd end up adding a webview anyway, which is getting quite close to being Electron. And I think that's the key - why create an "alternative" to Electron if you end up bundling webviews, ffmpeg, libpng and so on. It might be a bit smaller in size than Electron but not enough that it matters.
- beowulfey 5y agoI’m not a JS developer, so take this with much salt, but one that caught my eye was SciterJS [1]. It is built using Fabrice Bellard’s QuickJS engine [2], and appears to be very efficient. Definitely has great potential I think. See previous discussion here: [3] [1] https://github.com/c-smile/sciter-js-sdk https://github.com/c-smile/sciter-js-sdk [2] https://bellard.org/quickjs/ https://bellard.org/quickjs/ [3] https://news.ycombinator.com/item?id=24797423 https://news.ycombinator.com/item?id=24797423
- snarfy 5y agoThe problem with alternative implementations like SciterJS is the compatibility is not 100% and you loose access to the rest of the ecosystem. All of the js libraries will be hit or miss.
- andrew_shay 5y agoSciter is great. It's similar to Electron but very light on resources. The creator is very active on the forums too. It'd be great to have a GUI/widget toolkit that would look native across all platforms but also work be valid HTML/CSS/JS on current browsers. It really feels like there is a lot of potential for sciter to take over.
- tored 5y agoThinking of writing an app in Sciter. I’m doing a mixin approach with my own custom backend against Sciter pre-built dll. What would you say is the pros and cons of Sciter? Is it so lightweight as it claims?
- ronyfadel 5y agoA true Electron-killer will be one that allows migrating from an Electron codebase with 0 code changes, and offer low usage of resources by e.g. using WebKit on Mac. In the meantime, no one will bother explore other options, because it just works, even if it's a resource hog.
- zarzavat 5y ago> Is "just stick Chromium into all your apps" seriously the best we can do as an industry? Yes. What other rendering engine are you going to use? If your answer is anything but a web browser rendering engine, then consider that any serious UI toolkit in 2022 is certainly going to need a WebView UI component: so if you want the WebView UI component to be consistent across platforms (you want this), then you will have to bundle a web rendering engine anyway. In that case, why not just use the web rendering engine as your main rendering engine? There’s nothing wrong with Electron as a concept. The issue is with either: blink being under optimized for this use case, or bad Electron apps.
- jokethrowaway 5y agoYou could use a webview shared at the system level, so you don't have in memory 4 different browser engines.
- oceanswave 5y agoBrowsers themselves don’t do this for security snd sandboxing reasons. Each tab is another instance.
- kevincox 5y agoEach tab is a partial instance. There are still many resources that are shared globally for performance and memory use reasons.
- gmueckl 5y agoBut operating systems are free to map the same read only memory pages (e.g. program code) into different process address spaces. This is an optimization that running processes are generally completely oblivious of. But it only works when e.g. the program code is mapped into memory from the same file. If every program has a private copy of the same library (even if it's bit for bit identical), the operating system doesn't have enough information to pull this off.
- proto-n 5y ago
- OJFord 5y agoTauri is certainly not dead, and with a security audit in progress and a stable release in its fourth RC, it's surely very close to 'production ready'. https://github.com/tauri-apps/tauri/releases/tag/tauri-v1.0.0-rc.4 https://github.com/tauri-apps/tauri/releases/tag/tauri-v1.0....
- FractalHQ 5y agoCurrently using this with Svelte to build a cross platform video editor and and my experience so far has been amazing..!
- OJFord 5y agoYep I also use it with Svelte for a couple of side project tinkerings. Great combination IMO, but I think it was an excellent choice to just have a vanilla JS (TS rather, I suppose) API on the client side and let people use whatever they want, without pushing any sort of suggestion or framework plugin.
- Rodeoclash 5y agoI'd be interested in learning a bit more about how you've integrated Tauri with video playback. I have a synchronised video player tool[1] that I've built in Electron for the e-sports community. When I was investigating technology to use to build it, I was really set on using GStreamer as I could share a clock between all of the videos to ensure the synchronisation was perfectly accurate. Electron hasn't been too bad, I've been able to construct a quick prototype which will prove if people are interested in what it does. I'd ultimately like to build a native app though. [1] https://github.com/Rodeoclash/vodon-pro https://github.com/Rodeoclash/vodon-pro
- tentacleuno 5y agoThanks! I'll have a look. Looks promising :)
- uhhuhh 5y agoHaving used tauri for multiple projects I can say, it's absolutely worth paying attention too.
- jasode 5y ago>There are a number of solutions that are either dead or are not ready for production yet, such as React NodeGUI[0], Proton Native[1] or react-native-desktop-qt[2]. Just looking at your 3 examples, I notice they all depend on Qt ... and hence the Qt UI components instead of the more familiar HTML/CSS of Electron. So the code ends up looking like: const { QLabel, QMainWindow } = require("@nodegui/nodegui"); const win = new QMainWindow(); const label = new QLabel(win); label.setText("Hello world"); label.setInlineStyle("color: green; background-color: white;"); win.show(); global.win = win; So the idea of programmers having to learn a bunch of unfamiliar QXxx() like QLabel() etc -- will be a tough sell to gain mindshare. Yes, it's Javascript instead of C++ but the QXxx() will still create a lot of friction for adoption. Also, a dependency on the Qt framework may be worse than Chromium for various strategy/technical/license reasons. >Is "just stick Chromium into all your apps" seriously the best we can do as an industry? It's resource-inefficient to high heaven, The complaints about "resource-inefficient" attract a lot of agreement but also ignore the productivity of the developers that get to leverage their existing knowledge of Chromium-based components. If whatever alternative to Electron has SuperiorResourceEfficientTechnology also comes with unacceptable extra friction (aka learning curve) for adoption, it will then also lose to Electron.
- Aeolun 5y agoYou have react wrappers for all of those (hell, some already include React in the name, so they are the wrappers), so you really don’t have to learn unfamiliar syntax, just a bunch of new components.
- jasode 5y ago>, so you really don’t have to learn unfamiliar syntax, just a bunch of new components. Even with React wrapper, consider the differences and additional learning curve: Example from https://react.nodegui.org/docs/guides/styling https://react.nodegui.org/docs/guides/styling : import React from "react"; import { Renderer, Text, Window } from "@nodegui/react-nodegui"; const App = () => { return ( <Window> <Text style={textStyle}>{"Hello World"}</Text> </Window> ); }; const textStyle = ` color: green; background-color: white; `; Renderer.render(<App />); Compare with example from https://reactjs.org/docs/hello-world.html https://reactjs.org/docs/hello-world.html : ReactDOM.render( <h1>Hello, world!</h1>, document.getElementById('root') ); Maybe the Qt-based Nodegui even with the more accessible React syntax -- is still too much friction for wide adoption. Yes, everybody wants lower cpu & ram usage but that goal always competes in the marketplace of ideas with DX Developers' Experience. The DX of leveraging existing knowledge is a bigger priority to many devs. Does replacing QXxxx() with <Unfamiliar></Unfamiliar> really change the equation to adopt the Qt alternatives to Electron?
- antihero 5y agoI wonder if there would be some way of having a system wide electrond that hosts the rendering engine, that electron apps could check for the existence of and use, instead of having an instance for every app. Like a multi tenant electron. I’m aware that this is basically a browser, but it would be specialised and offer the same level of integration as normal electron unlike the tab-in-a-window that Chrome apps were.
- hitpointdrew 5y agoI saw a project on here a while ago that used Godot to make a desktop app. Godot is a “game” engine, but the app posted to HN was a business application. I thought it was interesting to use a game engine to make a business app, it actually looked quite good. I wish I still had the link.
- farseer 5y agoYou know WebGL may replace HTML for user interfaces one day especially if coupled with a VR headset. But you would still need Chromium for a unified cross platform experience. It's not hard to imagine bloody minded developers running a business app on Godot, inside a WebGL canvas on Chromium all packaged in an electron framework :)
- hitpointdrew 5y agoI am no Godot expert. But from the documentation it seems like you can compile and cross compile for other platforms without the need for electron. The exception being for Mac/iOS, which requires Xcode to compile, so if you wanted to compile for all platforms you would need Mac.
- lucraft 5y agoThis is related, and has a couple examples down the bottom https://medium.com/swlh/what-makes-godot-engine-great-for-advance-gui-applications-b1cfb941df3b https://medium.com/swlh/what-makes-godot-engine-great-for-ad...
- zozbot234 5y agoA "game" app like that sounds horrible for accessibility. How can this be appropriate to a business environment where any users might require special accommodation at some point.
- dartharva 5y agoSorry, I'm not very educated in this regard but how would it being developed in a game dev environment make it any less customisable for accessibility than an app developed in anything else?
- keithnz 5y agohow much is discord using? on windows it seems to use very little (27MB of RAM).
- anaisbetts 5y agoIf you want to write Linux apps, Flutter is a compelling alternative - it's not JavaScript but apps start fast and don't use much memory, but you'll still have a fast, React-like dev experience. Writing Flutter apps on 4GB of RAM isn't gonna work though, as the IDE / Dart analyzer uses a *ton* of memory. Would recommend using CodeSpaces or something similar if you go that route.
- chakkepolja 5y agoAnecdote: I have written flutter apps in 4GB of RAM, with both Vim+Dart LSP and IntelliJ (somewhat tuned for low memory, but it was fine for me).
- Aeolun 5y agoI just started building with NeutralinoJS, and have previously built with NW.js. Both don’t really solve the browser engine thing, but at least Neutralino is much smaller in terms of executable size. I like the idea you can use any language you want for the backend/system level stuff, though for me that just means more typescript :)
- dmarinus 5y agoI wish any Electron app would also be available as browser/web app, so I could just run it in a browser tab (and save some resources/memory?). This is possible for Spotify and Slack but not for Signal.
- sys_64738 5y agoCan you point Edge at the Signal webpage address? Seems like it should work.
- simion314 5y agoThis would have been one of the things Mozilla should have been involved, have their Rust/Servo team focus on node/electron alternatives too, this way they could have gain the minds of developers but they would need to somehow be able to accept donations for this projects and not for their weird activities not related to dev.
- cxr 5y agoMozilla was shipping Electron-style runtimes before Electron even existed—when computers with 128MB of RAM were still being used. These apps worked. The powers that be, in their infinite wisdom, decided to kill it (because obviously nobody wanted anything like that! the important thing is to do a phone!) That was going on ~10 years ago. The worst part is that the people who fucked that up refuse to acknowledge they were wrong. No amount of evidence is enough to penetrate their big dumb egos.
- fomine3 5y agoSimilarly(?) Firefox OS was killed before KaiOS become a big thing.
- bsenftner 5y agoUnpopular but a valid alternative is a wxWidgets application using the wxWebView component - very similar to Electron, in that it IS Chromium at the core, but it is in it's component pieces. One gets to pick and choose at a lower level what portions or the entire thing ya want. And being wxWidgets, it runs fine on the desktop OSes. But wxWidgets is unpopular, so be ready for assholes to tell you what you're doing is wrong.
- zozbot234 5y agoLazarus is a very similar technology based on Pascal. The language is a bit unusual but you could use it to design a cross-platform frontend that would connect to a separate "server" process running your app code.
- 2muchcoffeeman 5y agoWikipedia says the first web browser was created in 1990. And it says electron is 8 years old. So it took 24 years to get a cross platform rendering engine that was feature rich enough for great desktop apps. Even if we take these learnings, how long till we get a new framework good enough?
- cxr 5y agoGecko-/XULRunner-based applications (like Firefox) predate Electron by many, many years.
- johnisgood 5y agoHow old is Tcl/Tk?
- eternityforest 5y agoMy question is why Electron isn't a shared OS level thing. It seems like Chrome OS really had the right idea. Can't we have some cross platform app format that's just a ZIP file full of HTML, with some APIs that go beyond normal web features?
- ClumsyPilot 5y agoWindows 10 apps can be written in javascript, have access to all system APIs and can be rendered in system webview based on chromium, but developers are still too lazy to learn it and use it
- eternityforest 5y agoNow we just need Linux and Android to do the same, because that's amazing.
- The_rationalist 5y agoIonic/capacitor/cordova apps are all using the same shared webview instance, electron problem is a sad idiosyncrasie. In fact Ionic apps are smaller than native/flutter apps.
- IshKebab 5y agoThey're not too lazy to learn it. They want something that doesn't only work on Windows 10.
- rhl314 5y agoI am working on app that I wrote initialy in electron, but now have moved away from it.I have perspectives on both good and bad sides of electron The good parts Low barrier to entry - if you know javascript you are good to good. No need to learn C++ or Java for building a desktop app. Truly cross platform - any platforms that chromium supports, electron supports A very active ecosystem - The community around electron is amazing. I am a big fan of electron.build, things like code signing / auto updates etc are provided out of the box The not so good parts IPC hell Electron has a main process and renderer process and they communicate via events. I found myself swimming in the event soup very often. Easy to make mistakes This is more for a note for me or any beginner, but it is easy to write compute heavy code in the renderer and make the ui unresponsive or sluggish. There are many other things like this where it is easy to do things the wrong way. Security Electron still has a capable browser which can open any webpage. Mix that with native access and you have a remote code execution vulnerability on your hands. Bloated binaries Even the simplest of the electron binaries are large, thats just the nature of electron. Shameless plug The app that I am working on is https://loadjitsu.com https://loadjitsu.com, I rewrote it using golang, couldnt be happier.
- zozbot234 5y ago> Electron has a main process and renderer process and they communicate via events. I found myself swimming in the event soup very often. Ironically, this might also be what you need to write a fast non web based client to your app. By keeping the UI renderer is in a separate process, it could be written in any language or technology at all and the "main" app would be none the wiser.
- PhilippGille 5y ago> but now have moved away from it What did you move to? You mention Go, but which GUI framework? Fyne, Gio UI, bindings for GTK or Qt?
- sys_64738 5y ago> Low barrier to entry - if you know javascript you are good to good. No need to learn C++ or Java for building a desktop app. What language would you write the actual app logic in?
- sys_64738 5y agoElectron is the lazy way as there is no barrier to entry. But if I wanted to run a web app then I’ll use a browser. I avoid all electron apps except Teams and Edge. When we have a text editor requiring electron then we’ve truly lost our way.
- black3r 5y agoDevelopers often work on high-specced laptops and it's hard for us to even remember how using 4GB of RAM feels like. My first laptop I used for professional work had 16GB of RAM and that was a 1000€ laptop 9 years ago. That laptop still works and Discord is usable on it. On the other hand I did see a computer with 512MB of RAM in use at a high school in my country in 2018, so I understand that in some places people can't afford to upgrade their hardware. But if RAM is the only issue and most 15 years old hardware can be upgraded to 8GB or 16GB of RAM for 80€, I believe that most developers simply see problems on 4GB RAM systems as a non-issue.
- kkfx 5y agoBecause of sheep effects and state of things: Big&Powerful want all to be web, to be hosted on their datacenters, with the maximum lock-in possible, so they push desktops toward classic mainframe dumb terminals. The outcome of such push is: - we do not have anything really cross platform, at least in look&feel terms, there are classic, old, and nearly ignored by most (T)Tk but not much more. Windows have it's own GUI, OSX it's own as well, Qt have derailed long time ago toward a bloated monster with an uncertain future, GTk have derailed since GTk3, and both still do not have a real "native look&feel" on all platforms; - developers fear having invested a big amount of time and resources on something and then being forced to reinvest time and effort just because at a certain point in time a dependency they used vanish or substantially changing imposing a almost total rewrite of the UI. WebUI then seems to be the "safest" way to go, at least they can "float" between various platforms as needed and people know them and like their colored style... However chosen a classic local server for a localhost webapp is longer than just grabbing something already made and then... IMVHO the real alternative is say STOP. Witch means for now ok-ish to develop locally served WebUIs or classic Tk/fltk/OpenGL (depending on the kind of GUI) but certainly not in the Electron/node sauce, only the UI and as much detached as possible from the core logic for the narrow target. For the broad target push back toward a real desktop model. Push networked applications that are not web thing, like pushing again emails with a local MUA, not a webmail, a local maildir not on a remote IMAP, locally indexed to have GMail like search (notmuch/mu for instance), file sharing apps like SyncThing/Retroshare, Jami for audio/video communications etc.
- mikewarot 5y agoYou can use Lazarus IDE/Free Pascal to build small efficient executables on most platforms. A small GUI built without debug information clocks in at less than 3 megabytes on Windows. To get to the non Mac/Linux/Windows end users, Free Pascal is working on a WebAssembly back end, which should allow you to run in a browser. Here's their RoadMap/Status page - https://wiki.freepascal.org/WebAssembly/Roadmap https://wiki.freepascal.org/WebAssembly/Roadmap
- mamcx 5y agoElectron exist because multi-millon dollar companies and the BEST paying people on earth not care about users, at all. Only what is convenient and fast to do. --- Alternatives exist, since long time ago. But developers are LAZY. A LOT. That is why the worst tech that exploit laziness and reward instant gratification (php, js, node, mongo, electron...) survive and get poured millions on effort fighting them, instead of invest is what is better. Ironically, this kind of tech WASTE money and time like is not tomorrow, but that is for later, and the major effects are not on the laptops of the developers that made it...
- nunez 5y agothe funny thing is that all of the apps that run in Electron use much fewer resources when run in the browser itself. so thats what I do. i don't think many people outside of us technical folk care about electron apps using tons of resources to do what they need to do. (many folks run chrome, for example).
- YATA0 5y ago
- mherrmann 5y agoThere are great alternatives. I used Python and Qt to create my file manager fman [1]. It's a tool that needs to start quickly so Electron was not an option [2]. I open sourced my build system for creating cross-platform desktop apps with this stack in minutes [3]. For a quick tutorial, see [4]. 1: https://fman.io https://fman.io 2: https://fman.io/blog/picking-technologies-for-a-desktop-app-in-2016/ https://fman.io/blog/picking-technologies-for-a-desktop-app-... 3: https://build-system.fman.io/ https://build-system.fman.io/ 4: https://github.com/mherrmann/fbs-tutorial https://github.com/mherrmann/fbs-tutorial
- baxuz 5y agoIsn't QTs licence quite expensive for commercial products?
- heavyset_go 5y agoAs long as you adhere to the terms of the LGPL, you can use QML in commercial products for free. There are some add-ons that are distributed under the GPL 2 or 3, though. You can use this page[1] to navigate the licenses for Qt. [1] https://www.qt.io/product/features https://www.qt.io/product/features
- rg111 5y agoTangehtial comment: I do not use the Discord Electon app, but use it as a pinned tab on Firefox. I would not trust a full browser running on my machine on which I have no control and they can mine whatever telemetry data they want.
- starfleet_bop 5y agoAs a compromise are there any major downsides to instead deploying your app that hosts its own lite http server using a multi-platform library in Go or Python, which then uses the pre-existing web browser to render the UI?
- armchairhacker 5y agohonestly you can use Java or Kotlin. Java/Kotlin targets macOS, Windows, and Linux just like Electron. Even though you’re substituting V8 for the JRE, JRE is much faster and smaller and should not eat up your RAM. The main downside is that you don’t get to write your UI in HTML. IME, most Java applications look really ugly, but they run very fast and work well.
- Fire-Dragon-DoL 5y agoDo we run the same java apps? Every time i encounter a java app the ui is way less responsive than any electron app. Of course, this might be due to the ui framework, still point stands.
- pengo 5y agoWe use Object Pascal (via Lazarus) and compile the code for each target platform. The apps concerned are (only?) dev utilities, but they're fast and have a small footprint.
- heavyset_go 5y agoQt's QML is both declarative and reactive, and even lets you program in JavaScript or TypeScript. It also uses a tiny amount of memory and it's really fast. It's the closest thing to the React and Electron model while still being fast and efficient. There are some suggestions, on Mozilla's suggestion platform Mozilla Connect, for turning Gecko into something like Electron[1][2]. In the past, Mozilla ran the Positron project, which was an Electron-like library on Gecko[3]. [1] https://connect.mozilla.org/t5/ideas/create-an-alternative-to-electron/idi-p/268 https://connect.mozilla.org/t5/ideas/create-an-alternative-t... [2] https://connect.mozilla.org/t5/ideas/ability-to-embed-gecko-as-an-alternative-to-chromium-embedding/idi-p/186 https://connect.mozilla.org/t5/ideas/ability-to-embed-gecko-... [3] https://github.com/mozilla/positron https://github.com/mozilla/positron
- hpen 5y agoAs native tools get easier to use I believe they are the way to go
- graderjs 5y agoI'm working on an alternative. It's a slightly different take, but provides similar functionality of Node.js plus front end code in a packaged binary. Instead of using a weird custom fork of chrome and downloading that for every different binary we just use the system Chrome browser (or install it once for all apps). Eventually we can probably expand to use other Chrome browsers or even other web driver supported browsers which Firefox seems to be building that support out. I just like the idea of using something that's already on the system. Take a look at the wonderful GraderJS, heh :) https://github.com/crisdosyago/graderjs https://github.com/crisdosyago/graderjs
- pipeline_peak 5y ago> Is "just stick Chromium into all your apps" seriously the best we can do as an industry? Is there a layout engine that performs faster and more flexible?
- krapp 5y agoLiterally every other layout engine in existence is faster and more flexible, even the ones that use native webviews. And what does "flexible" mean? With Electron you're limited by what HTML/CSS/JS allows you to do, that limitation doesn't exist in native. Do you really think hacking a document display model to simulate a GUI allows greater flexibility than everything else out there?
- pipeline_peak 5y agoYou mean Gecko and Webkit? Okay
- mekster 5y agoWhy don't you open them in browser tabs, let notifications come through your phone when they're closed?