Live data from Hacker News

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

news.ycombinator.com

41–50 of 230 posts

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

#41

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.

Qt's nice, but the thing I've always disliked about it is that it re-implements all these basic types, like QString, QVector, QList, QMap, etc. and you need to use them to interact with all their APIs. So, you either have to decide you're all-in on Qt and have these QThis and QThat types littered all over your code (making it more difficult to interact with other third party libraries like boost that know nothing about Qt, or you need to agree on a boundary between your non-Qt-specific code and your UI, and maintain a layer that converts to and from standard types.

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

#42
You can have your cake and eat it too. If you have to build a native desktop app, you can use Chromium Embedded Framework. Spotify is one of its biggest users. You can still build your UI in HTML but drive it with native code (C++, Objective-C, C#, etc). We used CEF when we realized how painful Win32 C++ WTL desktop UI was.

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

#43
Take a look at Free Pascal and the Lazarus IDE.

What is a Lazarus? From their website:

"...a cross-platform IDE for Rapid Application Development. It has variety of components ready for use and a graphical form designer to easily create complex graphical user interfaces."

Why use Lazarus and Free Pascal? You can create native, cross-platform UI's all combined into a single, fast, low-memory executable that can easily be deployed and distributed on different platforms.

http://www.lazarus-ide.org/

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

#44
post #25

Qt obviously, but beware of licencing

Can the licensing be an issue on Android or iOS?

I still haven't found a clear answer to that, but using the LGPL license could pose a problem, because you need to allow the user to recompile the application with his own version of Qt. On iOS shared libraries are not allowed on the store, so you should distribute the files for static linking... it becomes quite messy and sort of unclear from the legal point of view.

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

#45
It depends on what you mean by, "cross-platform." In my world there is no such thing. You pick your target platforms and program to them. However it is common to imply "major platforms" (ie: iOS, Android, Windows 10, OSX). Different platforms have different requirements and will shape your solution.

Next... what is the application? Do you need to target native APIs? Do you have memory limitations?

If you don't mind taking up a lot of memory try one of the "cross platform" systems like Xamarin or some Java-based solution. If you need to be more constrained try writing to the native APIs and porting your project to each target platform you need to target. Lastly if you're highly constrained maybe you need to try an immediate-mode style library like Nuklear[0].

It really depends on your needs. There's no one-size-fits-all.

[0] https://github.com/vurtun/nuklear

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

#47

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.

As a note, Qt doesn't handle DPI well, it seems. Qt apps are almost unusable on a Surface Pro 4.

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

#48
post #15

Earlier quoted context omitted.

JavaFX is amazing, but I'm not sure how it holds up when an app gets complex.

I think a bigger problem is that less and less end users have the JVM installed.

JavaFX also has support to bundle a JRE with its native installer support, it can build a exe, msi, dmg etc. The bigger issue is Oracle not really giving it the proper attention.

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

#49
post #15

Earlier quoted context omitted.

JavaFX is amazing, but I'm not sure how it holds up when an app gets complex.

I think a bigger problem is that less and less end users have the JVM installed.

You can use javapackager.
Post reply on HN