5 ms·
I feel that we would've had better tooling for writing performant GUI apps today if electron JS never took off. It certainly has its place, and I laud the auth
by injuly 3y ago
I feel that we would've had better tooling for writing performant GUI apps today if electron JS never took off.
It certainly has its place, and I laud the authors for their efforts, but seeing how every startup is using electron for their native applications, I have little hope for lean software.
At the end of the day, developers need to finance their projects. No other toolchain out there [1] is going to give you the flexibility, development speed, and freedom to develop beautiful looking desktop apps using the muscle memory you trained while writing webpages. Of course, you can write the same application in Qt, GLFW, whatever, but I don't think anyone will disagree that it's much slower to build and prototype responsive UIs with these tools.
[1] Wry and Tauri (https://tauri.app/ https://tauri.app/) might be noteworthy, but I don't know how much of a difference they make, as the runtime is still JavaScript, HTML, and CSS.
- stakhanov 3y agoLack of toolchain is one problem, although I think that there are alternative toolchains out there that are quite feature-rich and could definitely achieve feature-parity with the web ecosystem, if only there was enough interest in using them. JavaFX, even though it's outdated, is quite up to the job of replacing most Electron-based UIs. Qt is definitely extremely powerful, but has the drawback of being tied into the C++ ecosystem which seems rather dated now. Even some hobbyist efforts are worth mentioning in this category: AvaloniaUI (in the C# ecosystem), HaxeUI & FeathersUI (both in the Haxe ecosystem and building on game engines). I think, the bigger problem is sourcing developers. Web developers are comparatively cheap and abundant, so a commercial entity is always going to have trouble justifying hiring a comparatively expensive and difficult-to-find developer in the C#, ObjC/Swift, or Java ecosystem, when the job can also be accomplished by a web developer.
- brabel 3y agoYou know, I thought I was a fool for writing my apps in JavaFX... but after trying many other things, it seems it's up there with the best of the bunch. My non-trivial app can be built with jlink to be a no-dependencies on JVM binary for all Operating Systems.... each of which sits at just 30MB... and when run, it needs around 60MB of RAM, which is a lot but I am yet to find a multiplatform UI toolkit that delivers much less than that... except for some toy frameworks which can't really be used for realworld apps.
- alwayslikethis 3y agoI have another feeling that while what you say is likely true, in a world without Electron, we would have a lot less common software available on Linux with companies opting for native UI toolkits on Windows and Mac only. Qt, though better than electron, isn't that lean [1], and is available under only LGPL or an expensive commercial license. I also don't think Electron is entirely responsible for the slowness in many applications (Slack), but rather the bloated web design itself. 1. https://federicoterzi.com/blog/why-electron-is-a-necessary-evil/ https://federicoterzi.com/blog/why-electron-is-a-necessary-e...
- guappa 3y agoA lot less software on linux without electron? I have been using linux for 20 years and I've yet to use one electron based software. There is no problem with LGPL. From your link: " QT is free to use as long as you release your code as GPL" That is false. It is free as long as you don't statically link qt, and you distribute your eventual changes to qt itself (which aren't needed in most cases). Of course if we spread misinformation, we might draw different conclusions, which is why it is important to start from correct non-made-up premises.
- palata 3y agoI agree, LGPL is totally fine. But I also believe that most devs are not comfortable with linking/packaging/dependency management, and therefore don't really know how to handle LGPL (or to say it in a more politically correct manner: "don't have time to handle it properly"). Which is obviously a pity.
- rubymamis 3y ago> most devs are not comfortable with linking/packaging/dependency management Using `macdeployqt`, `windowsdeployqt` and `linuxdeployqt` takes care of that in mostly one click. I used to look at other open source apps workflows to figure it out. Now, others can look at my app's workflows for a complete packaging experience for Windows, Linux, and macOS[1]. Huge credit to contributors for my OSS app for implementing and perfecting it. [1] https://github.com/nuttyartist/notes/tree/master/.github/workflows https://github.com/nuttyartist/notes/tree/master/.github/wor...
- petabyt 3y agoA while ago I compared the memory usage of Electron and Tauri/Webview, and Electron did same if not better in RAM usage.
- Aerbil313 3y agoThat’s normal and expected since they both use the same browser. Difference is when you have multiple apps open. All Tauri apps, along with your browser use the same libraries and binaries loaded into the memory. Meanwhile every electron app loads another browser into the memory. Ofc I’m simplyfying a bit since if you use Firefox as your browser and Tauri uses Chromium that’s two browsers worth of memory usage, but still not 5 or 10.
- politelemon 3y agoI'm more cynical in this. I think another bloated foundation would have taken off in another language. A lot of it comes down to accessibility to the masses. JavaScript for all of its horrors, and the self fulfilling cycle of its horrors, has a low barrier to entry. Think of anything else that's similarly easy and that's where I think effort and attention would have gone. So, if not js, I'm thinking probably in python.
- presentation 3y agoWe'd be in a better place if web APIs to access system resources didn't suck or weren't intentionally gimped by companies like Apple. Tauri seems like a way out, but can't say without having tried it. The web is the best cross-platform environment we have as evidenced by the fact that developers flock to stuff like Electron at all, but then you end up needing to ship your own entire browser engine to achieve a reasonable level of control. If PWAs didn't threaten App Store business models we'd probably be in a better place RE web app distribution (just use the browser you're already using anyway). Doesn't address the issue that web app development is flooded with bad choices and opinions that lead people to decide that the whole ecosystem is overcomplicated and bloated, but that's not an opinion I hold very dear as someone who feels pretty comfortable with web tech stacks and understand where they came from. I do think the skill bar is too high right now, where most engineers are likely to do a bad job RE performance and security with what we have unfortunately. But I'm not confident your average engineer would do any better if it were a different ecosystem.
- guappa 3y ago> The web is the best cross-platform environment we have as evidenced by the fact that developers flock to stuff like Electron at all I suspect that web developers who only know web development flock to electron because they think it's easier than learning a new technology. In my professional experience, it is perhaps easier for a web developer who only knows JS to get a prototype working, but when you want a nice application you end up having to re-implement a number of things that any regular widget toolkit would already offer. So on the long term I don't think it's cost efficient at all, but at that point you've already spent resources on your electron GUI so you keep going forever.
- lawgimenez 3y agoLook at Telegram, all their apps are written in native. Still one of the best, and still getting better every release.
- geraldhh 3y agonot to dispute the point (i am cherishing tg for their native apps on all plattforms) but not sure about what is getting better
- saagarjha 3y agoTelegram's apps, at least on Apple platforms, are not what one typically would call "native" since they roll their own widgets for basically everything.
- rubymamis 3y agoTheir Desktop app is written in Qt C++[1]. [1] https://github.com/telegramdesktop/tdesktop https://github.com/telegramdesktop/tdesktop
- Gigachad 3y agoTelegram is quite good but I honestly don’t notice it being any better than discord. Telegram isn’t exactly light either. It frequently sits at about 400mb memory usage.
- nottorp 3y ago> At the end of the day, developers need to finance their projects. No other toolchain out there [1] is going to give you the flexibility, development speed, and freedom to develop beautiful looking desktop apps using the muscle memory you trained while writing webpages. Why do you restrict yourself to only knowing how to write webpages? > Of course, you can write the same application in Qt, GLFW, whatever, but I don't think anyone will disagree that it's much slower to build and prototype responsive UIs with these tools. Maybe because you don't have the "muscle memory" to write Qt? But since you mentioned Qt, one of the greatest hits to developing cross platform applications was the Nokia/Microsoft disaster. Nokia bought Qt from Trolltech and made it LGPL, because their plan was to make money from the hardware not the software. Then they died, for reasons that have been commented on endlessly. From the ashes of Nokia rose Digia or whatever it's called this week, a company that maintains Qt badly and thinks it's a good idea to threaten developers that download their LGPL product. RIP Qt, RIP cross platform development.
- rubymamis 3y agoQt is definitely not dead, rather alive and kicking. I've built my latest note-taking app[1] in Qt C++ and QML and it's been one of my best decisions. What the Qt Company need to focus on is hunting bugs (there are many of those) and reduce their license fee (at least for indie developers), it's just too expensive[2]. [1] https://www.get-plume.com/ https://www.get-plume.com/ [2] https://www.qt.io/pricing https://www.qt.io/pricing
- nottorp 3y agoHave they given up on asking you 3 times if you are absolutely truely sure that you can comply with the license terms when you download the LGPL version? With that attitude I can't recommend it to any entity that can't afford a full time legal team.
- guappa 3y agoIf you install via apt you get no prompt whatsoever.
- ogoffart 3y agoWith Slint (https://slint.dev https://slint.dev) we're trying to make a lightweight toolkit that doesn't use HTML/CSS. And that you can program either from low level languages such as C++ or Rust. As well as with higher level language such as JavaScript, and we want to extend to python too. We hope to make it easy to develop desktop UI without using HTML.
- rubymamis 3y agoHi there! I would love to see a demo on the website that doesn't look intended for embedded/enterprise devices, maybe a simple Todo app? Best of luck with Slint!