views:

2843

answers:

13

I am considering creating a GUI-based tool that I want to be cross-platform. I've dismissed Java, as I personally do not like Swing. I'm currently considering C# and using Mono to make it cross-platform. However I'm wondering whether new-fangled cross-platform languages like Ruby can offer me a decent GUI development environment.

+6  A: 

Ruby has Shoes, but that might be a little lightweight.

William Keller
+1  A: 

Not sure about Ruby, but you mentioned Mono/C# -- I've used Mono and GTK# quite a bit lately and am very impressed. Seems to be pretty stable and cross-platform portability is nice.

Dustin
+3  A: 

With Ruby you can use Tk, which is a mature, cross platform UI toolkit. It is the defacto GUI toolkit for Python and Tcl, and is also available for use with Perl. The most recent versions of Tk make use of native widgets which addresses the primary concern that Tk looks dated.

A language-neutral website devoted to Tk is http://www.tkdocs.com/ which includes examples coded in both Ruby and Tcl.

Bryan Oakley
+4  A: 

You'll have Ruby/GTK, which allows you to use the GTK toolkit under linux. I think that should be working under Windows and Mac Os (as for Gimp, Gaim and so on).

A french magazine post a good beginner article about Ruby/GTK.

Edit : According to main page on the SourceForge project, Ruby-Gnome2 (aka Ruby/GTK) is cross-platform (Windows, Linux, Mac Os).

paulgreg
+19  A: 

The short answer: no (because you said cross-platform).

The long answer: cross-platform GUIs are an age-old problem. Qt, GTK, wxWindows, Java AWT, Java Swing, XUL -- they all suffer from the same problem: the resulting GUI doesn't look native on every platform. Worse still, every platform has a slightly different look and feel, so even if you were somehow able to get a toolkit that looked native on every platform, you'd have to somehow code your app to feel native on each platform.

It comes down to a decision: do you want to minimise development effort and have a GUI that doesn't look and feel quite right on each platform, or do you want to maximise the user experience? If you choose the second option, you'll need to develop a common backend and a custom UI for each platform.

ruby is not a bad choice for your common backend.

Stewart Johnson
Even though I don't /like/ you answer - as it isn't what I wanted to hear - this is the most useful (and honest! :) answer.
David Arno
Doesn't SWT for Java try to resolve the problem with having a native GUI in a cross platform environment?
Kibbee
I think the only GUI that people accept as "native" but isn't native is the web browser. That's why I like RIAs so much.
Nosredna
Qt applications do look and feel native when properly designed.
Jason Voegele
+2  A: 

There's also FXRuby which has the benefit of a Pragmatic Programmer book, as well as wxRuby which is based on the wxWidgets C++ GUI framework.

Jason Tennier
+1  A: 

Ruby/GNOME2 works pretty well. You can use Glade to drag and drop window elemtns and load it the UI from your Ruby app.

Farrel
A: 

Have you looked at SWT on Java? It uses native widgets and is much easier to get a nice interface with it than Swing.

Dan Harper - Leopard CRM
A: 

Java is still an option and its a good option too. If you want a native look and feel use SWT/JFace. You can really make powerful UI applications with eclipse's RCP framework.

Craig
+2  A: 

being a wxperl programmer, i know that wxruby is there as well. Wx is pretty fast and has true crossplatform look and feel.

sir_lichtkind
A: 

If you ever venture over to the mac, check out RubyCocoa. It is obviously only for OSX, but I've seen a lot of folks scratch their head when looking to do GUI development on the mac and if you love ruby RubyCocoa is a lot of fun.

sammich
+1  A: 

Take a look at Ruby GUI 2008 Survey Results and the discussion here. You will love to know.

pierr
A: 

I strongly back Qt for cross platform GUI development. It's awesome and APIs are very intuitive. GUI look and feel almost native with Qt because it uses GUI controls provided by underlying OS.

Though the basic interface with C++ other language bindings are available. For Ruby RubyQt is available. Unfortunately it's very immature.

prasadvk