Live data from Hacker News

Ask HN: What's the best library for making cross-platform UIs?

news.ycombinator.com

141–150 of 230 posts

Re: Ask HN: What's the best library for making cross-platform UIs?

#141
post #115

Strange nobody mentioned wxWidgets so far which gives you true native apps, so I'll do it: http://wxwidgets.org It provides API layer which compiles to Win32 API on Windows, Gtk2 on Linux and Carbon/Cocoa on Mac OSX. Qt only emulates Windows controls, but wxWidgets uses the actual Windows controls via Microsoft Win32 API. BTW, there's wxQt, a wxWidgets implementation that uses Qt instead of Gtk, but it's still experi…

> Qt only emulates Windows controls, but wxWidgets uses the actual Windows controls via Microsoft Win32 API. This is not correct. Many controls use the native implementation of the underlying platform.

Why many and not all?

Emulating sounds like an extra layer one could do with out.

Re: Ask HN: What's the best library for making cross-platform UIs?

#142
post #123

Here's what I want. - The UI to look as good or better than the UI on Mac OS X. I'm not willing to compromise on looks. - The library to be cross-platform. I want to deploy the software on Mac OS X, Windows, and Linux. I don't care about mobile right now. - I want it to be possible and easy to (a) develop new features on my own and (b) change existing features. I'd rather reimplement a textbox from scratch if it's th…

Also check out Qt's QML: http://qmlbook.github.io/

Re: Ask HN: What's the best library for making cross-platform UIs?

#143
post #123

Here's what I want. - The UI to look as good or better than the UI on Mac OS X. I'm not willing to compromise on looks. - The library to be cross-platform. I want to deploy the software on Mac OS X, Windows, and Linux. I don't care about mobile right now. - I want it to be possible and easy to (a) develop new features on my own and (b) change existing features. I'd rather reimplement a textbox from scratch if it's th…

> - The UI to look as good or better than the UI on Mac OS X. I'm not willing to compromise on looks.

Just remember that the UI kit is only part of having a good UI. Apple's historical success with good UI is based on their long standing guidelines for designing good UIs.

I doubt I need to tell you this (although Google seems to recently have forgotten it), you app needs to use the patterns of the platform it is on. Users respond well when the app looks like it is "native" and not a port.

Re: Ask HN: What's the best library for making cross-platform UIs?

#145
post #123

Here's what I want. - The UI to look as good or better than the UI on Mac OS X. I'm not willing to compromise on looks. - The library to be cross-platform. I want to deploy the software on Mac OS X, Windows, and Linux. I don't care about mobile right now. - I want it to be possible and easy to (a) develop new features on my own and (b) change existing features. I'd rather reimplement a textbox from scratch if it's th…

- do you need to support high DPI monitors? If "yes" then you need a) something capable to render on GPU and b) to use scalable vector image formats like SVG and others.

- Do you need adjustable styling? Like today it is a flat UI and tomorrow they will return back to skeumorphism. Material design for example is step in that direction. What about UI branding, when the same UI is used for different brands with their own color schemes, etc? What is expectation for the lifetime of your application? Just for the note: http://sciter.com/from-skeuomorph-to-flat-ui-evolution-of-on...

- What about UI accessibility? "Section 508" and the like.

- So called "richtext" WYSIWYG editing - yes/no?

- Printing and print preview?

- Dynamic UI composition? When UI is composed from actual data structure. In some cases simple flat property lists may work but not always.

- UI animations and transitions ?

- What about UI internationalization?

As of "No HTML, no CSS"...

HTML is just a serialization form of tree of UI elements. Not more not less. Any library has this (serialization) in one form or another.

CSS is simply the way to define things like: "this element in that state has to be rendered te following way". Any good library has that in one form or another.

You do not need full scale browser for HTML/CSS, and actually should not use solutions based on browsers for the UI. Primary goal of a browser is to provide safe browsing experience, UI rendering is only next function after the first...

Re: Ask HN: What's the best library for making cross-platform UIs?

#146
post #137

Earlier quoted context omitted.

I want to agree with the spirit of what you're saying, but given the potential complexity and uniqueness of a GUI, I think it's an extremely hard problem in practice, if not impossible. You're asking for a toolkit that is both generic enough to provide the common functionality you're describing, yet also comprehensive and flexible enough to cope with the diverse needs of different applications and the diverse convent…

How hard can it be to build a toolkit that supports a textbox on Mac OS X, Windows, and Linux? For a moment I thought you proposed a solution a thread up: > have it translate into the correct API calls on each platform under the hood. What if instead of writing controls for applications, the applications had low level access to create controls on their own?

Individual controls aren't the problem. Unique controls and idioms that cover multiple controls are.

For example settings dialogs on Mac are usually not modal and usually apply immediately. Meanwhile Windows dialogs are usually modal and transactional, with Cancel button to roll back and Apply to commit without closing.

Full fidelity inevitability ends up bifurcating the codebase or compromising the nativeness of the UI.

Simple things like button, text box, drop down, check box, radio button that have been in use for 30 years or more are just fine. But look at the list view in Windows; that has grown dozens of options to support Explorer, the file system browser. The deeper you go, the less you can keep common.

Re: Ask HN: What's the best library for making cross-platform UIs?

#147
post #66

"The best" is subjective. I have played around with libui ( https://github.com/andlabs/libui ), which runs on Windows, Linux, and macOS. A nice thing about it is that it is written in C, and therefore has bindings with several programming languages. I have experimented using it from Java (via JNA) and it works quite nicely.

libui is kind of neat. It wraps around GTK+. Why did libui have to do that? In other words, is GTK+ bad enough that the easiest way to use it is to wrap around it?

Re: Ask HN: What's the best library for making cross-platform UIs?

#148
post #30

Earlier quoted context omitted.

Is it competitive with Qt for non-audio apps?

JUCE doesn't try and look native, it has it's own look and feel. Qt does on Windows and OSX. It really depends what you are trying to do.

Thanks for this. It sounds like JUCE is eliminated.

Re: Ask HN: What's the best library for making cross-platform UIs?

#149
post #141
post #115

Earlier quoted context omitted.

> Qt only emulates Windows controls, but wxWidgets uses the actual Windows controls via Microsoft Win32 API. This is not correct. Many controls use the native implementation of the underlying platform.

Why many and not all? Emulating sounds like an extra layer one could do with out.

Because one platform supports more options and when using that control on a different platform there are exactly two choices: break cross compatibility or reimplement the control.

Add evolution of controls and idioms over time, and it's literally impossible to always unify: not all platforms evolve their non-trivial components in the same direction.

Re: Ask HN: What's the best library for making cross-platform UIs?

#150

GTK may have a difficult API, but it is portable and it gives a better feel than Qt for Linux+Gnome users like me (I will always choose a GTK app over a Qt app).

GTK's documentation is atrocious for anything in depth, and has been for years. Saying that from wrongly choosing it over Qt for a cross platform screenrecording/annotation project a few years ago. There's literally no way in hell to recommend GTK for any new desktop project that likely has a Windows audience. GTK is a mess. :(

@geraldcombs and @justinclift I didn't know any of this, thanks so much!

It sounds like GTK is eliminated too.

What's left now, QT and wxWidgets?

Post reply on HN