Forum: Ruby best gui toolkit

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ede6dcd92a1e91feaba76bfc9f5954cb?d=identicon&s=25 Warren Dulnuan (rapido)
on 2008-11-29 17:12
What is the best GUI toolkit for Ruby?
669b7046f02e5dfc4bda4421f1069731?d=identicon&s=25 Alex Fenton (Guest)
on 2008-11-29 17:20
(Received via mailing list)
Warren Dulnuan wrote:
> What is the best GUI toolkit for Ruby?

The one that does all the things you need it to do.

a
3afd3e5e05dc9310c89aa5762cc8dd1d?d=identicon&s=25 Tim Hunter (Guest)
on 2008-11-29 17:43
(Received via mailing list)
Warren Dulnuan wrote:
> What is the best GUI toolkit for Ruby?

This is pretty much a perma-thread. Try searching for "ruby best gui
toolkit library" in Google.
Ede6dcd92a1e91feaba76bfc9f5954cb?d=identicon&s=25 Warren Dulnuan (rapido)
on 2008-11-29 17:55
Tim Hunter wrote:
> Warren Dulnuan wrote:
>> What is the best GUI toolkit for Ruby?
>
> This is pretty much a perma-thread. Try searching for "ruby best gui
> toolkit library" in Google.

Perma thread in Google? i found ten needle thread in yahoo.
59c436d6801db18313ff1b27369bc8dd?d=identicon&s=25 Vladimir Fekete (Guest)
on 2008-11-29 18:32
(Received via mailing list)
easy to learn, easy to implement : gtk

less easy to learn and implement : qt

 V.
Aafa8848c4b764f080b1b31a51eab73d?d=identicon&s=25 Phlip (Guest)
on 2008-11-29 19:16
(Received via mailing list)
Warren Dulnuan wrote:

> What is the best GUI toolkit for Ruby?

The most widespread and popular GUI system is the web and HTML, so the
leading
GUI for Ruby is Ruby on Rails. It makes many systems, such as Ajax, so
easy that
a Rails project is competitive with desktop GUIs, such as Java or Visual
Basic,
in many spaces.
703fbc991fd63e0e1db54dca9ea31b53?d=identicon&s=25 Robert Dober (Guest)
on 2008-11-29 21:30
(Received via mailing list)
On Sat, Nov 29, 2008 at 7:09 PM, Phlip <phlip2005@gmail.com> wrote:
> Warren Dulnuan wrote:
>
>> What is the best GUI toolkit for Ruby?
>
> The most widespread and popular GUI system is the web and HTML, so the
> leading GUI for Ruby is Ruby on Rails.
I guess that for somebody asking for a GUI and getting confronted with
Rails might be err frightening at least.
But the Webinterface idea is not a bad one per se. But you could look
at many tools, starting from a very basic WEBrick to Merv, Mongrel and
I am surely forgetting some...

HTH
Robert
--
Ne baisse jamais la tête, tu ne verrais plus les étoiles.

Robert Dober ;)
4828d528e2e46f7c8160c336eb332836?d=identicon&s=25 Robert Heiler (shevegen)
on 2008-11-29 22:04
> I guess that for somebody asking for a GUI and getting confronted
> with Rails might be err frightening at least.

I somewhat agree but

> But the Webinterface idea is not a bad one per se.

I completely agree on this. I think the functionality of the www + js +
css
is very similar to the "traditional" GUI world.

To find the "best" traditional GUI toolkit without any further criterias
is just
asking for disagreement.

For me I would answer that I am still looking for it ;) but I am very
happy with ruby-gtk, especially because of the wiki. (For some reason, I
am really lost without documentation, and ruby-qt does not really have a
wiki AFAIK.)

FXRuby has Lyle which is a super + but I think it also has no wiki.

Tk is a bit old IMO now, and wxruby sounds nice in theory but it used to
have a little problems in the past so i gave up quite on it (since
ruby-gtk and ruby-qt work for me already)

What I personally miss most is CSS in the GUI worlds. Especially the
ease of modifying looks in CSS. This sucks in GTK. I really hate that
part ... :(
CSS with all its minor flaws it may have, really made customizing
trivial (never mind that you can make it complex, but the basic
principle is super easy and works super nice).
Ff9e18f0699bf079f1fc91c8d4506438?d=identicon&s=25 James Britt (Guest)
on 2008-11-29 22:38
(Received via mailing list)
Phlip wrote:
> Warren Dulnuan wrote:
>
>> What is the best GUI toolkit for Ruby?
>
> The most widespread and popular GUI system is the web and HTML, so the
> leading GUI


But the question was about "the best", not widespread or leading.  (If
someone asked for the best programming language, would you suggest Java
or C++?)


I lay out a set of criteria for selecting a GUI toolkit for Ruby here:

http://www.ibm.com/developerworks/library/j-monkey...

Feel free to  ignore the second half of the article which is based on my
unassailable argument for using JRuby + Swing. :)  Part if the article
discusses the pros and cons of that choice. (Despite my devotion to
Monkeybars, I'm using Ruby's bindings for KDialog for a few of my
desktop helper apps until I see a need for something more than a quick
dialog box.)

I did not include HTML, though.  That's a whole other thread, given the
wealth of robust Ruby Web tools.  (And most widespread != best, for all
the same reasons why picking the best desktop GUI tool is so subject to
particular needs.)

Asking for the best of anything is a problem because no one agrees on
what "best" means, so specific requirements (platform, licensing, cost
of tools, available widgets, packaging and deployment options, WYSIWYG
editors, etc.) are critical.

While this is something of a permathread, the available options are
constantly changing, so relying on past discussions is sure to leave out
the latest and greatest.  It's useful to revisit it from time to time
(unless someone is faithfully maintaining an up-to-date and objective
resource on Ruby GUI choices).



--
James Britt

www.happycamperstudios.com   - Wicked Cool Coding
www.jamesbritt.com           - Playing with Better Toys
www.ruby-doc.org             - Ruby Help & Documentation
www.rubystuff.com            - The Ruby Store for Ruby Stuff
C9f52b32f82c64d1db495639f849b1be?d=identicon&s=25 rd (Guest)
on 2008-11-30 02:55
(Received via mailing list)
Warren Dulnuan wrote:
> What is the best GUI toolkit for Ruby?


If you were so inclined, you could use JRuby and Swing.
C40020a47c6b625af6422b5b1302abaf?d=identicon&s=25 Stefano Crocco (crocco)
on 2008-11-30 14:20
(Received via mailing list)
Alle Saturday 29 November 2008, Marc Heiler ha scritto:
> For me I would answer that I am still looking for it ;) but I am very
> happy with ruby-gtk, especially because of the wiki. (For some reason, I
> am really lost without documentation, and ruby-qt does not really have a
> wiki AFAIK.)

qtruby doesn't have a wiki, but there's a lot of documentation you can
use.
It's true that most of it it's written for programming with Qt in C++
and not
in ruby, but I think it should be easy to understand all the same. I may
be
wrong here, however: I know C++ and, indeed, I started programming Qt in
C++
before switching to ruby, so the documentation wasn't a problem for me.

Here's a list of the documentation availlable for qt(ruby) that I know
of:
* http://doc.trolltech.com/4.4/index.html: the official Qt
documentation, for
C++. It also contains one tutorial and several examples, many of which
are
explained almost line by line. qtruby includes the sources for both the
tutorial and the examples in ruby.
* http://techbase.kde.org/Development/Languages/Ruby: it documents the
main
differences between programming with Qt in C++ and in ruby.

Stefano
Aafa8848c4b764f080b1b31a51eab73d?d=identicon&s=25 Phlip (Guest)
on 2008-12-01 18:30
(Received via mailing list)
James Britt wrote:

> Phlip wrote:

>>> What is the best GUI toolkit for Ruby?

>> The most widespread and popular GUI system is the web and HTML, so the
>> leading GUI
>
> But the question was about "the best", not widespread or leading.

That is exactly why I said "widespread and popular", not "best"...
Eacf5ed623e72db0b87707baabd6f21a?d=identicon&s=25 Adam Gardner (adamgardner)
on 2008-12-02 03:59
Warren Dulnuan wrote:
> What is the best GUI toolkit for Ruby?

If you're only targeting OS X, then Cocoa (via RubyCocoa or MacRuby) are
certainly worth a look. The advantages are numerous; the obvious
disadvantage, of course, being that you can't use any of it on Windows
or Linux.

I haven't used any of the other GUI toolkits, so I can't really comment
on them.
54185df1d348bbd34587fcd4f8e4779b?d=identicon&s=25 Louis-Philippe (Guest)
on 2008-12-02 04:16
(Received via mailing list)
For small apps: Shoeseven simpler than web app + cross platform

2008/12/1 Adam Gardner <adam.oddfellow@gmail.com>
Aafa8848c4b764f080b1b31a51eab73d?d=identicon&s=25 Phlip (Guest)
on 2008-12-02 13:15
(Received via mailing list)
Adam Gardner wrote:

> If you're only targeting OS X, then Cocoa (via RubyCocoa or MacRuby) are
> certainly worth a look. The advantages are numerous; the obvious
> disadvantage, of course, being that you can't use any of it on Windows
> or Linux.

That's far from "obvious" - plenty of toolkits port easily!

However, one Brian Marick is popping a new RubyCocoa book soon, so I
likes!
E9e97c333023338bcfc2789d48203ca8?d=identicon&s=25 David Dennis (mangala)
on 2008-12-02 19:05
Phlip wrote:
> Adam Gardner wrote:
>
>> If you're only targeting OS X, then Cocoa (via RubyCocoa or MacRuby) are
>> certainly worth a look. The advantages are numerous; the obvious
>> disadvantage, of course, being that you can't use any of it on Windows
>> or Linux.
>
> That's far from "obvious" - plenty of toolkits port easily!
>
> However, one Brian Marick is popping a new RubyCocoa book soon, so I
> likes!

Um...Aptana? Duh...?
Fd22ee3cfc7dac283ce8e451af324f7d?d=identicon&s=25 Chad Perrin (Guest)
on 2008-12-02 19:49
(Received via mailing list)
On Sun, Nov 30, 2008 at 02:26:15AM +0900, Vladimir Fekete wrote:
>
> easy to learn, easy to implement : gtk

Probably even easier to learn and implement: tk

Tk lacks some features you may have come to expect from GTK, however.


Probably even easier to learn and implement than that: shoes

I'm not really terribly familiar with Shoes, so I'm afraid I can't
comment very authoritatively on its feature set, et cetera.  I'm sure
someone else here can -- including its creator, most likely.


>
> less easy to learn and implement : qt

It's also kind of onerous in terms of licensing, unless you just
*really*
like the GPL and have absolutely no interest in doing MS Windows
development.
8cd4ce8c76860f91925830e004391b9e?d=identicon&s=25 David Palacio (Guest)
on 2008-12-02 21:11
(Received via mailing list)
> It's also kind of onerous in terms of licensing, unless you just *really*
> like the GPL and have absolutely no interest in doing MS Windows
> development.
Why no Windows development? There is a gem for it.

http://rubyforge.org/frs/?group_id=181&release_id=23283
47df9cfb356c3ee0523cc3571b169730?d=identicon&s=25 Kenneth McDonald (Guest)
on 2008-12-02 22:11
(Received via mailing list)
I've always thought Tk has been vastly underrated. It's worth it for
the text and canvas widgets alone.

Ken
47b1910084592eb77a032bc7d8d1a84e?d=identicon&s=25 Joel VanderWerf (Guest)
on 2008-12-02 22:17
(Received via mailing list)
Kenneth McDonald wrote:
> I've always thought Tk has been vastly underrated. It's worth it for the
> text and canvas widgets alone.

Agree. Every time I investigate the alternatives, tk is the quickest
path to 2d animations.
54185df1d348bbd34587fcd4f8e4779b?d=identicon&s=25 Louis-Philippe (Guest)
on 2008-12-02 22:28
(Received via mailing list)
you guys should really look at shoes if you want 2D!
I totally agree with you with you that tk is really underestimated,
but it always felt alien to me, because of its syntax roots in TCL which
is
a very weird beast.
On the opposite, shoes totally emerge from the ruby culture, if you like
ruby, you'll like shoes.


2008/12/2 Joel VanderWerf <vjoel@path.berkeley.edu>
E4f967492dbd03c526cc9b397e68021d?d=identicon&s=25 Hidetoshi NAGAI (Guest)
on 2008-12-03 00:03
(Received via mailing list)
From: Chad Perrin <perrin@apotheon.com>
Subject: Re: best gui toolkit
Date: Wed, 3 Dec 2008 03:43:05 +0900
Message-ID: <20081202184841.GE5851@kokopelli.hydra>
> Probably even easier to learn and implement: tk
>
> Tk lacks some features you may have come to expect from GTK, however.

Please teach me about the features.
I want to add the features to Ruby/Tk, if I can.

For example, HBox/VBox(?) like widget are included
in a example 'tkalignbox.rb' on 'ext/tk/sample' directory.
1bac2e65d64faf472cf2ebc94f0f5ee0?d=identicon&s=25 Ara Howard (ahoward)
on 2008-12-03 00:12
(Received via mailing list)
On Dec 2, 2008, at 3:56 PM, Hidetoshi NAGAI wrote:

> Please teach me about the features.
> I want to add the features to Ruby/Tk, if I can.

reason # 42 that tk is a great toolkit.  thanks hidetoshi!

a @ http://codeforpeople.com/
59193d8082ee0fe75675d3bb376cf2ba?d=identicon&s=25 Pierre Pierre (pierre_p)
on 2008-12-03 05:41
I personaly like wxRuby.
Quite easy, and lots of sample code provided with it, so really easy to
pick up.

Shoes is just fun to code, works really nicely, but I wouldn't recommand
it for normal GUI application yet, since it doesnt have menu bar for
instance.
But it's definitely worth trying :-)
E4f967492dbd03c526cc9b397e68021d?d=identicon&s=25 Hidetoshi NAGAI (Guest)
on 2008-12-03 07:36
(Received via mailing list)
From: Joel VanderWerf <vjoel@path.berkeley.edu>
Subject: Re: best gui toolkit
Date: Wed, 3 Dec 2008 06:11:03 +0900
Message-ID: <4935A598.3080209@path.berkeley.edu>
> > I've always thought Tk has been vastly underrated. It's worth it for the
> > text and canvas widgets alone.
>
> Agree. Every time I investigate the alternatives, tk is the quickest
> path to 2d animations.

Does anyone want Tcl3D (http://www.tcl3d.org/) support on Ruby/Tk ?
6087a044557d6b59ab52e7dd20f94da8?d=identicon&s=25 Peña, Botp (Guest)
on 2008-12-03 07:44
(Received via mailing list)
From: Hidetoshi NAGAI [mailto:nagai@ai.kyutech.ac.jp]
# Does anyone want Tcl3D (http://www.tcl3d.org/) support on Ruby/Tk ?

NaHi, pls don't ask.. iow, of course! ;)

kind regards -botp
621080472679266b8e9b81aff4800398?d=identicon&s=25 Saji N. Hameed (Guest)
on 2008-12-03 08:39
(Received via mailing list)
> > Agree. Every time I investigate the alternatives, tk is the quickest
> > path to 2d animations.
>
> Does anyone want Tcl3D (http://www.tcl3d.org/) support on Ruby/Tk ?

that will be fantastic!

saji

--
Saji N. Hameed

APEC Climate Center                  +82 51 668 7470
National Pension Corporation Busan Building 12F
Yeonsan 2-dong, Yeonje-gu, BUSAN 611705      saji@apcc21.net
KOREA
7ece60b3b5bb235d1b6df89727ca6cf7?d=identicon&s=25 mdiam (Guest)
on 2008-12-03 11:45
(Received via mailing list)
On Dec 2, 10:21 pm, Louis-Philippe <defa...@spiralix.org> wrote:

> you guys should really look at shoes if you want 2D!

I agree that shoes it's a very nice toy, but:
- what about if I need binding like:
  <Control-x><s>  on on canvas or text widget
- is there any menu bar now?

> I totally agree with you with you that tk is really underestimated,

I agree too! Tk (and Tcl) has Unicode support for long time now, much
before most other script languages

The main default of Ruby with the GUI is the same default TCL has with
OO systems

The TCL argument for not having a standard OO system was that on can
use several of them... but as no one is standard, Tcl is not yet
considered as a OO langage.

Also Ruby has many (more or less easy to install) Gui toolkit
availables.
But if Ruby had (only) one full supported (preinstalled) GUI
Every one could count on any Ruby installation for building a Gui
application!
7ece60b3b5bb235d1b6df89727ca6cf7?d=identicon&s=25 mdiam (Guest)
on 2008-12-03 12:20
(Received via mailing list)
> From: Chad Perrin <per...@apotheon.com>
>
> > Probably even easier to learn and implement: tk
>
> Please teach me about the features.
> I want to add the features to Ruby/Tk, if I can.

- make Tk easily available in any standard Ruby distribution:
  e.g. allow to compil Ruby with Tk if the Tcl/Tk sources are in
  the Ruby sources (possibly by prefixing tcl/tk generated lib for
  ruby distribution)

- make Tk available to Jruby :
  - either by using ffi (if i did well understood the ffi's
feature ;-)
  - or via the swank full Tk emulation in java ?
    (http://kenai.com/projects/swank/pages/Home)

Tk and Swing are two multiplateform Gui toolkit.
It would be nice if Tk could be used in the Java world, and
if Swing could (out of the Ruby box) be used from the (C)Ruby
world!

If one of the two previous universal solutions would provide,
it would help to promote the use of Ruby as standard Gui scripting
solution.

> > For example, HBox/VBox(?) like widget are included
> in a example 'tkalignbox.rb' on 'ext/tk/sample' directory.

-- Maurice
Ea3084bf9444c7d0cd0c640ca0ac93b3?d=identicon&s=25 Logan Barnett (Guest)
on 2008-12-03 20:24
(Received via mailing list)
On Dec 3, 2008, at 3:39 AM, mdiam wrote:
> Also Ruby has many (more or less easy to install) Gui toolkit
> availables.
> But if Ruby had (only) one full supported (preinstalled) GUI
> Every one could count on any Ruby installation for building a Gui
> application!

This is along the lines of declaring a One True web framework (like
Rails).

> Tk and Swing are two multiplateform Gui toolkit.
> It would be nice if Tk could be used in the Java world, and
> if Swing could (out of the Ruby box) be used from the (C)Ruby
> world!

Swing can be used out of box from JRuby, and JRuby + Swing apps don't
require the user to install all of (J)Ruby, but just double click a
jar/exe/app. What's the harm with JRuby, or are you referring to Ruby
in a general sense?

-Logan
7ece60b3b5bb235d1b6df89727ca6cf7?d=identicon&s=25 mdiam (Guest)
on 2008-12-03 21:51
(Received via mailing list)
Hello Logan,

On Dec 3, 8:18 pm, Logan Barnett <logus...@gmail.com> wrote:
>
> On Dec 3, 2008, at 3:39 AM, mdiam wrote:
>
> > But if Ruby had (only) one full supported (preinstalled) GUI
> > Every one could count on any Ruby installation for building a Gui
> > application!
>
> This is along the lines of declaring a One True web framework (like  
> Rails).

Not exactly the same, I think (but not sure) that it's easier to
change
from a framework to another than from a (lower library like) a
GUI such Swing to Qt or Gtk.
So a GUI choice seems critical for me.

Also Tcl provide a natural GUI library with it's Tk tool kit. But
also Python which embed Tk with it!
A Python/Tk script is easiest to distribute than a Ruby/Tk (but not
as sexy to write ;-)


> > It would be nice if Tk could be used in the Java world, and
> > if Swing could (out of the Ruby box) be used from the (C)Ruby
> > world!
>
> Swing can be used out of box from JRuby, and JRuby + Swing apps don't  
> require the user to install all of (J)Ruby, but just double click a  
> jar/exe/app.

Yes, that is **the** big advantage for JRuby (and the fact that any
java lib can be use
directly with Jruby!)


> What's the harm with JRuby, or are you referring to Ruby  
> in a general sense?

Some of my Ruby scripts (without gui) run either in (C)Ruby or in
Jruby without
any modifications, which is very nice.
But I have some Ruby/Tk which cannot be rub into Jruby whith big
changes !

Having Tk running onto jruby (either via Swank java lib or via FFI and
native Tk) would allow me to smoothly migrate from (C)ruby to Jruby.
Or having Swing gui easily usable from native CRuby (without jni)
could be very nice too!

-- Maurice
Fd22ee3cfc7dac283ce8e451af324f7d?d=identicon&s=25 Chad Perrin (Guest)
on 2008-12-04 01:29
(Received via mailing list)
On Wed, Dec 03, 2008 at 05:04:41AM +0900, David Palacio wrote:
> > It's also kind of onerous in terms of licensing, unless you just *really*
> > like the GPL and have absolutely no interest in doing MS Windows
> > development.
> Why no Windows development? There is a gem for it.
>
> http://rubyforge.org/frs/?group_id=181&release_id=23283

My mistake -- I hadn't realized Qt/Windows was available under the GPL
as
of version 4.
This topic is locked and can not be replied to.