Does Ruby/Tk have all features as perl/Tk or java swing?

N

ngoc

Hi
I am perl and java programmer. I want to make a quite complex
application using a lot GUI components like Spreadsheet, Menu, Tab
etc..in Ruby. I have tried Ruby for some simple non-GUI applications and
really like the language. It will be time consumming if I start to write
software in Ruby and later find out that it lacks this and that. So
someone have worked much with Ruby/Tk can answer my questions.
1. Does Ruby/Tk have all features as perl/Tk or java swing?
2. Does Ruby have features like Java Applet running in a web browser?
3. JRuby is an interpreter that I can run both java and ruby on it. But
what is the benefit of that function for programmer and user?
Thanks
ngoc
 
D

Dido Sevilla

1. Does Ruby/Tk have all features as perl/Tk or java swing?

Perl/Tk perhaps. Swing, it's been a long time since I've programmed
that. A better bet for a GUI toolkit for Ruby in my experience is
FXRuby. It has all of the features you've mentioned and then some.
2. Does Ruby have features like Java Applet running in a web browser?

AFAIK, no. That would require a Ruby plugin for whatever browser you
want to support.
3. JRuby is an interpreter that I can run both java and ruby on it. But
what is the benefit of that function for programmer and user?

Correction, JRuby is an implementation of the Ruby interpreter in
Java. The benefits of such a thing I think would be obvious: you can
access Java classes from a Ruby program, you can integrate the two
languages better.
 
J

Joe Van Dyk

=20
Perl/Tk perhaps. Swing, it's been a long time since I've programmed
that. A better bet for a GUI toolkit for Ruby in my experience is
FXRuby. It has all of the features you've mentioned and then some.

What advantages does Fox have over Tk?
 
D

Dido Sevilla

What advantages does Fox have over Tk?

Well, it seems to have a more full-featured set of widgets for one. It
seems that while Ruby/Tk is simpler to program FXRuby seems to offer
more for larger projects. It's also integrated into the One-Click
installer as of the latest version, where Ruby/Tk is not. The last
pretty much decided the issue for me, as I had to write a Ruby GUI
that had to run cleanly both on GNU/Linux and Windows and be
relatively painless to deploy, especially on Windows.
 
H

Hidetoshi NAGAI

From: ngoc <[email protected]>
Subject: Does Ruby/Tk have all features as perl/Tk or java swing?
Date: Wed, 13 Jul 2005 06:55:50 +0900
Message-ID: said:
1. Does Ruby/Tk have all features as perl/Tk or java swing?

perl/Tk uses the "ptk" library. I heard that includes standard Tk
widgets and some megawidgets from some extensions.
Ruby/Tk uses standard Tcl/Tk libraries. Then, the features of
Ruby/Tk is less than perl/Tk.
However, Ruby/Tk can use almost all of Tcl/Tk extensions.
At leaset 1.8.2 or later, Ruby/Tk has support libraries for some
Tcl/Tk extensions. If includes such supports, Ruby/Tk has more
features than perl/Tk.
And it will be also an advantage that Ruby/Tk can use the features
of the latest Tcl/Tk.
Ruby/Tk can work with the latest Tcl/Tk 8.4.11 or 8.5a3.
 
J

Joe Van Dyk

From: ngoc <[email protected]>
Subject: Does Ruby/Tk have all features as perl/Tk or java swing?
Date: Wed, 13 Jul 2005 06:55:50 +0900

=20
perl/Tk uses the "ptk" library. I heard that includes standard Tk
widgets and some megawidgets from some extensions.
Ruby/Tk uses standard Tcl/Tk libraries. Then, the features of
Ruby/Tk is less than perl/Tk.
However, Ruby/Tk can use almost all of Tcl/Tk extensions.
At leaset 1.8.2 or later, Ruby/Tk has support libraries for some
Tcl/Tk extensions. If includes such supports, Ruby/Tk has more
features than perl/Tk.
And it will be also an advantage that Ruby/Tk can use the features
of the latest Tcl/Tk.
Ruby/Tk can work with the latest Tcl/Tk 8.4.11 or 8.5a3.

So if I want to use Tk 8.5a3, I just install it and I can use it
through Ruby? Do I need to recompile Ruby if I update Tk?
 
H

Hidetoshi NAGAI

From: Joe Van Dyk <[email protected]>
Subject: Re: Does Ruby/Tk have all features as perl/Tk or java swing?
Date: Wed, 13 Jul 2005 16:26:57 +0900
Message-ID: said:
So if I want to use Tk 8.5a3, I just install it and I can use it
through Ruby? Do I need to recompile Ruby if I update Tk?

If configure with --enable-tcltk-stubs, you may not need recompile.
Else, please recompile tcltklib.so only.
 
L

Lothar Scholz

Hello Joe,


JVD> What advantages does Fox have over Tk?

Advantage:
Faster, smaller, better (more ruby like) API.

Disadvantage:
Not all widgets exist or at comparable quality
(TkCanvas, TkText, TkTable), no I18N and L17N.

If you need a basic feature it is much easier to add it with C++ to
FOX + Ruby Binding as it is with TK. In a complex application you
always have to do this, in simpler apps you don't need to care about
it.
 
M

Mark Thomas

What about wxRuby?

wx uses native widgets on all platforms, and is a good choice if you
want a cross-platform app that feels native. Personally, I don't like
the way Tk apps feel.

wx would be my first choice, if wxRuby is mature enough.
 
L

Lothar Scholz

Hello Mark,

MT> What about wxRuby?

MT> wx uses native widgets on all platforms, and is a good choice if you
MT> want a cross-platform app that feels native. Personally, I don't like
MT> the way Tk apps feel.

MT> wx would be my first choice, if wxRuby is mature enough.

What wxRuby are you talking about ?
0.6 or the current CVS head.

I never tried the latest releases, but 0.6 is definitely not mature
enough for mission critical applications. There are some serious
problems with garbage collection.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top