Re:Show HN: Svelte NodeGUI, a lightweight Electron alternati...
by fouric on Friday March 05, 2021 @05:50PM
(#26363252)
What does Electron offer in terms of portability that SDL2 doesn't have?
Re:Show HN: Svelte NodeGUI, a lightweight Electron alternati...
by MaxBarraclough on Friday March 05, 2021 @08:56PM
(#26364531)
SDL is intended for gaming and similar applications, it isn't intended for general purpose GUI development. That's what toolkits like Qt and GTK are for. These toolkits do compete with Electron.
With the disclaimer that I don't know a lot about this: Electron has solid support for both desktop and mobile targets. I don't think Qt's mobile support is as good, but I might be mistaken.
Re:Show HN: Svelte NodeGUI, a lightweight Electron alternati...
by alvarlagerlof on Friday March 05, 2021 @06:09PM
(#26363444)
The larger point is ease of use
Re:Show HN: Svelte NodeGUI, a lightweight Electron alternati...
by fouric on Friday March 05, 2021 @06:17PM
(#26363513)
Fine, "What does Electron offer in terms of easy portability that SDL2 doesn't have?"
Re:Show HN: Svelte NodeGUI, a lightweight Electron alternati...
by opheliate on Friday March 05, 2021 @07:05PM
(#26363911)
Accessibility would be my immediate thought, although I'm not massively experienced in terms of GUI programming, so I could be off the mark here.
With something like SDL2, I would have to interface with each operating system's accessibility API directly, in such a way that's not easily portable, unless I bring in a separate library. Even something like GTK has this problem on platforms other than Linux. With Electron, I know that my program will be accessible wherever Chromium's rendering of HTML is accessible, which is a lot more places than anything I'm going to be able to bodge together.
That's true, but advanced GUI features aren't Electron's selling point. It's used because it offers easy portability and the ability to leverage web-dev skills.