Ruby has a Face that it wears on its feet

  • Thread starter Jayson Williams
  • Start date
J

Jayson Williams

In my opinion, Ruby's official face should be Shoes. Shoes gives Ruby
a face by adding a simple GUI toolkit. I have been an advocate for Tk
for as long as I have been using Ruby, because of its ease at picking
up for new users. But Shoes makes Tk look like brain surgery. Shoes is
probably more like a baby face for Ruby. Better suited for small
applications that don't require an overly complex GUI. If your looking
at adding a simple face to your Ruby applications, have a look at
Shoes.
Oooh.. and Shoes allows you to build standalone executable apps too.
Have a look and let me know what you think.

~Jay
 
M

Martin DeMello

In my opinion, Ruby's official face should be Shoes. Shoes gives Ruby
a face by adding a simple GUI toolkit. I have been an advocate for Tk
for as long as I have been using Ruby, because of its ease at picking
up for new users. But Shoes makes Tk look like brain surgery. Shoes is
probably more like a baby face for Ruby. Better suited for small
applications that don't require an overly complex GUI. If your looking
at adding a simple face to your Ruby applications, have a look at
Shoes.
Oooh.. and Shoes allows you to build standalone executable apps too.
Have a look and let me know what you think.

Much as I love Shoes, there is a severe problem with adding it to the
official ruby distro - it is not a ruby library, but a self-contained
executable complete with forked ruby interpreter. You need to run
programs with `shoes <progname>`, rather than `ruby <progname>`

martin
 
J

Jayson Williams

How about a melding of the two?

Much as I love Shoes, there is a severe problem with adding it to the
official ruby distro - it is not a ruby library, but a self-contained
executable complete with forked ruby interpreter. You need to run
programs with `shoes <progname>`, rather than `ruby <progname>`

martin
 
K

Kyle Hunter

Jayson said:
How about a melding of the two?

Giving shoes an official place in the Ruby language hierarchy would open
up a new world for desktop application programming for Ruby.
 
R

Ron Fox

This is how Tk started in Tcl. First it was a 'special interpreter'
wish. Now it's a package that any Tcl script can include with
package require Tk

That could be a model to follow.
RF
 
D

Di Da

In my opinion, Ruby's official face should be Shoes.

tk is available on many plattforms and has comparable low requirements.
I would assume it's a standard library because it's readily available
not because it's beautiful or whatever.

The shoes' source files come with a simple Makefile, one configuration
option, and it doesn't compile eg on cygwin. It might be a fascinating
library but IMHO there is still some way to go before we can call it the
"official face".
 
L

Lloyd Linklater

Kyle said:
Giving shoes an official place in the Ruby language hierarchy would open
up a new world for desktop application programming for Ruby.

That would not be appropriate. Ruby is a language. Making a specific
gui library part of the language would be mixing things that should not
be mixed *on that level*.

That said, I *would* like a development environment that includes
standardized gui libraries, and shoes seems fine.
 
M

Michael Fellinger

That would not be appropriate. Ruby is a language. Making a specific
gui library part of the language would be mixing things that should not
be mixed *on that level*.

Ever looked into rubys source, it ships with tk bindings.
 
J

Jayson Williams

Ever looked into rubys source, it ships with tk bindings.

I have used TK for as long as I have been using Ruby. Tk works well,
and it was fairly easy to pick up. But wouldn't it be great if Shoes
was packaged with ruby in the same way. Instead of having to call
Shoes apps with shoes..., I could call either a straight Ruby script
or Ruby/Shoes app, both using ruby...

We currently have one language that does all Ruby with no direct GUI,
and another app that does all Ruby GUI with no non GUI support. That
is a big duplication of effort. They both have Ruby in common. Ruby
needs a GUI, and Shoes needs Ruby. Merging them seems like a very
logical step to me.

~Jay
 
A

Alex Fenton

Kyle said:
Giving shoes an official place in the Ruby language hierarchy would open
up a new world for desktop application programming for Ruby.


As others have pointed out, so do JRuby+Swing, Ruby QT, wxRuby,
Ruby-GNOME2, FxRuby, Ruby Cocoa etc. They all have strengths and
shortcomings.

I admire Shoes but it's not the best choice for much desktop application
programming. It's not going to "open up a new world". I sometimes wonder
how much experience the voluble adherents of Shoes have in actually
developing and delivering end-user GUI applications that do something
boring and useful.

As others have commented elsewhere, naming Shoes a 'toy' is not a slur;
play is important in life. It's an influential experiment. But many,
probably most GUI apps need widgets and features that don't appear to be
available in Shoes [1]. Have a look at the applications you regularly
use and see how many don't use any of the following GUI elements:

* hierarchy / tree controls
* different kinds of lists and tables, including virtual ones
* printing facilities
* file dialogs
* progress and slider widgets
* resizeable panes
* styled text editing
* window and pop-up menus
* support for disabled accessibility
* integrated help
* etc

Shoes API is nice, but that's partly a result of it concentrating on a
limited problem domain. The heavyweight toolkits with their clumsy APIs
inherited from C-languages are both trying to do more, and do something
different - desktop application programming.

On bundling with ruby core, I'm with those that think no GUI should be
part of the standard library - and definitely not Tk. It would impel
those who want to do GUI programming with Ruby to do a little research
and make an informed choice. Some of the time that would be Shoes, other
times not. I think it would rarely be Tk. It would also encourage
toolkit developers to focus on ease of installation and providing
resources for learning.

A year or two ago we'd got sick on this list of a recurring "which GUI"
thread. Since then, new options have emerged (MacRuby, JRuby+Swing,
Shoes) and existing libraries have develoepd. Rather than restarting
that thread - which tends to descend into "I use XXX and I think it's
nice" - I wonder if it would be interesting to do a "state of Ruby GUI"
online survey?

alex


[1] http://help.shoooes.net/Element.html
 
M

Michael W. Ryder

Lloyd said:
That would not be appropriate. Ruby is a language. Making a specific
gui library part of the language would be mixing things that should not
be mixed *on that level*.

Business Basic has built in screen and file handling, and is over 25
years old. I like not having to include libraries to handle the screen
and files. The other advantage is that the same program runs under AIX
and DOS/Windows with no changes. I can even move the files between the
two without any conversion.
Maybe what is needed is a subversion of Ruby, much like other languages
have split from a core, that includes things like the screen and file
handling.
 
J

Joshua Ballanco

Lloyd said:
That would not be appropriate. Ruby is a language. Making a specific
gui library part of the language would be mixing things that should not
be mixed *on that level*.

That said, I *would* like a development environment that includes
standardized gui libraries, and shoes seems fine.
This is sort of reminiscent of a discussion I had with some of the
MacRuby team a while back. (BTW, if you like Shoes, also check out
HotCocoa!) Essentially, what it comes down to is that a complete GUI
toolkit is probably not appropriate for a language, and only marginally
appropriate for a standard library. One problem with Shoes is the list
of dependencies would significantly increase the size of a default Ruby
installation (were it to be included standard).

Probably what would be worth looking into is something like a standard
DSL for GUI programming. This could be an abstraction above the GUI
libraries (which could then be pluggable). So, for example, you could
have a Ruby app which used a Swing plug in for JRuby, a HotCocoa plug in
for MacRuby, Tk or wxWidgets or whatnot for Linux, and some sort of .Net
back end for IronRuby.

The difficulty is that each GUI environment has its own unique concepts
and paradigms. If we were to restrict ourselves to only that which is
common between all, we'd end up with AWT...

-Josh
 
J

James Britt

Farrel said:
And so does Glade+Ruby/GNOME2

One difference is that Java comes with Swing built-in, so if you can run
a JRuby app you can run a JRuby+Swing app and not have to install
anything else.

So, from a JRuby perspective, it has a built-in GUI toolkit that allows
for GUI apps that Just Work out of the box.


That said, I caught the evening talk by Dave Thomas here at
RubyConf08, and he put forth several ideas on plausible forks of Ruby.
(If you weren't here, watch for the ConFreaks video; I can't do justice
to why he was advocating forking Ruby. Well worth watching when it
becomes available.)

An interesting Ruby fork would be one devoted to GUI development. Pick
a widget set, bundle it in, maybe add some stuff to make things more
intuitive, and have Guiby.



--
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
 

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,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top