Hacker News new | ask | show | jobs
by Razengan 2688 days ago
As a user, I don't like Electron; "webapps" always feel clunky and alien compared to native apps and the rest of the OS.

As a developer, I can appreciate Electron's utility in targeting multiple platforms, but one has to wonder:

Why isn't there a good, open, cross-platform UI library already, that compiles to the native UI of each OS?

Has there even been an initiative to make one?

You'd think the global developer community would have come together to tackle this problem by now, consider how it's such a pain point for all of us and users as well.

3 comments

> Why isn't there a good, open, cross-platform UI library already, that compiles to the native UI of each OS?

It is either "good native" or cross-platform. But not both in reality.

In principle can do something very basic using stock platform widgets - some application that uses only basic widgets: buttons and plain text textareas - all others are too different on different platforms.

If your app is slightly more than that you will have problems even with basic stuff. Consider this native UI example (Notepad++) : https://i.kinja-img.com/gawker-media/image/upload/c_lfill,w_... and something like Sublime Text

Notepad++ is a disaster even native platform API. Sublime Text uses custom non-native renderer - consistent UI styling.

Native UI frameworks don't have a 1:1 match on features and UI components, and a cross-platform library would have to compromise on the lowest common denominator or use so many conditionals that you would be maintaining three different codebases anyway.
There's actually plenty of them. Off the top of my head: (C) libui; (C++) wxWidgets; (Java) SWT; (JavaScript) ReactNative; (Pascal) Lazarus. Then there's the non-native toolkits that either emulate the OS: (C) GTK; (C++) Qt; (Java) Swing. There's also Tk (Tcl) but I'm not sure where that falls.