6 ms·
Ask HN: An acceptable cross-platform GUI toolkit?
It's interesting but disappointing that there's no standout "winner" among desktop GUI toolkits. Among other things, devs want to write software that runs on their favorite GNU/Linux distribution, but that also runs nicely and is easily installed on MS Windows and Mac OS X. Here are the arguments I hear against some current popular toolkits:
* GTK+ -- Has lots of moving parts. Difficult to build/install on MS Windows. Some say it's too closely tied to X11. Doesn't look enough like MS Windows on MS Windows. The LGPL licensing is very successful though, as demonstrated by the fairly large developer community and by its use in Gnome.
* Qt -- Either GPL your software or pay the licensing fees. Also some don't like having to deal with C++ if you're required to ever look under the hood. Nice that it comes in one big piece though.
* Tk -- Some have referred to Tk as a vistigial GUI appendage from a bygone era. Also it depends upon Tk. This one would be a hard sell to get everyone to agree on.
* wxWidgets -- Complaints are that it looks too much like the MS Windows API, and also that it's too big (being a wrapper around lower-level GUI toolkits).
It would seem that we (the free software community) should just bite the bullet, list out the basic requirements for a successful GUI toolkit, and go ahead and create it. I'd dare say that the requirements might look like this:
* Written in C. C is fast, portable, and everyone knows it. Corollary: keep it simple (like Tk) and packaged in one piece (like Qt). Having a half dozen different pieces all bolted together (like GTK+) in the name of modularity only makes it harder to create easily-distributable cross-platform apps. 2nd corollary: be careful not to tie it too closely to X11.
* Keep it simple so it's easy to port to Windows and Mac OS X (Cocoa). Corollary: simple and easy to build too.
* LGPL licensed. Most camps can probably (at least grudgingly) come to agreement on this, and it's worked pretty well for GTK+. Works for free software and for commercial apps, and tends to build nice communities.
* Can easily be made to look like MS Windows on MS Windows, and Aqua on Mac OS X. I really don't care if it's themable or not, but for wide adoption, it had at least better be able to easily make itself look like MS Windows and Aqua.
* Easy to make bindings for Python, Ruby, Perl, etc. I really do not want to write GUI apps in C, but I don't want it so fancy that you have to do acrobatics to mate, say, Python, to it.
* Simple and easy to use (like Tk).
Anyone working on or know of that cross-platform GUI toolkit? Because that's the one I want to use, and I bet it's the one a lot of devs would also want to use.
- qhoxie 18y agoShoes has been more and more impressive lately. I'm not sure about ports or equivalents in Python and Perl, but people are doing great things with it in Ruby. http://github.com/why/shoes http://github.com/why/shoes
- pm 18y agoI give two thumbs up for Shoes - I'm learning Ruby just so I can use it. However, running through the list of GUI kits the poster has assessed, Shoes differs significantly in that it incorporates web-style widgets on the desktop. It is much more suited to graphical applications and games than native desktop software. Two thumbs down for wxWidgets. I used the wxPython port to prototype a not-too-complex desktop application, and found it tediously cumbersome (not to mention ugly). I would've been better off coding it natively in Obj-C and then porting it down the track.
- gaius 18y agoThe current Tk (8.5 and above) looks a lot better, using native widgets where possible, and Starkit makes deployment of Tcl/Tk applications a breeze. Those who forget history are doomed to reimplement it.
- davidw 18y agoI think that Tcl and Tk have a terrible "marketing operation" and haven't done a very good job of getting the word out about things like this - it's a huge improvement. This has some screenshots, which are a bit out of date, but show that things have improved: http://tktable.sourceforge.net/tile/ http://tktable.sourceforge.net/tile/
- moder 18y agoLooking at the Tile screenshots for Unix, I don't see any that are antialiased (like the rest of my desktop), though "Revitalized" doesn't look bad at all. (Incidentally, Tile doesn't seem very active. It's last News page update is from 2006.) I think you're right about the "marketing" for Tk. The three things that keep people away from Tk (IMO) are probably: 1. the notion that they'll have to install or use Tcl, 2. the extra work of having to install various plug-ins/theme-engines/whatever to get a more modern-looking GUI, and 3. the revulsion at seeing non-antialiased fonts in GUI widgets. If someone were to come along and bundle up Tcl/Tk with Tile and make the whole thing dead-easy to install and start using, I think that would be a major step forward for Tk. (Hm. Looks like it may have been proposed to do that back in 2005: http://www.tcl.tk/cgi-bin/tct/tip/248 http://www.tcl.tk/cgi-bin/tct/tip/248 . What ever happened to that?)