Jens Riedel wrote:
Hello,
I'm new to Ruby and now searching for the best GUI toolkit to start with.
After testing different ones with little "Hello world" samples, I have two favorites: FxRuby and WxRuby.
I'd like to here some experiences or tips from you, why one of the mentioned toolkits could be the better decision for me.
I have no experience with GUI programming (except of web interfaces), nor I have with C++.
Thanx for any comments,
Jens
I've used FOX, FLTK, and wxWidgets on C++ projects in the past six months (in that sequence). I used fxRuby and wxRuby but in a very limited way. BTW, I think substandard support for wxWidgets makes it hard for Python programmers to make the switch (wxPython being so incredibily popular).
fxRuby pros:
FxRuby seems more popular in Ruby and support for it is clearly better than wxRuby. I don't know if this is because it was included with the Ruby Installer for Windows or if the FreeRIDE project popularized it.
fxRuby cons:
The underlying toolkit itself is not as widely used as wxWidgets. Toolkit's licensing is not as generous as wxWidgets (not an issue if your app is LGPL/GPL but important if using this at work or on closed-source project). GUI designers are awful (but improving).
wxRuby pros:
GUI apps look very nice and 100% native. The underlying GUI tookit of wxRuby (wxWidgets) has a far larger marketshare compared to FOX toolkit and FLTK combined. The wxWidgets documentation (1,700 printable pages) and examples are 2nd to none. There are several free and commercial GUI designers for wxWidgets (much higher quality than the one's I've tried with FLTK and FOX) and they can generate xrc files. There's a book about wxWidgets set to be released on July 4 (according to Amazon.com listing). The latest stable wxWidgets released last month runs on the widest variaty of OS including PocketPC and Mac OS. Actually, Mac's Tiger even ships with wxWidgets 2.5.
wxRuby cons:
wxRuby is currently undergoing a migration to wxRuby-swig so
it is not improving until wxRuby-swig is released. This means it might be a while before Ruby has wxWidgets support at a level similar to wxPython. IMHO, the current usability of wxRuby is not as good as fxRuby at all. And I think the current state of wxRuby is an important disadvantage for those considering a switch to Ruby.
summary:
If you're only going to use ruby, and you don't mind the FOX licensing terms, then IMHO fxRuby is the clear winner. But if you plan on using other languages with the GUI toolkit, you might want to live with some of the current shortcomings of wxRuby.
Here is a comparison of various GUI toolkits for Ruby:
http://freeride.rubyforge.org/wiki/wiki.pl?GUIFrameworkProject/GUIComparison