Which GUI To Use?

At this point, it appears to have come down to a choice between FxRuby and WxRuby. Others are mentioned on the rake-talk mailing list, but FxRuby seems to get the best press. But when (if) WxRuby matures, the FreeRide project may use it, so it bears watching. And there are other options, as well.

by Eric Armstrong

Compared Java, Ruby has a fairly significant weakness--a plethora of APIs, many of which are vastly underdocumented. In the Java world, there is pretty much one standard API for anything you want to do, and that API is competently documented. So while there are always some lurking gotchas, it's generally possible to figure out how to use the API and figure out whether it will work for you.

In the Ruby world, in contrast, there are generally half a dozen APIs you could use to carry out any particular task. The GUI world is no exception. The APIs frequently lack in commentary, which makes hard to figure out what they're capable of. That means you have to allocate time to try out several of them, to make a well-informed choice. Ugh. The alternative is to ask a mailing list--which invariably results in a collection of messages in which one or two people sing the praises of every API in existence.

What's really needed, of course, is a Wiki page where people can summarize the pluses and minues of a given API, with a counters of how many people have started using it, and how many people have stopped using it in favor of one of the alternatives. (If the numbers told what they switched to, that would be ideal.)

Lacking that, the next best thing is a good summary by a competent practitioner who has used them all.

Well, you ain't gonna get that here. I haven't used any of the GUI libraries--yet. I started this page to keep track of what I find out, so that I'll have some idea of where to start when I'm ready to dive in.

fxRuby

fxRuby has lots of good press.

wxRuby

wxRuby is designed to be better than fxRuby, "when the rewrite is complete". But it's not clear when that will actually happen. (It's being built by the authors of FreeRide, which makes two "labors of love" they need to find time for.)

Summarizing what John Gabriele has to say at http://www.simisen.com/jmg/

A future version of FreeRIDE could run on wxWidgets instead of FOX. A rewrite of the Ruby bindings to wxWidgets (wxRuby) is reported to be nearing completion.

Ruby-Gnome2 / Geany Text Editor

In a later correspondence, John made some useful comments that were worth adding to this page:

John goes on to say:

§ Home  ·  Health  ·  Music  ·  Dance  ·  Golf  ·  Yoga  ·  Essays  ·  Store §
www.TreeLight.com

Copyright © 2006 by Eric Armstrong. All rights reserved.
Contact me to send feedback, register for updates, or make a donation.
And by all means, be sure to visit The TreeLight Store.