Is Ruby any good for GUI development?
Solution 1
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.
Solution 2
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).
Solution 3
Ruby has Shoes, but that might be a little lightweight.
Solution 4
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.
Solution 5
Take a look at Ruby GUI 2008 Survey Results and the discussion here. You will love to know.
Related videos on Youtube
David Arno
I am a Software Development Manager at Orbus Software, producers of the market leading Enterprise Architecture tools: iServer and iServer 365. At heart, I am a professional software developer with 30 years’ experience in many software technologies. I am an enthusiastic advocate of agile and functional methodologies. I have worked solo, as a team member, and have led development teams. I am passionate about both writing high quality, well tested, clean code and in teaching others the skills and techniques needed to do the same. In my view, some of the essential skills for a good developer to have are a clear understanding of functional programming, test-driven development, Scrum or Kanban and continuous integration methods. A good manager of a team of developers therefore has to have those skills too.
Updated on November 24, 2020Comments
-
David Arno over 3 years
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.
-
Dan Rosenstark about 15 yearsI actually use one cross-platform app that has a toolkit I could use: Netbeans. I think it is based on Swing, but you have Netbeans as an abstraction layer. I'd love to do something in Ruby, but all of the frameworks mentioned in the answers look pathetically immature. If only Microsoft had made .Net cross-platform...
-
Jonathan Sterling over 14 yearsUm, .NET is cross-platform. It's called Mono, yo.
-
sondra.kinsey about 5 years
-
-
David Arno over 15 yearsEven though I don't /like/ you answer - as it isn't what I wanted to hear - this is the most useful (and honest! :) answer.
-
Kibbee over 15 yearsDoesn't SWT for Java try to resolve the problem with having a native GUI in a cross platform environment?
-
Nosredna almost 15 yearsI 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.
-
P Rasta over 13 yearsQt applications do look and feel native when properly designed.
-
irl_irl over 13 yearsMy experience with shoes is that it's not great..
-
Genadinik about 13 yearsBy the way, the link isn't working for me. Is the shoes project dead?
-
Nakilon almost 11 yearsGTK... SciTE, ported via GTK it was moved from 900 kbytes for Win to 80 mbytes for Mac. Even if not count all the dependencies (python, perl, sqlite...), it just takes ~20sec to launch it.
-
Nakilon almost 11 yearswxRuby is dead since 2009 (
-
Daniel Rikowski about 10 yearsThe Shoes project has been restarted, with a new approach: It has a pure Ruby API, which is mostly compatible with the old versions, and a pluggable toolkit which creates the actual visuals. (Currently the only toolkit is Java Swing)
-
FilBot3 almost 8 yearsA tip for anyone looking at TK, at least for me, plan ahead and what you want your UI to look like, and each pane. Then learn what those things are called in TK, and the rest should fall into place. I dove into it thinking I'd crank out the next best thing, but I learned I had a long ways to go.