by scrollaway · 7y ago · 0 comments
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.
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)
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.
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 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.
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.
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.
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
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.
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.
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.
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.
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 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.
Cool. With Electron your app will only work on Linux/Windows/MacOS. There are other cross-platform solutions.
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.
Developers in the 90s often supported 5 or more different platforms. How is it that modern development is so much worse?
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?
Yes. Or Linux on non-x86 platforms.
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.)
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).
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
> 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?
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.
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.
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'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.
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.
But yes, like PWA but I want the app to run under the OS, not sandboxed in a browser.
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.
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.
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.
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.
EDIT: I fail-skimmed your comment and missed the Qt mention! Glad there are more folks out there seeing the same.
Last I checked, electron did not work on OpenBSD.
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.
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?
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.
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).
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.
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.