GUI for a newbie

M

Matthew Borgeson

Hello All-

I have taken up Ruby over the past year and have finally written 7
applications for various functions for my job as a clinical pharmacist.

The problem I have here is that while my programs all work great, they
are all CLI interface. In order to increase their palatability among my
coworkers, however, I wish to add a GUI.

The question I have here is NOT which is the best for my needs. I have
it nailed down to three based on the platforms and screenshots I have
seen of their results:

Gtk (Would be nice on my Nokia n800 maemo)
Qt (My preference)
Tk (Seems to be the favorite of the Ruby folk)

My question is which would be the easiest to learn. While I want to use
Qt (I just feel comfortable with its maturity)I am concerned by how hard
it will be to learn, considering I have no C++ background.

Any guidance before I commit to learning one would be appreciated...

Thank you

Matthew F Borgeson
 
J

Joel VanderWerf

Matthew said:
Gtk (Would be nice on my Nokia n800 maemo)
Qt (My preference)
Tk (Seems to be the favorite of the Ruby folk)

My question is which would be the easiest to learn. While I want to use
Qt (I just feel comfortable with its maturity)I am concerned by how hard
it will be to learn, considering I have no C++ background.

Does it affect your decision that Nokia just bought the company that
makes Qt?

I've never developed anything with Qt, but it seems unlikely that you
need to know any C++ to use the ruby bindings.
 
S

Stefano Crocco

Alle Thursday 31 January 2008, Matthew Borgeson ha scritto:
Hello All-

I have taken up Ruby over the past year and have finally written 7
applications for various functions for my job as a clinical pharmacist.

The problem I have here is that while my programs all work great, they
are all CLI interface. In order to increase their palatability among my
coworkers, however, I wish to add a GUI.

The question I have here is NOT which is the best for my needs. I have
it nailed down to three based on the platforms and screenshots I have
seen of their results:

Gtk (Would be nice on my Nokia n800 maemo)
Qt (My preference)
Tk (Seems to be the favorite of the Ruby folk)

My question is which would be the easiest to learn. While I want to use
Qt (I just feel comfortable with its maturity)I am concerned by how hard
it will be to learn, considering I have no C++ background.

Any guidance before I commit to learning one would be appreciated...

Thank you

Matthew F Borgeson

In my opinion Qt is easy to learn (although, I admit I used it in C++ before
using it in ruby). It's true it's written for C++, but most of it is quite
clear and I believe that you can follow it even without knowing C++ (you just
have to ignore everything which doesn't concern ruby, for example destructors,
memory management, virtual functions and so on). There's also a tutorial,
included with QtRuby, which is a porting of the original C++ tutorial which I
think is well done. At

http://developer.kde.org/language-bindings/ruby/index.html

you'll find a quick overview of the main differences between the ruby and C++
versions.

Stefano
 
S

Stefano Crocco

Alle Thursday 31 January 2008, Reid Thompson ha scritto:
Using GTK, you could build the gui with Glade

Qt include a designer, which does (I think) the same things glade does.

Stefano
 
M

Matthew Borgeson

Joel said:
Does it affect your decision that Nokia just bought the company that
makes Qt?

I've never developed anything with Qt, but it seems unlikely that you
need to know any C++ to use the ruby bindings.

It doesn't really affect my decision per se...

I personally develop using KDevelop on OpenSuse 10.3. The choice of
IDE(Glade, QtDesigner, Eclipse, et cetera)is irrelevant to me; likewise,
as KDE (using Qt) has been made to run on the n800, and gtk runs under
maemo on the n800 no problem, the purchase has little effect on my
decision; I really want just nice-looking, cross platform apps (thus my
decision for Qt) in the least amount of time possible...thus my choice
of the aforementioned three

I am really looking for ease of learning and time to proficiency.
 
L

Lorenzo E. Danielsson

Matthew said:
Hello All-

I have taken up Ruby over the past year and have finally written 7
applications for various functions for my job as a clinical pharmacist.

The problem I have here is that while my programs all work great, they
are all CLI interface. In order to increase their palatability among my
coworkers, however, I wish to add a GUI.

The question I have here is NOT which is the best for my needs. I have
it nailed down to three based on the platforms and screenshots I have
seen of their results:

Gtk (Would be nice on my Nokia n800 maemo)
Qt (My preference)
Tk (Seems to be the favorite of the Ruby folk)

My question is which would be the easiest to learn. While I want to use
Qt (I just feel comfortable with its maturity)I am concerned by how hard
it will be to learn, considering I have no C++ background.
Since nobody seems to have done it yet, let me place a +1 for Tk. I'm
not really into GUI programming much, but Tk has always felt very
straight-forward to me. And the new tk8.5 looks really nice (if you want
to judge a book by its cover). Most importantly, I think it is
significantly easier to learn Tk than Gtk or Qt.

I have played around a bit with both QtRuby and Ruby/Gtk and their both
okay, I guess. I'm not a huge fan of either. I must say that a slightly
prefer Ruby's Gtk bindings to the Qt ones, although I prefer Qt itself
to Gtk.

If *I* were to build a GUI app for some inexplicable reason I would
start searching for bindings for Motif or the excellent Athena widget set..

Lorenzo
 
D

Dominik Honnef

Since nobody seems to have done it yet, let me place a +1 for Tk. I'm
not really into GUI programming much, but Tk has always felt very
straight-forward to me. And the new tk8.5 looks really nice (if you want
to judge a book by its cover). Most importantly, I think it is
significantly easier to learn Tk than Gtk or Qt.

I have played around a bit with both QtRuby and Ruby/Gtk and their both
okay, I guess. I'm not a huge fan of either. I must say that a slightly
prefer Ruby's Gtk bindings to the Qt ones, although I prefer Qt itself
to Gtk.

If *I* were to build a GUI app for some inexplicable reason I would
start searching for bindings for Motif or the excellent Athena widget
set..

Lorenzo

imo, Gtk is very straightforward to program/learn. Don't know about Tk though.
 
D

Dirk Traulsen

Am 1 Feb 2008 um 7:07 hat Matthew Borgeson geschrieben:
I really want just nice-looking, cross platform apps (thus
my decision for Qt) in the least amount of time possible...thus my choice
of the aforementioned three

Qt is a good choice, but did you have a look at WxRuby?

Unlike Gtk or Tk, it is truly cross-platform with native look and feel,
because it uses the native tool kits of the platform, for example
Windows widgets on Win32, Aqua on OS X and GTK on Linux.

Have a look:
http://wxruby.rubyforge.org/wiki/wiki.pl?ScreenShots

It is just a gem away:
gem install wxruby

Dirk
 
M

Mark Roseman

Despite some evidence and much opinion to the contrary, modern versions
of Tk actually produce a very good, platform-specific look and feel, if
used correctly. Tk also has an API that is very easy to work with.

For some good up-to-date info, see the tutorial at http://www.tkdocs.com

Mark
 
J

Jayson Williams

Hello All-

I have taken up Ruby over the past year and have finally written 7
applications for various functions for my job as a clinical pharmacist.

The problem I have here is that while my programs all work great, they
are all CLI interface. In order to increase their palatability among my
coworkers, however, I wish to add a GUI.

The question I have here is NOT which is the best for my needs. I have
it nailed down to three based on the platforms and screenshots I have
seen of their results:

Gtk (Would be nice on my Nokia n800 maemo)
Qt (My preference)
Tk (Seems to be the favorite of the Ruby folk)

My question is which would be the easiest to learn. While I want to use
Qt (I just feel comfortable with its maturity)I am concerned by how hard
it will be to learn, considering I have no C++ background.

Any guidance before I commit to learning one would be appreciated...

Thank you

Matthew F Borgeson

I cast my lot for Tk. I spent a great deal of time looking for a GUI
Toolkit to use with Ruby,
and I have dabbled with most all of them (shoes being the one
exception). Like yourself, I also found myself using
Ruby a lot at work, and wanted to make the interface for my
applications a bit more user friendly than a CLR interface.
After testing out one GUI or another, I always came back to Tk.
My reason for turning to Tk, was for the very things you are looking
for in a GUI Toolkit;
Tk was very easy for me to pick up. Where one GUI had me stumped, I
found that it took much less time to
figure out how to do the same thing in Tk. If your looking for ease of
learning, Tk is my choice. There are
others that have this or that, or can do this or that, but if your
looking for something quick, Tk is it.

--Jayson
 
G

gregarican

I cast my lot for Tk. I spent a great deal of time looking for a GUI
Toolkit to use with Ruby,
and I  have dabbled with most all of them (shoes being the one
exception). Like yourself, I also found myself using
Ruby a lot at work, and wanted to make the interface for my
applications a bit more user friendly than a CLR interface.
After testing out one GUI or another, I always came back to Tk.
My reason for turning to Tk, was for the very things you are looking
for in a GUI Toolkit;
Tk was very easy for me to pick up. Where one GUI had me stumped, I
found that it took much less time to
figure out how to do the same thing in Tk. If your looking for ease of
learning, Tk is my choice. There are
others that have this or that, or can do this or that, but if your
looking for something quick, Tk is it.

--Jayson- Hide quoted text -

- Show quoted text -

I had similar experiences a few years ago. Tk seemed to work "out of
the box" best. Kind of like how Python comes with Tk as a built-in GUI
builder with the standard install. While Qt has their designer and GTK
has Glade the last time I checked a true drag and drop GUI builder was
a lacking feature in Ruby. Even using the these GUI builders you had
to manually run some utilities and manually wire things together to
some extent.

Of course this was several years ago. I heavily rely upon Ruby for a
host of admin scripting, SQL data extraction/manipulation, and the
like. All CLI, though. The Ruby language is so relatively clean and
intuitive that it's a lot easier to do things using it. But for RAD
design of GUI apps I eventually bit the bullet and went with C# using
Visual Studio 2005. I know there's a lot of Microsoft haters among the
Ruby and Linux community but if there's an quicker and easier way of
doing things I'd love to jump ship. I checked out everything from
Widestudio to all of the aforementioned GUI builders for Ruby. But
nothing compared to RAD development using VS2005. The last Ruby GUI
app I developed was back in 2005 using QtRuby and before that I
developed another one in 2003 using Ruby/Tk. Everything else since
then has been done using VS2005 and C#. The C# language is like tying
your hands behind your back compared to the elegance of Ruby but the
ease of dragging and dropping widgets and having the wiring together
done behind the scenes is worth it :-(

I'd love to get back into what current projects and revisions of GUI
builders are out there for Ruby though!
 
J

John Joyce

I had similar experiences a few years ago. Tk seemed to work "out of
the box" best. Kind of like how Python comes with Tk as a built-in GUI
builder with the standard install. While Qt has their designer and GTK
has Glade the last time I checked a true drag and drop GUI builder was
a lacking feature in Ruby. Even using the these GUI builders you had
to manually run some utilities and manually wire things together to
some extent.

Of course this was several years ago. I heavily rely upon Ruby for a
host of admin scripting, SQL data extraction/manipulation, and the
like. All CLI, though. The Ruby language is so relatively clean and
intuitive that it's a lot easier to do things using it. But for RAD
design of GUI apps I eventually bit the bullet and went with C# using
Visual Studio 2005. I know there's a lot of Microsoft haters among the
Ruby and Linux community but if there's an quicker and easier way of
doing things I'd love to jump ship. I checked out everything from
Widestudio to all of the aforementioned GUI builders for Ruby. But
nothing compared to RAD development using VS2005. The last Ruby GUI
app I developed was back in 2005 using QtRuby and before that I
developed another one in 2003 using Ruby/Tk. Everything else since
then has been done using VS2005 and C#. The C# language is like tying
your hands behind your back compared to the elegance of Ruby but the
ease of dragging and dropping widgets and having the wiring together
done behind the scenes is worth it :-(

I'd love to get back into what current projects and revisions of GUI
builders are out there for Ruby though!
A quicker easier way? Well, that's a good question, initially, I
think of RubyCocoa, but of course it requires a little understanding
of the Cocoa/NextStep/OpenStep world.... however, what I don't know
and am very curious about now is whether or not there is a RubyCocoa
equivalent for GNUOpenStep (or is it GNUStep?) itself!!?
If so, that world has always been a pretty nifty RAD world, and if
RubyCocoa or something like it works with the open source version of
the IDE & GUI builder, then there would be some great tools to knock
things out quickly, and rebuild in C or Objective-C as needed for
performance.

Tk is definitely the easiest to get started with.
Qt is definitely one of the best looking and most native feeling with
the final product.
wx is somwhere in between.
Glade & GTK are not bad, but there's a learning curve that will
require some time.

If you already have the CLI versions of the apps, and you are the one
who wrote them, it should be fairly easy to wrap them with GUIs, but
you might find yourself needing to change some of your code to make
sense with MVC design.
 
M

M. Edward (Ed) Borasky

John said:
A quicker easier way? Well, that's a good question, initially, I think
of RubyCocoa, but of course it requires a little understanding of the
Cocoa/NextStep/OpenStep world.... however, what I don't know and am very
curious about now is whether or not there is a RubyCocoa equivalent for
GNUOpenStep (or is it GNUStep?) itself!!?

* gnustep-libs/rigs
Latest version available: 0.2.2.20050714-r1
Latest version installed: [ Not Installed ]
Unstable version: 0.2.2.20050714-r1
Use Flags (stable): -debug -doc
Size of downloaded files: [no/bad digest]
Homepage: http://www.gnustep.org/experience/RIGS.html
Description: Ruby Interface for GNUstep.
License: LGPL-2.1 GPL-2
 
J

John Joyce

John said:
A quicker easier way? Well, that's a good question, initially, I
think of RubyCocoa, but of course it requires a little
understanding of the Cocoa/NextStep/OpenStep world.... however,
what I don't know and am very curious about now is whether or not
there is a RubyCocoa equivalent for GNUOpenStep (or is it
GNUStep?) itself!!?

* gnustep-libs/rigs
Latest version available: 0.2.2.20050714-r1
Latest version installed: [ Not Installed ]
Unstable version: 0.2.2.20050714-r1
Use Flags (stable): -debug -doc
Size of downloaded files: [no/bad digest]
Homepage: http://www.gnustep.org/experience/RIGS.html
Description: Ruby Interface for GNUstep.
License: LGPL-2.1 GPL-2
Ed you're a saint!
Now I have a reason to put up with the things I don't like about
linux GUIs!
I've long felt the biggest problem with Linux for the desktop
(meaning for everyday people) is that the interfaces stink when
you're used to OS X or even Windows. The decentralized nature of it
is that things are pretty fugly at times and inconsistent.
KDE is nicer looking, but the overall system lacks consistency with
that or Gnome.
I love using the Mac, but I have little love for their business
practices. Microsoft is also, more obviously, hard to love...
I'm now looking forward to playing with gnustep on linux!
 
M

M. Edward (Ed) Borasky

John said:
John said:
A quicker easier way? Well, that's a good question, initially, I
think of RubyCocoa, but of course it requires a little understanding
of the Cocoa/NextStep/OpenStep world.... however, what I don't know
and am very curious about now is whether or not there is a RubyCocoa
equivalent for GNUOpenStep (or is it GNUStep?) itself!!?

* gnustep-libs/rigs
Latest version available: 0.2.2.20050714-r1
Latest version installed: [ Not Installed ]
Unstable version: 0.2.2.20050714-r1
Use Flags (stable): -debug -doc
Size of downloaded files: [no/bad digest]
Homepage: http://www.gnustep.org/experience/RIGS.html
Description: Ruby Interface for GNUstep.
License: LGPL-2.1 GPL-2
Ed you're a saint!
Now I have a reason to put up with the things I don't like about linux
GUIs!
I've long felt the biggest problem with Linux for the desktop (meaning
for everyday people) is that the interfaces stink when you're used to OS
X or even Windows. The decentralized nature of it is that things are
pretty fugly at times and inconsistent.
KDE is nicer looking, but the overall system lacks consistency with that
or Gnome.
I love using the Mac, but I have little love for their business
practices. Microsoft is also, more obviously, hard to love...
I'm now looking forward to playing with gnustep on linux!

Well ... before you canonize me too quickly, see

https://bugs.gentoo.org/show_bug.cgi?id=208643

:)

I've been running WindowMaker as my main desktop for a couple of years
now, but I've never actually attempted to get the GNUStep stuff working.
I'll never go back to KDE or Gnome -- they're just too bloated.
 
J

Jayson Williams

Everything else since then has been done using VS2005 and C#. The C# language is like tying
your hands behind your back compared to the elegance of Ruby but the
ease of dragging and dropping widgets and having the wiring together
done behind the scenes is worth it :-(

I'd love to get back into what current projects and revisions of GUI
builders are out there for Ruby though!

I would agree %100 with your comparison of C# and Ruby. Ruby almost
feels like it has a forgiving, intuitive soul, that understands what
you want it to do. C# on the other hand, feels more like a cold dead
thing, that will obey your command, if you ask nicely, but has no
intuition. Another option down the line for you may be Microsoft's
IronRuby. I sort of cringe at the thought of IronRuby though. Its like
turning Ruby into a Borg,
...resistance is futile... you will assimilate!...
There is another tool by ActiveState called Tk Gui Builder (formally
called SpecTCL). It will create a Tk GUI for Ruby, Perl, and a few
other platforms, and has the RAD feel to it. Unfortunately it is no
longer supported, I recently gave GUI Builder a try, and although it
works well, it made some things more difficult. In the end, I found it
easier to write the code for the GUI myself. It might be worth you
having a look a though. There is also a small Google Group called
"Ruby And The Tk Toolkit", that you might find useful.
 

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

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top