Electron 7.0
electronjs.org
electronjs.org
For context, I love and have worked a ton with Qt, and I much prefer Qt UIs as a user. But Electron has brought true cross-platform development to all platforms (Including Linux!). If it weren't for Electron, I wouldn't even have a bunch of the apps I use today. Hell, I wouldn't have a good IDE, and I don't think I'd be as good in Typescript had I not been a day-1 VS Code user.
I think the main thing preventing it from "feeling" good to most users is the most common complaint on HN about how each individual app is its own version of Chrome. This sucks; it's heavy, it's laggy, and users feel it even instinctively.
OSes and frameworks have tried to solve this a bazillion ways. Edge WebView, Android WebView, Qt WebView, QtWebkit, whatever the iexplore stuff was in XP, …. Electron might have the opportunity to actually solve this.
If it does, honestly, to hell with anything else. I'm sure over time the web world will gravitate towards a fairly common set of widgets that will, at one point or another be standardized. We'll reinvent UI frameworks under a different name, except this time they'll be running under the ultimate cross-platform framework.
It also comes as an Electron app, because it wants more system privileges than browser tabs are ever allowed to get -- to tell people what game you're playing.
It's already amazing in how it abstracts common elements for such distinct environments like desktop, phone, TV and watch while still exposing OS-specific features. Why not other operating systems?
The approach has been tried, and succeeded to some degree. But the web is the only app where cross-platform is the default, and it's truly hard to avoid it. Even if the widgets all look different. Even if nothing looks native (people got used to it anyway).
And to be clear I want the status quo to improve in this regard, especially in terms of accessibility (nobody should have to reimplement eg their own dropdown especially if it breaks eg. keyboard shortcuts, mobile UIs and so on). But I can't see anything from today that isn't either a web technology, or web-compatible (and web-accessible, not the Qt webgl hack that's on the frontpage right now) making it in the long term.
That's just because it describes its own embedded rendering system.
SwiftUI's syntax feels closer to a markup language than code, though, so it might be more appealing to web frontend devs.
No. Chrome is the only platform that is cross platform by default. But IE, eg, has definitely had behavior differences in the past.
On the other hand, Qt is cross language, but not necessarily cross platform (it excludes iPhone and Android, say)
Qt supports Android and iPhone.
Only Qt never had the funding or resources or will to get native UI right.
Their non-native widgets are always off, in a way that even Electron, is not (because it being web-based means it at least follows familiar conventions for all web users, where a mimicked native GUI enters the uncanny valley).
There are also custom native but not platform-native (meaning close to the metal, no web-based) GUIs like Adobes, Fruity Loops, and others, that look good on all platforms and users have no issues with them.
That is what I'm talking about: SwiftUI automatically uses the recommended conventions for spacing, padding, etc. which are different for macOS vs. iOS etc., and it also takes user environment settings into account, like font sizes and other accessibility options.
So even if Apple doesn't want to port SwiftUI, maybe other people could.
The visual and interactive differences between a macOS app and a Windows app are actually less stark than the differences between a macOS app and a watchOS app (crown) or a tvOS app (remote), but so far, despite its early bugs and limitations, SwiftUI does a great job of outputting the native controls on all [of Apple's] platforms.
Things like NavigationViews and TabViews produce different beasts on macOS, iOS, iPadOS, and tvOS, from the same code.
See WWDC 2019: SwiftUI On All Devices: https://developer.apple.com/videos/play/wwdc2019/240/
The whole situation is bizarre and comical if you look at it from a distance:
Everybody ALREADY puts tremendous effort in making sure things look and work the same everywhere: Browsers!
Not just Apple, Google, Microsoft and Mozilla, but the thousands of third-party maintainers (like yes Electron) in this newly-created circle of Hel that is the JavaScript ecosystem.
And now we're trying to turn the browsers into operating systems!!
Everyone keeps trying to reinvent a wheel that doesn't travel very far to begin with (see all the missing features from web apps that native apps get, being discussed on this page.)
This is a weird comparison. Electron isn't really a UI framework, it's more of a customized web browser and JS runner, with some platform APIs to bridge the gap. But no, I don't know of anything serious that lets you write web UIs in C++. The closest you'll get are things like Google's Closure Compiler which compile Java to JS.
There's very likely something for C++, but nobody's seriously using that, probably because nobody actually wants this. "All of C++'s hare-brained syntax and slow iteration speed, with none of the performance benefits!" is not a good selling point.
Absolutely, when considering cross-platform UI frameworks in general. In that sense, Qt competes not only with Electron, but also with toolkits like wxWidgets, GTK+, JavaFX, Flash, and some older ones like Java/Swing, Lazarus and Adobe/Macromedia Director.
Maybe that's Skype's fault, it wouldn't surprise me, but I think I've seen this behavior elsewhere. Skype is, thankfully, the only Electron app I have to interact frequently.
What is different today is that Windows 10 and other popular platforms adopted Flat UI. Users no longer expect apps to have “native look & feel” because Flat UI has no recognizable or desirable look & feel. This is a big mistake by Microsoft because there is no longer any reason for independent developers to write native Windows apps. This works to the benefit of Electron and also users of non-Windows platforms.
Yeah, Microsoft bashing never grows old.
My largest gripe with it, besides the others that are discussed ad nauseum already, is that it is impossible, seemingly, for Electron apps to spawn multiple windows without creating entire new instances. I have several Electron-based chat applications that are a trainwreck to use, compared to their predecessors, because there is no effective way to handle more than one chat at a time; they can't just pop out a small dedicated window for a chat conversation, they have to live inside their one window, and this results in a terrible tabbed UI where one is constantly flipping back and forth between conversation threads. Or the bevy of Electron text editors that you cannot tear a file tab off and put on another screen.
I know people like to rag on Electron, but without it, I wouldn’t be using something else, my apps just wouldn’t exist. It allows more people to try building more thing and that is a net positive.
The speed problems and bloat issues of Electron is just shoddy programming on the maker’s part - Electron itself isn’t slow. I use it largely as a shell talking to a Go binary that ships within the app package, which makes it only tasked with UI. If you’re having issues with speed, it’s a good approach.
A real world example of this approach is the thing I work on at https://aether.app. (An async collaboration tool for engineers)
I liked the site, it's clean and to the point. Just a small nitpick: right under the Demo download button, you say "(Demo does not have Pro features such as team management, access control and others)".
I wouldn't say that - that essentially gives the user a (subconscious) rationale on why she shouldn't download the demo. I would suggest to focus on the positives instead - what the Demo can do. If you can somehow remove limitations, even for 14 days - even better!
I’ll try to find a way of making it less of a showstopper though - might be a better way to tell this.
Edit: Also as an example, Aether comes with plenty of shortcuts, or even has proper tabbing and tab highlighting for low-vision users. Electron prevents none of these, in fact the platform it’s based on, the DOM, is one of the most accessible platforms ever made in terms of support. Whether people actually make use of it it is another matter.
Examples would be shortcuts, tabbing through form fields, how a file explorer works and other small things. The file explorer in VSCode for example doesn't really behave like a native one, you have to manually refresh, you can't easily drag and drop and everything just feels a bit off.
Electron is sooo simple. I mean, we've run into some pretty interesting issues like with hardware acceleration and difference in color and font rendering between platforms, but if a guy like me can code, sign and ship a fully functional application, anyone can.
Also, I can really recommend Vue and Quasar for anyone looking at building electron and mobile apps. Really fun!
Since then, I think many of us have gotten tired of looking at overdesigned sameness that by now we all know will age quickly. Programmers no longer see the sense in chasing a perpetually changing visual standard for no reason other than "BigCo said so". Most importantly though, BigCos in question have fallen out of our good graces, and the "Design Systems" they keep pushing are now regarded as nothing but cynical branding exercises that come at the cost of UX.
It's a pendulum.
As a front-end dev, I'm not entirely sure I agree with that. The DOM has some annoying performance limitations, and I'd love to be able to use something better for rendering. I think what the DOM has shown, is that cross-platform and the ability to easily do custom look and feel are crucial.
Well put!
The original point - that people would get confused from non-platform UI schemes - has been proven kind of moot since most games have their own domain specific UI schemes and people love them anyway.
They really don’t. Have you taken a look at the thriving ecosystem of native, powerful macOS apps that follow platform conventions?
I also think "professional" apps are a special case (which is a totally subjective classification). Even Apple and Microsoft have done their own thing for professional apps since forever. If I'm going to use that app for 8hrs every day, I'm more accepting of learning something new. I'm still more likely going to pick up an app if it follows existing conventions...I already chose my OS because I've learned and like those conventions.
Do you have a more modern example?
I emphatically disagree. There are still jokes (from legitimate annoyance) that the main consoles have different conventions for buttons and button names. It's awkward to navigate menu system with a simple up, down, left, right, accept, cancel when accept/cancel move around system to system. At least on desktop computers Spacebar/Enter and Escape are mostly consistent.
As for in-game control schemes, it's generally coalesced around wasd + mouse and USE. Even with that there are jokes (stemming from legitimate annoyances) about putting down a game for a week because you're older, are a parent, and have other responsibilities, then having trouble picking it back up.
This is a major reason I'm incredibly selective about the games I play and one reason I avoid online play. Sure, I'm one data point, and it may not apply to a majority of the cashflow for gaming, but I see it expressed online quite often.
But the thing about those is that they are 'hidden' and require memoization. There is no on-game HUD that would show legend of all the available actions all the time. If you could have that, then people would be much more comfortable about even the hidden schemes.
There are game UI:s that are mostly mouse operated, and expose the user interaction grammar using the game specific, visual UI narrative. My kids seem fine navigating between those. A great example is Roblox, which has lot of "controller heavy" games where there are custom UI:s for building and configuring lots of things.
There are no guidelines that the authors defer to, but, they organically try to make the UI:s as understandable as possible. Most of the time they copy established conventions anyway, and when they don't either the UI is still understandable or no-one will play the game.
Yes grey text on a white background can look great on a retina screen, but does it look good across the product range from the last 7 years and all devices, lighting conditions and for people with various disabilities?
I use web apps so often that Electron looks natural
And I'd even argue that, with the freedom Electron gives you, app developers have started to actually pay attention to their design, rather than just using the standard toolkit and considering it done - so Electron apps often have better UI. I'd take VSCode's UI over Geany's any time, for example.
Cool. With Electron your app will only work on Linux/Windows/MacOS. There are other cross-platform solutions.
Yes. Or Linux on non-x86 platforms.
Linux The prebuilt ia32 (i686) and x64 (amd64) binaries of Electron are built on Ubuntu 12.04, the armv7l binary is built against ARM v7 with hard-float ABI and NEON for Debian Wheezy.
Running Electron apps on Windows for ARM devices is possible by using the ia32 binary.
lol
Portability is not Electron's strong suit despite all the marketing hype to the contrary.
Besides, Java works fine on BSDs. Why is it that when modern developers reinvent the wheel they so often manage to do it worse than the last time?
Portable GUI code is harder than portable code without a GUI.
I guess, but the amount of people I know that use BSDs are even fewer than the amount that use Linux. Given that Linux is a hard enough sell to support for most apps I doubt that BSD support would be offered even if the framework supports it.
> Besides, Java works fine on BSDs. Why is it that when modern developers reinvent the wheel they so often manage to do it worse than the last time?
Speak for yourself, I would MUCH rather use an Electron app than a Java app. No need to make sure you have a proper JVM installed AND the apps don't look hideous like 99% of the Java apps I've ever used do.
Plus we are talking about regular Java here.
Developers in the 90s often supported 5 or more different platforms. How is it that modern development is so much worse?
That's an awfully bold, if unbelievable, claim given that cross-platform toolkits have existed for a long time.
It's the same reason any app developer nowadays only supports iOS and Android and not say, KaiOS (honestly, hands up if you've even heard of KaiOS). Don't rag on software teams for making trade-offs based on the resources they have.
It's not just that app devs aren't making non Linux/x86 apps, the problems are that those devs now cannot make non Linux apps. Period. In spite of this lack of portability they're now crowing about how portable and awesome their "cross-platform" app is. All of this to provide the consistently mediocre Electron experience.
Mediocre and working > not existing
To what end? The Electron devs have explicitly stated they will reject patches adding support for other platforms. Node is just as bad (letting trivial patches that would fix compilation on FreeBSD just fester).
I've already looked at the folks trying to port Electron to FreeBSD and honestly the build system on its own is absolutely horrifying. Qt (even Gtk) is far superior in this regard.
If Qt works for you, use it. Electron works for many people. I don't like Electron apps very much either, but I definitely prefer working Electron apps on Linux than just not having that app available in the first place.
So I can run proprietary apps (because that's what these self-professed app devs are talking about mostly)? Not gonna happen.
Just because upstream wouldn't accept it doesn't mean that it can't exist.
No, it just means it's a lot of unnecessary work for a framework that already has an arduous build process. I haven't found that killer Electron app just yet so what that means in practical terms is that VS Code goes bye bye when my MacBook Pro finally dies and I move away from Apple (and likely to OpenBSD) on the desktop.
I definitely prefer working Electron apps on Linux than just not having that app available in the first place.
That's what's known as a false dichotomy. Even if Electron were the only choice, how many of these Electron apps (e.g. Slack, Discord, Signal) would be better off just being used directly from the browser?
Well then you don't want it that bad.
> I haven't found that killer Electron app just yet so what that means in practical terms is that VS Code goes bye bye when my MacBook Pro finally dies and I move away from Apple (and likely to OpenBSD) on the desktop.
You seem to care an awful lot about an issue that doesn't seem to affect you. Why?
> That's what's known as a false dichotomy. Even if Electron were the only choice, how many of these Electron apps (e.g. Slack, Discord, Signal) would be better off just being used directly from the browser?
I've been using Linux off and on for over a decade now. The single biggest thing that has made it possible for me to use it as my daily driver is that I can continue to get work done without resorting to kludgy workarounds like running everything in a browser. Most companies that I've worked for use Slack enough that not being able to Alt+Tab to it would be a dealbreaker. Even if the only feature that Electron brought was a standalone browser that you could alt+tab, it'd still be worth it. Of course, that's not the case -- allowing for better integration with the desktop is also excellent.
Because it does effect me. Electron is promoting a monoculture of apps that don't behave well (resource usage, accessibility, abysmal native integration) and they're not portable to boot. What that means in real terms is that more and more that quality native apps become less common and hacky Electron apps become more common. Unless you're using an unsupported configuration, then Electron just means that people are being encouraged to standardize on the lowest common denominator and ignore you.
VS Code? Definitely not my first choice, but its rust support is still better than IntelliJ (or nearly anything else for that matter). But that's network effects for you.
So choose an Electron supported OS or add OpenBSD support to Electron somehow. If VS Code is important enough to you, then that's a trade-off you have to make.
I don't think I'd agree that Electron is "hacky". I'd certainly say it has shortcomings, but what technology doesn't? Rust certainly does, but you tolerate it because you (presumably) enjoy/use the language for things you care about.
At the end of the day, most users aren't going to give a shit about what technology a thing is built with as long as it works moderately well. Solo developers being able to provide an application to 3 desktop platforms (one of which is historically underserved) with a single codebase is a powerful thing. The same argument applies to cross platform mobile technologies. Flutter, as an example, doesn't support WebOS, but it supports the vast majority of users, so it's gaining traction. Yeah, there are some tradeoffs, but I challenge you to find a technology where no such trade-off exists.
Since you mentioned Qt: Qt's main audience is C++ developers. I have no interest in writing C++. There are Qt bindings for other languages, but good luck finding one that's as well supported as Qt's C++ ecosystem. There are a couple of commercially supported Python options, but then you have packaging woes. Plus, you have to worry about licensing. Or I could use Electron, reuse a lot of the code that I've already written for my web app, sprinkle in some desktop integration, and I'm off to the races.
As an aside, the Rust language server (and most other language servers) works pretty well with Neovim. You can probably get at least the same experience with some work on your part. I assume the same can be said of Emacs, but I don't have the dexterity or number of fingers necessary to use it, so I don't know for sure.
Why? My whole point is that Electron is encouraging developers to not support other platforms. That's not helped by simply using something that the Electron devs have blessed. The absolute last thing I want is Electron to dictate which platforms I can and cannot use.
or add OpenBSD support to Electron somehow.
This too seems like a fools errand as the Electron devs have decided that anything beyond Windows, MacOS, and Linux will not ever have official support.
Since you mentioned Qt: Qt's main audience is C++ developers. I have no interest in writing C++.
Then don't. I'm currently working on a project that's using a rust backend and a Qt/QML front end. If you're more comfortable with JS then QML is an easy leap. The caveat being that you've got to drop down to C++ for some things. The biggest example I've seen is table data sources, but even that is due for vastly improved QML support in the next version of Qt.
Or I could use Electron, reuse a lot of the code that I've already written for my web app, sprinkle in some desktop integration, and I'm off to the races.
Right, and now we're back to "this sounds good to the devs" while the users suffer. In the mobile sphere where this has been common for a longer time, reskinned web sites work extraordinarily poorly. For example: Apple adding native app support to iOS, Facebook dropping their HTML5 based apps, and nearly any other app that's a lightly skinned site (BBC and NPR come to mind). It's not any better on the desktop side as evidenced by the poor accessibility and resource usage of Electron apps.
Low effort cross platform toolkits have never yielded particularly good results. And while I think Qt is still pretty damn clunky on OSX, the solution isn't to run towards a product that exacerbates the problems.
As an aside, the Rust language server (and most other language servers) works pretty well with Neovim. You can probably get at least the same experience with some work on your part. I assume the same can be said of Emacs, but I don't have the dexterity or number of fingers necessary to use it, so I don't know for sure.
Yeah, I've flirted with Emacs for a few decades now but never warmed up to it (and it really is the epitome of a non-native app). Vi (typically vim) I use for some things (even with rust dev), but I'm not about to replace a full blown IDE with it.
Because you expressed a need for vscode. If you need it, figure out how to use it. If you don't need it, it's not a problem, right?
> This too seems like a fools errand as the Electron devs have decided that anything beyond Windows, MacOS, and Linux will not ever have official support.
"official support" are the key words there. If you care about it that much, whip up some patches and maintain them. Or even better, find other OpenBSD users to help you build and maintain them. Just because the electron devs don't want to support it doesn't mean it can't happen.
> Then don't. I'm currently working on a project that's using a rust backend and a Qt/QML front end. If you're more comfortable with JS then QML is an easy leap. The caveat being that you've got to drop down to C++ for some things.
JS but C++ for some things is just as bad as C++ for everything. Qt isn't an option for me any more than Electron is an option for you.
> Right, and now we're back to "this sounds good to the devs" while the users suffer.
Users don't actually suffer that much. You appear to be looking at this through the lens of your own environment -- you might suffer because of Electron, but people don't give two shits what slack is built with as long as it works reliably.
> Low effort cross platform toolkits have never yielded particularly good results.
If your web app is good to begin with, bundling it in Electron doesn't make it worse. You seem to be okay with browser based apps, so I'm not understanding where that disconnect is.
> Vi (typically vim) I use for some things (even with rust dev), but I'm not about to replace a full blown IDE with it.
Whatever works. vim was my daily driver for a long time. Works just fine as an IDE. Neovim is better. YMMV.
Maintain patches that will never be accepted upstream? Thanks, but no thanks. And then what about proprietary apps? Electron is a scourge that's helping perpetuate mediocre user experience and an oligarchy.
Beyond that the Electron build system is a rats' nest. If there were some killer app out there that used Electron I'd probably consider it more seriously. But Electron is a bit like systemd: an exceedingly poor solution but just good enough so that most end users don't complain too loudly.
JS but C++ for some things is just as bad as C++ for everything. Qt isn't an option for me any more than Electron is an option for you.
No, it really isn't. Using JS (ick) for the majority of your app insulates you from most of the big scary C++ bits. There are other options besides Qt and Electron. Using Qt (or pretty much anything else) would also do the opposite of trying to entrench an oligarchy.
Users don't actually suffer that much.
As much as that sounds like a ringing endorsement of Electron, I'd say the steady stream of complaints about apps like Slack are evidence to the contrary.
If your web app is good to begin with, bundling it in Electron doesn't make it worse. You seem to be okay with browser based apps, so I'm not understanding where that disconnect is.
What's acceptable in a browser is not in a desktop app. This is the same reason there's anxiety over Apple's push to bring over the iOS toolkit to desktop macs: context is everything. Expectations are higher for native apps and simply slapping an Electron install on a web app doesn't comes closer to "why even bother with a desktop app" than "hey, desktop apps are a much better experience".
Beyond that a browser can share code that electron apps can't. I don't need or want N installations of Chrome/Chromium (with the resulting overhead and security implications).
The UniPress Emacs icon used to be a unicorn, because once you hold down all the modifier keys with your finger, you need a horn on your head to press the letter with.
Complaining about the decisions made by other people isn’t useful.
Actually I'm primarily using MacOS as a desktop these days. I've happily paid for a variety of apps (e.g. Omnigraffle, Monodraw, Lightroom).
Your responses sound like you’re upset; why? You made your choice.
Beyond the usability issues that constantly dismissed out of hand by developers, Electron is a crass and dishonest attempt at redefining portable and cross-platform to include a very narrow selection of platforms.
This actively increases the effort to get traction with a non-Electron supported platform and encourages bloated. Who's going to compete with Slack if they already offer a (shitty) desktop app?
Folks hold up VS Code (which I do use) as an example of a good Electron app. It's still slower than native IDEs like TextMate or Sublime and it's still not quite right in terms of native look and feel. Why do I use it? Network effects. The rust community seems to have (sadly) standardized on VS Code.
You don’t think the crass and dishonest part is a story that you’re telling yourself? To me, it’s an engineering trade off. There is no need to criticize what others have chosen, and afaict, no evidence to support this hyperbolic questioning of their intentions.
I doubt this is entirely true. VSCode is frequently cited as an example of a good, performant Electron application. Its performance is generally acceptable (I use it as my primary text editor), but it absolutely chugs sometimes. Sublime is light-years ahead in terms of performance.
If you do it the way I do and use Electron as a skin / thin client to a compiled binary within the package, you remove that bottleneck. That way, you get both cross-OS capabilities, a familiar UI toolkit (JavaScript, I use Vue) and native binary speed and real multi-thread capabilities.
That said, some things I use (like SQLite, gRPC) will probably forever remain a C dependency, so I'm not sure if WASM would help with that.
Secondly, in the case of an application, WASM is of little use since (with node and almost any programming language) you have an FFI available. One could simply shell out computationally heavy things to C++ or whatever else. This is what many folks do with their Electron apps already (via node-ffi).
It definitely can’t compete with true threads for work that needs true threads, but you probably don’t have much work that needs true threads (rather than just workers and channels).
I wonder why they haven't expanded on this with Rust and WASM taking events and returning a canvas buffer. This seems like the best of both worlds. They get the responsiveness and performance of native code for the hard bits while retaining the ease and flexibility of HTML for the rest of the UI.
I release a Qt app for mac / windows / linux whenever I want by tagging a git commit and letting it be built by CI services. There is a single code base with almost zero platform-specific code. I really don't think that the technology choice is what matters in this.
But yes, like PWA but I want the app to run under the OS, not sandboxed in a browser.
This is how ludicrous the state of modern computing is. Java accomplished the same thing with fewer limitations and vastly more efficiency.
Best case scenario of the continuing "evolution" of electron is the elimination of the OS entirely. Why do you need it? Just put drivers in Chrome and be done with it. It's already the rest of the damn OS to a lot of people (notably not people like me).
Does it matter? I think heaviness should be defined relatively to the computer resources. Currently VSCode memory usage is 75MB on my computer. It could be 10 times less, it wouldn't make any difference.
Not really I guess, I mean who cares about the user's computing resources? Certainly not developers.
> Best case scenario of the continuing "evolution" of electron is the elimination of the OS entirely. Why do you need it? Just put drivers in Chrome and be done with it.
Have you used a chromebook?
Dr. Casey: “It means, Mrs. Carter, your husband, President Carter, has become [camera zooms in on Dr. Casey] the amazing colossal president.”
Mrs. Carter: “Well, how big is he?”
Dr. Casey: “Well, Mrs. Carter, it’s difficult to comprehend just how big he is but to give you some idea, we’ve asked comedian Rodney Dangerfield to come along today to help explain it to you. Rodney?”
[Rodney Dangerfield enters]
Rodney: “How do you do, how are you?”
Denton: “Rodney, can you please tell us, how big is the president?”
Rodney: “Oh, he’s a big guy, I’ll tell you that, he’s a big guy. I tell you, he’s so big, I saw him sitting in the George Washington Bridge dangling his feet in the water! He’s a big guy!”
Mrs. Carter: “Oh my God! Jimmy! Oh God!”
Rodney: “Oh, he’s big, I’ll tell you that, boy. He’s so big that when two girls make love to him at the same time, they never meet each other! He’s a big guy, I’ll tell you!”
Mrs. Carter: “Oh no! Oh Jimmy! My Jimmy!”
Rodney: “I don’t want to upset you, lady, he’s big, you know what I mean? Why, he could have an affair with the Lincoln Tunnel! I mean, he’s really high! He’s big, I’ll tell you! He’s a big guy!”
Mrs. Carter: “No! No! No!”
Denton: “Rodney, thank you very much. You can go.”
Rodney: “It’s my pleasure. He’s way up there, lady! You know what I mean?”
—Saturday Night Live, Season 4: Episode 16, “The Pepsi Syndrome” skit, Apr. 7, 1979
Only if we restrict "all platforms" to mean Windows, macOS, and Linux.
Building and porting Electron appears to be a horrific experience [1], which limits its cross-platform utility. It's only recently that someone pulled the heroics of getting Electron 4 (!) into FreeBSD ports; I still can't run VS Code on OpenBSD.
Meanwhile I've yet to encounter an OS with an X11 display where I can't run a Qt app. So I certainly wouldn't hold Electron up as a paragon of cross-platform support.
[1] https://deftly.net/posts/2017-06-01-measuring-the-weight-of-...
"It's cross-platform! It works on Windows 95 and Windows NT!"
(One offering whose name escapes me has the restriction that it is impossible to develop a vscode extension using the offering.)
Last I checked, electron did not work on OpenBSD.
Also, I think JVM UI frameworks still offer more than people believe. JavaFx and even the good old Swing work cross platform. Compared to Electron apps, they even hold in terms of performance and memory use.
EDIT: I fail-skimmed your comment and missed the Qt mention! Glad there are more folks out there seeing the same.
That list goes on and on. Don't forget xulrunner. Or heck, even Visix Galaxy! (Ask Jeff Barr about that one some time. ;) )
PySide2 is free for commercial purpose (with some caveats: LGPL).
What I would very much appreciate is:
QT-free (so that everything in that package is clearly LGPL) with React-native built on top of QT-free widgets.
That would make my day (and a year...)
The immense majority of Qt is LGPL ; only these modules are GPL / commercial : https://doc.qt.io/qt-5/qtmodules.html#gpl-licensed-addons
> with React-native built on top of QT-free widgets.
https://blog.atulr.com/nodegui-intro/
though I still think that QtQuick (or even QtWidgets with https://www.kdab.com/declarative-widgets/) are much more readable and fast to market.
I've done a few OpenGL toy apps in the last months, and one commercial project that includes text widgets, editing, table views, buttons, scrollbars and so on. It also scales freely. It's not that hard, and the next time will be even easier.
Is there anything like that? There is for mobile (Framework7 I like the most) but is there anything for desktop that allows me to create applications with electron in a more desktop like way? I am one of those people that doesn't really html/css. In WPF/QT/Winforms/Gtks/Xamarin/Avalonia/iOS/Android/Lazarus/Livecode I can create complex applications very fast (and a few of these are cross platform too); they don't look great (albeit consistent and not horrible), but something is working and working well in a very short time (hours). I have not found anything for Electron that works as fast as that, including bindings and logic etc.
I do a lot of HTML/css, but for web; simple things like getting a few decent looking panes with buttons and text etc that scales automatically still feels like a from scratch exercise and when using standard stuff like Bootstrap, everything looks and feels like web, not desktop. I have friends who created native looking Electron apps and it took forever to make it work well and look good (lot of quirks they had to deal with, but this is a while ago); with Qt or Avalonia (I use mostly C#) it would maybe (?) not look 'as good' (which is taste) but it would be done much faster.
There are things like [0] but then all look like Mac OS X. Are there any good ones cross platform or at least a little more 'neutral' than photon?
"Javascript is a terrible language and no one should use it"
"Separate instances of chrome for every app is dumb and consumes too much memory"
"Qt is amazing and elegant and desktop-native. Why isn't everyone just using Qt?"
That one is true though. Different Electron apps could at least share the runtime.
If this is hard maybe its because the browser isn't a very good runtime to build against.
The expectation with Electron has always been that you bundle a copy of it with your app, so that you're always targeting exactly that version.
2) Log into Discord in Chrome
3) Log into <insert application here> in Chrome
Problem solved?
Ahh, here we go:
https://news.ycombinator.com/item?id=4302517
https://web.archive.org/web/20140325063249/http://sprw.me/lg...
The LGPLv3 mandates that users be allowed to modify the parts that are licensed by this license. The TOS of the Apple App Store explicitly disallows its users from modifying software they get from it, thereby running afoul of the LGPL.
So this issue, as I understand it, is that neither the software vendor nor Apple have a license to distribute Qt on a platform that places additional restrictions on what the user may do with LGPL software. I think this is the reason why Apple removed VLC and other GPL software from their stores.
Please correct me if I got this wrong.
* FSF's opinion: https://www.fsf.org/news/2010-05-app-store-compliance
* General conscious: https://apple.stackexchange.com/questions/6109/is-it-possibl...
Are you really surviving on $5,500 annually?
Not enough to survive on, but as a sideline business that isn't terrible money as long as it doesn't consume 40 hours/week.
Every single time. How it's even possible?
No, you don't have to pay anything to build and sell your proprietary software built with Qt.
In the GitHub Desktop client, which is an Electron app, I can't spell check my commit messages, something that every text field in every native macOS app gets for free.
0: https://github.com/electron/electron/blob/master/docs/api/we...
The point remains: Electron apps generally lose many of the features that the host OS gives native apps for free.
Here it comes: chrome is inherently instable. The Google developers give a shit about their dependency management and have trillions of open source projects just literally copied into their trunk. They also don't provide any API to speak of, chromium as a library does not exist, and don't get me started about the arcane build process of chrome.
So few quick things, the projects that are copied are done so to guarantee deterministic builds in an isolated build environment (no dependencies on third party systems).
The API you say they don't provide is literally the API that Electron uses. --> https://chromium.googlesource.com/chromium/src/+/HEAD/conten...
And as for the build process, eh, it's kinda slow but it's hardly arcane. On linux you can run like 4 commands and it'll build Chromeium.
Give it a try with the current HEAD of their home-grown and undocumented build tool and see how far you get.
And regarding the deterministic builds: I call bullshit. They just don't want to follow the different packaging guidelines from the different operating systems, so they repackage everything. Now I have to trust them to keep all these dependencies up-to-date and I have to accept the unecessary bloat? No way.
I agree, the chromium build tooling is unfriendly af.
> I call bullshit
Lot of works goes into deterministic builds, have fun going down this rabbit hole: https://bugs.chromium.org/p/chromium/issues/detail?id=314403
> Now I have to trust them to keep all these dependencies up-to-date
Looks like it rolls on average every 10-20 minutes: https://chromium.googlesource.com/chromium/src/+log/HEAD/DEP...
> and I have to accept the unecessary bloat?
Ah yes, because all operating systems ship with a pristine installation of the latest pdfium.
That has nothing to do with their dependency management. In fact, if you link against system libraries, it should be simpler to get deterministic builds, as you have to build less.
care to elaborate?
However they are proprietary, and this is a no go for me and many. There is no way I bind my software stack to an arbitrary unstable compiler ABI and its platforms. Nor I will bet on a toolkit that can disappear tomorrow if its only maintainer disappears or get hit by a bus.
We need something like these projects, but OSS and still I would be happy to pay for that.
For example in Slack:
1. Non-functional items are routinely offered in the main menu and context menu.
2. The Undo and Redo menu items often just don't work. These do different things than the command key equivalents which should never happen.
3. It is easy to get into a state with multiple blinking insertion points.
4. The inactive appearance is identical to the active appearance.
etc etc.
"Electron consumes so many resources ... Why so resource hungry ... My workstation already runs Chrome, can't have electron apps bogging it down ... Slack runs on Electron ... VSCode is the only good Electron app ... Why are we doing this ... Dennis Ritchie would be turning in his grave"
This topic could honestly trigger the "parse regex with html" kind of reply.
An empty Atom window containing 5 source code files consumes about 120MB of RAM. For comparison with native apps, an empty iTerm2 window uses 100MB, and so does an empty Notes.app window. The base memory footprint imposed by Chromium is not that significant.
Granted, it is totally normal to have packages when using Atom, but their memory cost shouldn't be considered a penalty that you pay due to Electron. Rather, it's a penalty that you pay if you want an extensible application in which extensions are allowed to use JavaScript.
When I run `atom --safe` it starts at around the same amount of memory usage: https://imgur.com/j4Co4n6.png
Side note: Running that command is now preventing my from quitting Atom using the Atom > Quit menu entry. I had to force quit it to get it to close.
I developed an application with Electron (+ Vue + Node) for an internal tool used by non-technical staff at my work and I don't have nearly the consumption as some other applications, but there is a lot less occurring on the renderer process than it appears with other applications.
I've added VSCode (with a large project), my application's usage (censored because it's proprietary, but it's a document-based application) and the worst memory offenders on my system (16GB 2015 MBP):
I've heard of other similar strategies-- but the best one seems to be to offload as much of the work to the main process or talk to a binary wrapped up in the application and do as little lifting with the renderer (the Chromium portion) as possible. My results have been alright so far.
It sets up a 'modern' React-based web dev environment that can be used to immediately start experimenting with stuff. React acts as a view layer, so you can write views and components in HTML-ish declarative syntax while still getting live updates whenever data changes.
Past that, it's common for people to add Redux or MobX, which both act as global data stores with good integration with React, and have lots of secondary libraries for transparently handling data persistence.
When it came time to finally bundle my app into a single html + js file I settled on (well was forced to really) npm install rollup. After installing rollup, I had a package-lock.json file that was 1880 lines long with approximately 150 or so dependencies and a node_modules directory so huge that vscode choked trying to parse everything in it. To its credit, vscode asked me if I wanted to exclude node_modules from future consideration.
All that from installing a single tool via npm. I just don't get modern web development.
Now instead of the JVM, we've these rather beefy runtimes due to Chrome, Node.JS, Javascript (v8)... which if you look at it, do the same things applets did, except different.
I think the problem w/cross platform is that we want to have everything look 'native' for the platform.. and when you demand that, hooking into the native APIs is sort of inevitable. Instead, I believe rendering probably ought to be done by the runtimes themselves, sort of like JVM did w/AWT/Swing..or like Dart is doing right now.
There's always going to be a trade off when wanting to have a single app that runs cross platform and maintain a native look/feel to it... Quite frankly, I'm not sure which is best, but I lean more toward 'do your own rendering' and port the runtime to run across platforms, kind of like the JVM ...except w/Chromium/V8/Node.JS. Sure it hogs memory and its slow... but I think most devs will take that over having to develop multiple apps doing the same thing per platform.
1) Java applets were awful to use in the browser
2) The DOM is the most advanced and flexible (and, yes, resource-hungry) UI layout system ever created. Seriously. Swing didn't come close in terms of the sheer breadth of possible interfaces one could create.
It seems many users hope to eventually see the ability to run multiple Electron apps on a single instance of Chromium.
Isn't Electron basically Chrome, so the ball be in Chrome's court on that?
That said, I really think that web development in general, including Electron needs a reboot. From my perspective as a user, everything seems to be full of bloat and memory leaks. Maybe some kind of redacted version of Javascript that's harder to screw up? If worse is better, lets at least try to refactor the worse crap we adopted to actually make it better.