I'm barely a geek, let alone a hacker, but have been trying to learn NativeScript for the past month or so. You might want to check it out. Not sure how it compares as a "library" or "framework" etc. I'm still figuring out where the lines are drawn. http://docs.nativescript.org Emulator Here: https://docs.genymotion.com
Ask HN: What's the best library for making cross-platform UIs?
131–140 of 230 posts
Re: Ask HN: What's the best library for making cross-platform UIs?
#132I have used Electron previously, but now Ionic is my favorite http://ionicframework.com/
Re: Ask HN: What's the best library for making cross-platform UIs?
#133None, abstract the functionality of your app into a cross-platform library and build a native GUI for each platform you support using that platform's native SDK.
Re: Ask HN: What's the best library for making cross-platform UIs?
#134For a file manager I'm developing [1], this question recently boiled down to Electron vs (Py)Qt. I chose (Py)Qt because Electron's startup speed is too slow. [1]: https://fman.io
Re: Ask HN: What's the best library for making cross-platform UIs?
#135It 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 mi…
Why?
Re: Ask HN: What's the best library for making cross-platform UIs?
#136What 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…
The poor look on Linux is definitely a big downside. You can ameliorate it somewhat with a custom theme [1] but your GUI will still look out of place in any major desktop environment. TileGTK and TileQt [2] aren't maintained.
I haven't used it myself, but Tk has at least some CJK support [3]. One thing to keep in mind from the start, though, is that Tcl/Tk suffers from a UTF-16 code unit limitation similar to Java's; it only handles the Basic Multilingual Plane [4] natively.
As for antialiasing, what do you mean when you say it is disabled by default? Is that in a particular Linux distribution? A recent Tk release (post-Tcl 8.5) should render antialiased text unless you compile it with "--disable-xft" or your font is raster.
[1] E.g., http://chiselapp.com/user/skoro/repository/tclapps/artifact/....
[2] http://www.tclcommunityassociation.org/wub/proceedings/Proce...
[3] Per https://tcl.wiki/CJK.
Re: Ask HN: What's the best library for making cross-platform UIs?
#137Earlier quoted context omitted.
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 convent…
> 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?
Re: Ask HN: What's the best library for making cross-platform UIs?
#138I'm surprised nobody has mentioned Angular 2 yet. It's new, so don't expect tons of support. Nonetheless, it's there as an option!
> - I won't use the web. No HTML, no CSS, no Javascript. Sorry.
If you're using HTML, you're already limited in known ways. Conflaguration of logic with presentation and callback hells and limitations of CSS extensions by platform. Then the there's the need to split HTML views due to technical limitations and practicality of maintenance adding a whole new layer of complexity in view and view fragment management!
Re: Ask HN: What's the best library for making cross-platform UIs?
#139I'll throw in a mention for Xojo: http://www.xojo.com Xojo used to be called REALbasic, and it's a cross-platform 'Visual Basic' with support for Windows, Mac, Linux, iOS and Raspberry Pi. I tend to use it for internal tools that need to run on both Windows & Mac, and find it's great for getting to a prototype stage very quickly.
What I want is closer to writing my own Xojo.
Re: Ask HN: What's the best library for making cross-platform UIs?
#140Strange 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…
In my experience with it, wxwidgets has a very antiquated feeling to the API (I know, subjective) and it didn't ship high DPI support when I used it. Its Python bindings at the time felt rather unpythonic. Generally I wouldn't want to use this again.