3 ms·
Electron, and to a great extent the cross platform fetish, is a perversion of DRY. They don't want to write the same code for two platforms. But its usually not
by dexwiz 10y ago
Electron, and to a great extent the cross platform fetish, is a perversion of DRY. They don't want to write the same code for two platforms. But its usually not the same code. Its the same logic implemented on two different platforms. Developers are so into code sharing, write once run everywhere, that they don't stop and ask if they should. In every case you are paying a price for abstraction, like running Electron or using a WebGL canvas instead of a native graphics API. The article highlights cases where they price was paid, but the app was still platform specific.
- TeMPOraL 10y agoWell, it's the same logic - so almost by definition it should be platform-independent. People are too lazy to introduce proper abstraction between what the application does and what it shows on screen, and suddenly porting is hell. Either way, Electron sucks because it ships a whole goddamn browser to give you just portability; you have to still pile on a ton of JS and CSS hacks to get a decent-looking SPA UI out of it, which you'd get for free with any proper GUI runtime. All that waste because people want to write JavaScript (which I understand - I have my favourite language I'd love to write more too) and this was the most brute-force way to allow it. Embed a system webview if you must, don't ship the goddamn browser!
- sdegutis 10y agoCross platform is a perfectly fine goal. Why should a developer care need to write `open()` on one system and `OpenFile()` on another, when all they really mean is "open this file" with the exact same semantics? That said, I think electron is overkill from a technical standpoint, and ultimately is probably too harsh on hardware, but I've given up caring about that in the short term, because there are bigger problems with how our stupid computers are implemented.
- jeremiep 10y agoThis makes no sense and completely disregards context. There are perfectly valid use cases for Electron, and they have absolutely nothing to do with what you said. There are also insane amounts of cross-platform native code written on platform abstractions layers. > Developers are so into code sharing, write once run everywhere, that they don't stop and ask if they should. Isn't that the very purpose of Qt or GTK which the article is promoting instead of Electron?