Whats the best/easiest GUI library out there for Ruby?
I would prefer a cross-platform GUI library, but currently I'm only concerned about Windows (Win32). I am having difficulting finding any that seem to be easy to use. Are there any?
Whats the best/easiest GUI library out there for Ruby?
I would prefer a cross-platform GUI library, but currently I'm only concerned about Windows (Win32). I am having difficulting finding any that seem to be easy to use. Are there any?
Ruby Shoes (by why) is intended to be a really simple GUI framework. I don't know how fully featured it is, though.
Some good code samples can be found at the tutorial.
Also, I think shoes powers hackety hack, a compelling programing learning environment for youngsters.
Try shoes http://www.shoooes.net/. Unfortunately, I have not had a chance to work with it yet, but I have an upcoming project were I plan to use it. It is cross platform compatible. Also the API looks like very Rubish so I would give it a try
There's a discussion here that might be useful.
From my own (limited) exposure, I'd say that shoes was the most fun and probably the "easiest" to get into. Be warned, however, that figuring out what was wrong when something breaks can be tricky (at least, it was for me).
For a real-world application that I was planning to deploy to real-world users, I think I'd go with wxruby.
If you're looking for a cross-platform GUI, then I'd highly recommend going with JRuby and Swing.
Also, take a look at the monkeybars library, which is a Ruby library for building MVC applications using JRuby and Swing, where you can also use the excellent Netbeans IDE to visually build your GUI.
There are Ruby bindings for QT and GTK so you can't go wrong with those ones (they're portable too).
The Pragmatic Programmers published a mini book on Ruby with QT and a full book on FXRuby, so I think the latter's another good choice.
Shoes, although easy to learn and cute, is pretty situational and doesn't provide as many options for controls as any of the other ones do, so if you want to build anything beyond a simple UI (not to hate Shoes but it's not mature enough yet), I'd recommend you to use one of the more mature and tested toolkits.
Glimmer is an interesting option for JRuby users which provides a very Ruby-ish interface to the SWT toolkit. (SWT is the user interface framework behind Eclipse, which delivers fast performance and familiar UI metaphors by making use of native widgets on the various platforms it supports: Windows, OS X, Linux, etc.) SWT always appealed to me as a Java developer, but coding it was painful in the extreme. Glimmer makes the process a lot more straightforward by emphasizing convention over configuration, and by valuing DRYness and all the other normal Ruby goodness.
Another neat option is SproutCore, a Javascript-based GUI toolkit with Ruby bindings developed by Apple. At least, the demos for it look great, and otherinbox built a pretty slick looking application on top of it. Personally, I've spent quite a few hours trying to get it running on two systems -- one Windows and one Linux -- and haven't succeeded on either one -- I keep running into dependency issues with Merb or other pieces of the SproutCore stack. But it's intriguing enough that I'll go back after a few weeks and try again, hoping that the issues get resolved in that time.
Tk is available for Ruby. Some nice examples (in Ruby, Perl and Tcl) can be found at http://www.tkdocs.com/
wxWidgets is worth checking out. It is well supported on Ruby via wxRuby. For an example app, have a look at wxRIDE. See it compared to other toolkits. You might also want to check out Anvil, which is a sort of Rails-ish framework for working with wx. It looks moribund now, though.
I've had some very good experience with Qt, so I would definitely recommend it.
You should be ware of the licensing model though. If you're developing an open source application, you can use the open-source licensed version free of charge. If you're developing a commercial application, you'll have to pay license fees. And you can't develop in the open source one and then switch the license to commercial before you start selling.
P.S. I just had a quick look at shoes. I really like the declarative definitions of the UI elements, so that's definitely worth investigating...
If you are interested, RubyLearning offers a course on FXRuby and Shoes. Actually, the Shoes course is being conducted currently.
Probably the easiest is Shoes. As an assistant teacher at RubyLearning, I hope that we will have better courses for learners.
Some people got stuck in installing FXRuby. But Shoes has an installer for any platforms (Windows, Mac and Linux).
Here is a good resource for you:
http://en.wikibooks.org/wiki/Ruby_Programming/GUI_Toolkit_Modules
has links comparing basically all of them.
If you're developing for Mac, MacRuby has the best library, hands down. Aside from being blazing fast, it has a very nice GUI interface named hotcocoa. Additionally, the library is developed by Apple, uses the Core Foundation classes as its base, and runs on top of the Objective-C runtime using LLVM. In two words, it's blazing fast.