4 ms·
I saw a post called "Electron is flash for the desktop" a while back. I think that's basically true but the rationale is different. Flash was a way to get true
by api 9y ago
I saw a post called "Electron is flash for the desktop" a while back. I think that's basically true but the rationale is different.
Flash was a way to get true high performance dynamic content on the web before high performance JS, HTML5, and stuff like React. It was a way to be ahead of your time on the web.
Electron on the other hand is more of a fuck you revolt against the desktop.
It's 2017. Desktop computing paradigms are over 30 years old. Yet if I want to write a desktop app I still have to write the f'ing UI at least three times: Windows, Mac, and Linux/BSD. It's not just different APIs either. It's totally alien paradigms: different languages, different ways of specifying a UI, and different API paradigms. This would be defensible if these desktop UIs were substantially different, but they are not. The difference does not justify the divergence under the hood at all.
Qt is the other big cross platform competitor to Electron, but it's also a complete re-implementation of the UI, is almost as heavy, and is in some ways less modern and feature rich. The web has such a huge user base that it's always up to date and always has the latest stuff, while Qt languishes with its own weird way of doing things.
WxWidgets was my favorite past attempt in some ways. Its APIs are ugly and horribly outdated but at least it tried to use native widgets everywhere and look and feel native.
React Native is a neat idea but you still have to drag in a complete JavaScript runtime so you are nearing Electron levels of bloat there.
Someone should do a modern WxWidgets type library using modern APIs and that works with modern C++ (C++11 at least), Go, and Rust.
- pfooti 9y agoThis is absolutely correct. It may be better in quantifiable end-user metrics to have different native desktop apps for every user. However, it is far worse in developer cost to write those apps in native frameworks. The trade-off being made is not native vs electron, it's electron vs nothing at all.
- zargon 9y agoNo, it's not electron vs. nothing. It's one good single-platform application vs. one terrible cross-platform application. If you don't have resources for developing on multiple platforms, it is OK to choose one.
- Asooka 9y agoThat modern WxWidgets library would be just Electron in everything but name (because you want people to use it, so you'll have to support what people already know, which is html+js) and people would abuse the abundance of resources on modern desktops just the same. Electron itself is not the problem. Awful usage of Electron is the problem. I would say Electron is the desktop equivalent of PHP. It lets people who don't know why signed left shift can invoke undefined behaviour and don't care if their code is indented with a mix of spaces and tabs, i.e. people who aren't the minutiae perfectionists that native APIs require them to be, to write dumb GUI apps in something that isn't tied to Microsoft's whims and has a learning curve reminiscent of a kiddie pool. What we need is some better linters, profilers, &c integrated in development environments used to write Electron apps, to help and inform the authors of how to write the most performant GUI possible. People won't write GUI using VisualC 6 + MFC ever again, I see it as best to just meet them halfway.
- ttoinou 9y agoSomeone should do a modern WxWidgets type library using modern APIs and that works with modern C++ (C++11 at least), Go, and Rust. The most minimal effort to do that would be to improve wxWidgets rather than begin a new library from scratch (PS : I use wxWidgets and it's great !)
- rectang 9y ago> Yet if I want to write a desktop app I still have to write the f'ing UI at least three times: Windows, Mac, and Linux/BSD. Vendors and developers do not have the same interests. Developers want to maximize the market for their skills. Vendors want to lock you in, and are perfectly happy to waste your time and harm your career to do it.
- ahartmetz 9y agoQt is absolutely not "almost as heavy" in memory or CPU time. Maybe in disk space. It also allows customization at several abstraction levels, which is what makes it more flexible than most of the competition.
- merrvk 9y agoOur react native apps are around 10 - 15 mb in size once bundled, which is hardly bloated.