3 ms·
>Chromium is the best UI toolkit ever created. What exactly are the arguments against Electron? Because it looks ugly (i.e. non-native) on pretty much every pl
by byko3y 6y ago
>Chromium is the best UI toolkit ever created. What exactly are the arguments against Electron?
Because it looks ugly (i.e. non-native) on pretty much every platform. Qt has different levels of success at that, having most problems with macOS and Android.
Also, there's Qt Quick, which lies somewhere in the middle between classic Qt and Electron.
>It's slow to render? Wrong, Electron (Chromium) renders faster than Qt. The Skia engine is optimized to an extent that these other toolkits cannot compete with. It even has a Vulkan backend now
The reason why classic single-threaded GUI toolkit are the way they are is because you can perform a custom reactive drawing or just reactive UI update in a blink of the eye, so user won't notice any delay. I know there are some bad examples like java-based IDE bloatware, but there are good examples like... Chromium! However, you cannot develop Chromium with Chromium, but you can develop something similar to Chromium with Qt.
>Memory? It's 70MB
Haven't seen Electron application using less than 200 Mb of memory. For example, launching Skype plus chromium SPA takes 550 Mb of RAM on my system. JavaFX has similar problems.
>Slack is a slow monster, but it's a giant codebase that does things that would be simply impossible in Qt, GTK, Swing and others
Like what? I'm not aware of any special Slack's features that could be hard to implement using classic GUI toolkits.
- zelly 6y agoThe old Skype client using Qt was similar to a Slack using a classic GUI framework. Compared to Slack it was barebones. You had a list of conversations and a view for the conversations themselves. I'm not saying it's bad; I'd probably prefer it in fact. But it's not the same product as Slack. This comes back to my point about Electron vs. others, maybe the reason Electron apps are slow is because Electron apps typically have more functionality. The easiest way to make a program faster is to remove code. > However, you cannot develop Chromium with Chromium Why not? You can run Visual Studio Code in the browser and edit the Chromium source code. Perhaps, given sufficient memory, you can also run clang in the browser (WASM) so you can compile and link in Chromium too. > Because it looks ugly (i.e. non-native) on pretty much every platform. I'm not sure if you're talking about Electron or Qt because this statement applies equally well to both. Electron, Qt, Swing, JavaFX, Flutter all take the approach of drawing every pixel themselves, not using any "native" widgets rendered by the OS vendor. Anecdotally all the Electron apps I've used have been beautiful whereas the Qt/GTK ones look stuck in the 90s.
- byko3y 6y ago>Compared to Slack it was barebones. You had a list of conversations and a view for the conversations themselves. I'm not saying it's bad; I'd probably prefer it in fact. But it's not the same product as Slack. This comes back to my point about Electron vs. others, maybe the reason Electron apps are slow is because Electron apps typically have more functionality Old Skype was a P2P networking application, which is a way more complex functionality than Slack's client has (excluding Chromium itself), but it was invisible to a regular user. Server side of Skype had only basic things like authentication, simple messaging, contacts data, and telephony gateways (paid service). It didn't even store message history on server side, which was PitA. Contrary, Slack has a lot of heavy logic on server side thus taking heavy financial losses and unable to become profitable. >Perhaps, given sufficient memory, you can also run clang in the browser (WASM) so you can compile and link in Chromium too I wass talking about framework/toolkit, because we are talking about framework/toolkits. You cannot run Chromium in WASM to debug it, and it would take days to compile chromium in clang-WASM. >Electron, Qt, Swing, JavaFX, Flutter all take the approach of drawing every pixel themselves, not using any "native" widgets rendered by the OS vendor There are no native widgets on Linux and other posixes, so your statement is true for them. However, for Windows Qt is able to optionally use native drawing routines. Firefox and Chromium use native routines too, but the extent is way more restricted. Also, Qt allows you to use fully platform-specific features, which is very problematic in Electron. The most basic example is date formatting, which almost never works the same way native applications work, you always get small differences here and there. >Anecdotally all the Electron apps I've used have been beautiful whereas the Qt/GTK ones look stuck in the 90s Heavily depends on applications you used. I don't think you tried to use any 10-years old electron application, because electron itself is 7 years old. Have you used VirtualBox?