Live data from Hacker News

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

news.ycombinator.com

121–130 of 230 posts

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

#121

Just getting started on Electron myself. Used by Atom, Slack, Visual Studio... It's worth a look ;) Electron - Build Cross-Platform Desktop Apps With HTML, JS, CSS http://electron.atom.io/

Electron only works for desktop applications and probably needs a js-framework to work good. I think that React + Electron looks like a nice combo and then you can use React Native to create Android and iPhone apps also, probably sharing a lot of code between all versions.

Instead of react native you can also just reuse the UI-code directly for the mobile deployment. Just add meta tags like apple-mobile-web-app-capable=true and style with @media-rules.

To be fair "just" might be over simplifying things a bit. I've been doing this for an application and thinking that it actually would be a benefit to have a different code bases for the desktop and mobile editions. It can be a bit challenging to design for both targets at once.

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

#122

What is the best depends on your exact requirements but three good options to get a GUI off the ground quickly are Tk [1], wxWidgets (and wxPython [2] and wxLua [3] in particular) and Lazarus (LCL) [4]. Tk widgets look native on Windows and macOS (if you use the right ones — see [5]), though their behavior is implemented by Tk itself. On Linux it draws its own widgets in several styles; GTK and Qt theme support is im…

Tk is antiquated (no antialiasing [1]) and has a poor look on Linux. It lacks functionality in widgets such as embedding a progressbar in a tree/list (don't remember) widget, which Qt supports. Also, poor font rendering support. (doesn't render Devanagari and probably CJK scripts). It feels like a 10 year old tech which it is. (1) Maybe there is some option for it somewhere, but if so, having antialiasing disabled by…

Suitability of Tcl/Tk depends on what the goal is. For some applications, like utilities, GUI access to CLI tools, form-based data entry, etc., Tk is fine. It isn't a good option for a sophisticated drawing program, and I would try to use it for a full-bore word processor.

Within its domain, Tk is a very capable tool that easy to use, well-documented, versatile and relatively bug-free.

Future versions are planned to acquire antialiasing and other improvements, no doubt it will be a while before it's available.

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

#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 the only way to change a control. If this means I need something more like GLib instead of GTK+, so be it.

- I won't use the web. No HTML, no CSS, no Javascript. Sorry.

The end goal is to build the best, easiest UI environment to write software with. If it's not possible to build this with existing UIs and I have to write one from scratch, so be it.

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

#124
post #104

Earlier quoted context omitted.

Cross-platform with a single code base has always been a bit of a myth, if only because different platforms have different conventions for things like how to lay out dialog boxes or the writing style used for buttons. If you want something that feels like a native application on different platforms, it's always going to require some level of customisation. It's still useful to have a single UI library in your code th…

Instead of giving me the tools to make a modal pop-up, but then leaving me to match that modal pop-up to the stylistic conventions of each OS GUI, why can't a UI framework give me a "YesNoModalPopup" that looks and acts however a "YesNoModalPopup" is supposed to act on the respective OS—even going so far as to actually be a modal sheet or a command-line prompt instead? This, I think, is one of the bigger but oft-unst…

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 conventions and capabilities of different platforms.

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

#125

Qt has a truly pleasant API and bindings in many languages. If you haven't used it before - and I know you haven't, otherwise you wouldn't be asking :) - give it a try. There's very little that's more cross-platform.

> I know you haven't

I used QT before. Please don't be presumptuous.

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

#127
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…

Pretty sure that C++ and Qt is what you want. Maybe not perfect in every sense, but widely used and battle-tested.

If you don't want to deal with Windows, you can cross-compile for Windows from Linux using the mingw-* packages (eg https://fedoraproject.org/wiki/MinGW or the Debian or SUSE equivalents).

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

#128

Earlier quoted context omitted.

Tk is antiquated (no antialiasing [1]) and has a poor look on Linux. It lacks functionality in widgets such as embedding a progressbar in a tree/list (don't remember) widget, which Qt supports. Also, poor font rendering support. (doesn't render Devanagari and probably CJK scripts). It feels like a 10 year old tech which it is. (1) Maybe there is some option for it somewhere, but if so, having antialiasing disabled by…

Suitability of Tcl/Tk depends on what the goal is. For some applications, like utilities, GUI access to CLI tools, form-based data entry, etc., Tk is fine. It isn't a good option for a sophisticated drawing program, and I would try to use it for a full-bore word processor. Within its domain, Tk is a very capable tool that easy to use, well-documented, versatile and relatively bug-free. Future versions are planned to…

From what I'm reading in this thread, Tk is out of the question. Poor antialiasing sounds like bad looks.

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

#130
post #84

I work on a cross-platform application that runs on both Windows and Mac. We have a cross-platform library for business logic, and native Windows and Mac UIs. The problem is that cross-platform UI libraries don't really let you fine-tune the UI. They're great for very rapid development with a basic, functional, UI. If you get an "artiste" in product management, or you need to plug into Windows-specific and Mac-specif…

> cross-platform UI libraries don't really let you fine-tune the UI

I want to be able to fine-tune the UI.

Post reply on HN