Ruby + GUI?

Hi-

What would you all say is the best option for creating GUIs with Ruby?

Thanks for your inputs.

shoes

I like Shoes a lot if you need something simple.

If you need something better, then I think perhaps fxRuby (if you
don’t need a native look) or wxRuby (if you do) are your best options.
Ruby/Tk is okay if you like Tk and all, but I personally prefer the
previous kits.

–Jeremy

On Nov 29, 2007 10:30 PM, pete [email protected] wrote:

Hi-

What would you all say is the best option for creating GUIs with Ruby?

Thanks for your inputs.


http://www.jeremymcanally.com/

My books:
Ruby in Practice

My free Ruby e-book

My blogs:

http://www.rubyinpractice.com/

What would you all say is the best option for creating GUIs with Ruby?

Big question is: Which OS, and do you want to run it on any other?

I’m having fun currently building a framework around Swing using JRuby
(yep, the world needs another swing framework :), but then I quite
like Swing…
currently I can create a gui like this (based_on tells it to bind to
corresponding fields a Personnel object.)

class PersonnelView < EntityView
based_on :personnel

heading “Edit Personnel”
label :fullname,
:when_blank => ‘[unknown]’,
:desc => ‘Full name’
text :firstname
text :surname
drop_down :security_status,
:select_from => [‘None’, ‘Confidential’, ‘Secret’, ‘Top
Secret’]
check_box :confidentiality_agreement_signed,
:desc => ‘agreement signed?’
drop_down :contract_role,
:select_from => [‘PSP’, ‘Contractor’]
memo :comments,
:height => 6
end

Cheers,
Dave

On Nov 30, 5:02 am, Sharon P. [email protected] wrote:

class PersonnelView < EntityView
Secret’]
check_box :confidentiality_agreement_signed,
:desc => ‘agreement signed?’
drop_down :contract_role,
:select_from => [‘PSP’, ‘Contractor’]
memo :comments,
:height => 6
end

Cheers,
Dave

Great! Thanks everyone. All I really wanted was a good starting
place, it seems there’s a lot of options out there and I’m pretty
limited on time to get this project done.

This project in particular will be on Windows (sorry), but I’m also a
Linux user and most of the development I do is in the Linux
environment. I’ll take alook at all of these and see what best fits
for my app.

Thanks again!

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

pete wrote:
| Hi-
|
| What would you all say is the best option for creating GUIs with Ruby?
|
| Thanks for your inputs.
|

Hi pete, Ruby + GNOME2 [1], for me, is the best way for create
GUI/standalone applications.

[1] http://ruby-gnome2.sourceforge.jp/

I already tested this, and approved :smiley: I like more this then Java.


http://www.goes.eti.br
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHT/KEDo8Z2PVlFN8RArdCAJ0Qsux/dKacb0OeteQ0cKBvL+eOtgCfdDLE
jwg87x1VPJ+MVgrwltzkhvM=
=d8bC
-----END PGP SIGNATURE-----

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

pete wrote:
| On Nov 30, 5:02 am, Sharon P. [email protected] wrote:
|>> What would you all say is the best option for creating GUIs with Ruby?
|> Big question is: Which OS, and do you want to run it on any other?
|>
|> I’m having fun currently building a framework around Swing using JRuby
|> (yep, the world needs another swing framework :), but then I quite
|> like Swing…
|> currently I can create a gui like this (based_on tells it to bind to
|> corresponding fields a Personnel object.)
|>
|> class PersonnelView < EntityView
|> based_on :personnel
|>
|> heading “Edit Personnel”
|> label :fullname,
|> :when_blank => ‘[unknown]’,
|> :desc => ‘Full name’
|> text :firstname
|> text :surname
|> drop_down :security_status,
|> :select_from => [‘None’, ‘Confidential’, ‘Secret’, ‘Top
|> Secret’]
|> check_box :confidentiality_agreement_signed,
|> :desc => ‘agreement signed?’
|> drop_down :contract_role,
|> :select_from => [‘PSP’, ‘Contractor’]
|> memo :comments,
|> :height => 6
|> end
|>
|> Cheers,
|> Dave
|
| Great! Thanks everyone. All I really wanted was a good starting
| place, it seems there’s a lot of options out there and I’m pretty
| limited on time to get this project done.
|
| This project in particular will be on Windows (sorry), but I’m also a
| Linux user and most of the development I do is in the Linux
| environment. I’ll take alook at all of these and see what best fits
| for my app.

Pete… If you install GTK+ and Ruby on Windows, will be possible run
your application on windows too.

|
| Thanks again!
|

Cheers,


http://www.goes.eti.br
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHUCgHDo8Z2PVlFN8RAorgAJwLAKqAZY0NdQYNzfqHLYrutY2o8ACbBIDw
28Q6dOc6VbPB4+m8bHZ32mQ=
=G2TQ
-----END PGP SIGNATURE-----

PSst. this question is asked probably once a week :slight_smile: a quick search of
the archives will give you lots and lots of information, links,
personal opinions etc.

…mind you I’ve been guilty too of asking such repeated and
repeatable questions…

–Kyle

pete wrote:

This project in particular will be on Windows

If you are using Visual Studio, you could use our free .NET /Ruby
Connector…

http://www.sapphiresteel.com/SapphireSteel-Downloads

Visual Rails Tools will have to wait until Ruby In Steel 1.2 early in
2008 while fully integrated drag+drop event-driven form design probably
won’t be released until IronRuby is close to completion - though we do
have demos of our beta form designer…

http://www.sapphiresteel.com/IronRuby-Visual-Designer
http://www.sapphiresteel.com/IronRuby-Visual-Form-Designer

best wishes
Huw

SapphireSteel Software
http://www.sapphiresteel.com

Sharon P. wrote:

class PersonnelView < EntityView
Secret’]
check_box :confidentiality_agreement_signed,
:desc => ‘agreement signed?’
drop_down :contract_role,
:select_from => [‘PSP’, ‘Contractor’]
memo :comments,
:height => 6
end

Looks slick.

To pete: Lately it seems like lots of folks are settling on JRuby+Swing
for cross-platform GUI stuff in Ruby. One binary basically runs anywhere
without recompile or modification. That would be my recommendation.

  • Charlie

Charles Oliver N. wrote:

To pete: Lately it seems like lots of folks are settling on JRuby+Swing
for cross-platform GUI stuff in Ruby. One binary basically runs anywhere
without recompile or modification. That would be my recommendation.

Note: I didn’t illustrate one other important point: you don’t even need
to install JRuby on the host machines. Just ship your app plus JRuby in
a single file and it will run wherever Java lives.

  • Charlie

“What would you all say is the best option for creating GUIs with Ruby?”

I would recommend ruby-gnome/gtk for one sole reason - it has a wiki.
A nice, cute hiki wiki. None ruby-toolkit I am aware of has such a big
wiki.

In fact, I believe, the other ruby-GUI bindings DO NOT EVEN HAVE ANY
WIKI!

You can prove me wrong though, but for now I stand by this bold claim.
:slight_smile:

(PS: Though, the ruby-gnome wiki is quite good, there are a few missing
parts, especially about gnomecanvas and cairo, or gnome-druid etc…
bindings. But since I also use that, I can do some research and add
lacking docu slowly too. One advantage of a central wiki … people can
chime in and improve it over time)