Desktop GUI apps in Ruby

Discussion in 'Ruby' started by Marnen Laibow-Koser, Oct 28, 2009.

  1. Hi folks!

    I'm an experienced Rails developer, but for once this is not a Rails
    question. Rather, I have a desktop app I'd like to create -- we're
    talking something like a spreadsheet-type app, though not quite. Since
    I've been using Ruby more than any other language for the last 2 years,
    and since I love working in Ruby, I'd like to try to write the app in
    Ruby to the extent possible.

    Since this is meant as an end-user productivity application for
    nontechnical users, and since I'd like the barriers to use of this app
    to be as low as possible, I have a couple of requirements:
    * Must run on Linux, Mac OS X, and Windows, preferably with a minimum of
    hassle in the build process
    * Must install with a minimum of extra dependencies -- ideally I'd like
    people to be able to download an executable, unzip it, and run it
    immediately, without needing administrator permissions
    * Should feel as much like a native app as possible -- I don't want
    users to have to deal with an alien UI

    I suppose I could go the RIA route, but I tend to think a native app
    would be better...

    So...does anyone have any suggestions for a good way to do this in Ruby?
    My thought process so far has been about like this -- feel free to
    correct me on anything I got wrong.

    * RubyCocoa: would be my first choice if I didn't care about
    cross-platform compatibility, but I don't think I can expect to run a
    RubyCocoa app on anything but Mac OS and maybe GnuStep
    * Ruby/Tk, Ruby/Qt: I'm under the impression that these tend to need big
    library installations, especially on Windows. Is that correct?
    * wxRuby: Don't know a heck of a lot about it
    * Shoes? Is that still around now that Why has vanished? Is it worth
    using?
    * JRuby/RJB: at the moment, seems like the best choice (as much as I get
    annoyed by working with Java). Is that an accurate assessment? If so,
    what tends to get used for GUI libraryies? Swing/Monkeybars/Profligacy?
    * Any other suggestions?

    I hope I'm not being too idiotic here. I don't know nearly as much as I
    should about the current state of desktop GUI app development in Ruby,
    and I'd like to fix that! Thanks.

    Best,
    --
    Marnen Laibow-Koser
    http://www.marnen.org

    --
    Posted via http://www.ruby-forum.com/.
     
    Marnen Laibow-Koser, Oct 28, 2009
    #1
    1. Advertising

  2. Marnen Laibow-Koser wrote:
    > * Any other suggestions?


    Consider FXRuby, too. It has a nice table widget, and (IIRC) FXRuby
    comes with the ruby windows installer, so there's one less thing to set
    up. (If not, you can just gem install it.)

    --
    vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
     
    Joel VanderWerf, Oct 28, 2009
    #2
    1. Advertising

  3. Joel VanderWerf wrote:
    > Marnen Laibow-Koser wrote:
    >> * Any other suggestions?

    >
    > Consider FXRuby, too.


    I'll check it out; thanks for the suggestion.

    > It has a nice table widget, and (IIRC) FXRuby
    > comes with the ruby windows installer, so there's one less thing to set
    > up.


    I don't care so much about "one less thing to set up" for development as
    I do about not burdening the end user. (And anyway, I'm not using
    Windows.) How is FXRuby on this score?

    > (If not, you can just gem install it.)


    Best,
    --
    Marnen Laibow-Koser
    http://www.marnen.org

    --
    Posted via http://www.ruby-forum.com/.
     
    Marnen Laibow-Koser, Oct 28, 2009
    #3
  4. Marnen Laibow-Koser wrote:
    > I don't care so much about "one less thing to set up" for development as
    > I do about not burdening the end user. (And anyway, I'm not using
    > Windows.) How is FXRuby on this score?


    At worst you would either have an install script that does "gem install
    fxruby" after ruby itself is installed, or you could try to package a
    complete system using something like rubyscript2exe (google
    "rubyscript2exe fxruby"). There's also exerb, which the author of FXRuby
    has used
    (http://lylejohnson.name/blog/2008/12/30/building-standalone-fxruby-applications-with-exerb/).

    --
    vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
     
    Joel VanderWerf, Oct 28, 2009
    #4
  5. Marnen Laibow-Koser

    James Britt Guest

    Marnen Laibow-Koser wrote:
    > * JRuby/RJB: at the moment, seems like the best choice (as much as I get
    > annoyed by working with Java). Is that an accurate assessment? If so,
    > what tends to get used for GUI libraryies? Swing/Monkeybars/Profligacy?


    This is your best route, offering fast, robust cross-platform
    development with solid GUI components.

    Use Monkeybars (or, if adventurous, Jimpanzee) with Rawr (for
    beautifully simple application packaging).


    BTW, using those tools, the amount of Java you'll need to write is
    approximately zero.

    --
    James Britt

    www.jamesbritt.com - Playing with Better Toys
    www.ruby-doc.org - Ruby Help & Documentation
    www.rubystuff.com - The Ruby Store for Ruby Stuff
    www.neurogami.com - Smart application development
     
    James Britt, Oct 28, 2009
    #5
  6. On Wed, Oct 28, 2009 at 9:03 AM, Marnen Laibow-Koser <> wr=
    ote:
    >
    > * RubyCocoa: would be my first choice if I didn't care about
    > cross-platform compatibility, but I don't think I can expect to run a
    > RubyCocoa app on anything but Mac OS and maybe GnuStep
    > * Ruby/Tk, Ruby/Qt: I'm under the impression that these tend to need big
    > library installations, especially on Windows. =A0Is that correct?
    > * wxRuby: Don't know a heck of a lot about it
    > * Shoes? =A0Is that still around now that Why has vanished? =A0Is it wort=

    h
    > using?
    > * JRuby/RJB: at the moment, seems like the best choice (as much as I get
    > annoyed by working with Java). =A0Is that an accurate assessment? =A0If s=

    o,
    > what tends to get used for GUI libraryies? =A0Swing/Monkeybars/Profligacy=

    ?
    > * Any other suggestions?


    * Bowline http://leadthinking.com/191-bowline-a-ruby-gui-framework is
    an option too, if you want another point on the spectrum between RIA
    and native.
    * JRuby/Glimmer uses SWT, so you'll get your native widgets.
    * Ruby/QT4 would be my first choice if I knew I was just going to be
    deploying on linux, but when I asked in a recent thread, no one had
    any experience packaging and deploying it on windows. If you do go
    this route and get a windows executable up and running, I'd love to
    hear from you.

    martin
     
    Martin DeMello, Oct 28, 2009
    #6
  7. James Britt wrote:
    > Marnen Laibow-Koser wrote:
    >> * JRuby/RJB: at the moment, seems like the best choice (as much as I get
    >> annoyed by working with Java). Is that an accurate assessment? If so,
    >> what tends to get used for GUI libraryies? Swing/Monkeybars/Profligacy?

    >
    > This is your best route, offering fast, robust cross-platform
    > development with solid GUI components.


    That was my impression.

    >
    > Use Monkeybars (or, if adventurous, Jimpanzee) with Rawr (for
    > beautifully simple application packaging).


    Of course, you *would* say that. :D

    (Actually, seeing your name on Monkeybars was one of the things that
    made me think it was worth serious consideration.)

    >
    >
    > BTW, using those tools, the amount of Java you'll need to write is
    > approximately zero.


    Great! As I said, I *can* write Java, but the language annoys me.

    >
    > --
    > James Britt
    >
    > www.jamesbritt.com - Playing with Better Toys
    > www.ruby-doc.org - Ruby Help & Documentation
    > www.rubystuff.com - The Ruby Store for Ruby Stuff
    > www.neurogami.com - Smart application development


    Best,
    --
    Marnen Laibow-Koser
    http://www.marnen.org

    --
    Posted via http://www.ruby-forum.com/.
     
    Marnen Laibow-Koser, Oct 28, 2009
    #7
  8. Martin DeMello wrote:
    > On Wed, Oct 28, 2009 at 9:03 AM, Marnen Laibow-Koser <>
    > wrote:
    >> annoyed by working with Java). �Is that an accurate assessment? �If so,
    >> what tends to get used for GUI libraryies? �Swing/Monkeybars/Profligacy?
    >> * Any other suggestions?

    >
    > * Bowline http://leadthinking.com/191-bowline-a-ruby-gui-framework is
    > an option too, if you want another point on the spectrum between RIA
    > and native.


    Very interesting. I think for this particular project, I don't want to
    use HTML and JS for the UI, but I can imagine other projects that
    Bowline would be great for!

    > * JRuby/Glimmer uses SWT, so you'll get your native widgets.


    Thanks. I never heard of Glimmer; I'll look it up.

    > * Ruby/QT4 would be my first choice if I knew I was just going to be
    > deploying on linux, but when I asked in a recent thread, no one had
    > any experience packaging and deploying it on windows. If you do go
    > this route and get a windows executable up and running, I'd love to
    > hear from you.
    >


    Oy. Not this project, then. Although I don't use Windows myself, the
    nature of what I'm doing is such that it really has to run everywhere it
    can.

    > martin


    Best,
    --
    Marnen Laibow-Koser
    http://www.marnen.org

    --
    Posted via http://www.ruby-forum.com/.
     
    Marnen Laibow-Koser, Oct 28, 2009
    #8
  9. On Wed, Oct 28, 2009 at 5:58 PM, Marnen Laibow-Koser <> wr=
    ote:
    > Martin DeMello wrote:
    >
    >> * Ruby/QT4 would be my first choice if I knew I was just going to be
    >> deploying on linux, but when I asked in a recent thread, no one had
    >> any experience packaging and deploying it on windows. If you do go
    >> this route and get a windows executable up and running, I'd love to
    >> hear from you.

    >
    > Oy. =A0Not this project, then. =A0Although I don't use Windows myself, th=

    e
    > nature of what I'm doing is such that it really has to run everywhere it
    > can.


    I don't wish to spread FUD, so please note that I'm *not* saying that
    QtRuby doesn't work on windows, just that I do not personally have
    access to a windows machine to test it out, and have not heard from
    anyone who has packaged it.

    martin
     
    Martin DeMello, Oct 28, 2009
    #9
  10. Martin DeMello wrote:
    > On Wed, Oct 28, 2009 at 5:58 PM, Marnen Laibow-Koser <>
    > wrote:
    >> can.

    > I don't wish to spread FUD, so please note that I'm *not* saying that
    > QtRuby doesn't work on windows, just that I do not personally have
    > access to a windows machine to test it out, and have not heard from
    > anyone who has packaged it.


    OK.

    >
    > martin

    Best,
    --
    Marnen Laibow-Koser
    http://www.marnen.org

    --
    Posted via http://www.ruby-forum.com/.
     
    Marnen Laibow-Koser, Oct 28, 2009
    #10
  11. James Britt wrote:
    > Marnen Laibow-Koser wrote:
    >> * JRuby/RJB: at the moment, seems like the best choice (as much as I get
    >> annoyed by working with Java). Is that an accurate assessment? If so,
    >> what tends to get used for GUI libraryies? Swing/Monkeybars/Profligacy?

    >
    > This is your best route, offering fast, robust cross-platform
    > development with solid GUI components.
    >
    > Use Monkeybars (or, if adventurous, Jimpanzee) with Rawr (for
    > beautifully simple application packaging).

    [...]

    At this point, it looks like I'll probably use Monkeybars and JRuby for
    this project. But...what about wxRuby and Shoes? I understand Shoes
    was very popular for a while at least, and I like wxRuby's lack of
    reliance on JVMs, yet I notice no one recommended these. Are there
    problems that I'm not aware of, or is that simply coincidental?

    (Yes, I realize I may just have to play around with these all and find
    out. I'm just trying to get off the ground as quickly as possible.)

    Best,
    --
    Marnen Laibow-Koser
    http://www.marnen.org

    --
    Posted via http://www.ruby-forum.com/.
     
    Marnen Laibow-Koser, Oct 28, 2009
    #11
  12. Marnen Laibow-Koser wrote:
    [...]
    > At this point, it looks like I'll probably use Monkeybars and JRuby for
    > this project. But...what about wxRuby and Shoes? I understand Shoes
    > was very popular for a while at least, and I like wxRuby's lack of
    > reliance on JVMs, yet I notice no one recommended these. Are there
    > problems that I'm not aware of, or is that simply coincidental?
    >


    Never mind. I just realized that these will not be feasible for the
    current project because they will require a Ruby interpreter, and I
    don't want to even expect that my end-users will have *that*! (I'm
    targeting, among others, educational and corporate users who don't have
    admin rights and wouldn't know what to do with them if they had.)
    Monkeybars it is, then.

    > (Yes, I realize I may just have to play around with these all and find
    > out. I'm just trying to get off the ground as quickly as possible.)
    >
    > Best,
    > --
    > Marnen Laibow-Koser
    > http://www.marnen.org
    >


    --
    Posted via http://www.ruby-forum.com/.
     
    Marnen Laibow-Koser, Oct 28, 2009
    #12
  13. Marnen Laibow-Koser

    James Britt Guest

    Marnen Laibow-Koser wrote:
    > Never mind. I just realized that these will not be feasible for the
    > current project because they will require a Ruby interpreter, and I
    > don't want to even expect that my end-users will have *that*! (I'm
    > targeting, among others, educational and corporate users who don't have
    > admin rights and wouldn't know what to do with them if they had.)
    > Monkeybars it is, then.



    Users will still have to have Java installed to use a JRuby app.



    --
    James Britt

    www.jamesbritt.com - Playing with Better Toys
    www.ruby-doc.org - Ruby Help & Documentation
    www.rubystuff.com - The Ruby Store for Ruby Stuff
    www.neurogami.com - Smart application development
     
    James Britt, Oct 29, 2009
    #13
  14. James Britt wrote:
    [...]
    > Users will still have to have Java installed to use a JRuby app.


    I know, but I think I can rely on that. Have you seen a computer
    without a JVM lately?

    >
    >
    >
    > --
    > James Britt
    >
    > www.jamesbritt.com - Playing with Better Toys
    > www.ruby-doc.org - Ruby Help & Documentation
    > www.rubystuff.com - The Ruby Store for Ruby Stuff
    > www.neurogami.com - Smart application development


    Best,
    --
    Marnen Laibow-Koser
    http://www.marnen.org

    --
    Posted via http://www.ruby-forum.com/.
     
    Marnen Laibow-Koser, Oct 29, 2009
    #14
  15. Marnen Laibow-Koser

    Alex Fenton Guest

    Marnen Laibow-Koser wrote:

    > Since this is meant as an end-user productivity application for
    > nontechnical users, and since I'd like the barriers to use of this app
    > to be as low as possible, I have a couple of requirements:
    > * Must run on Linux, Mac OS X, and Windows, preferably with a minimum of
    > hassle in the build process
    > * Must install with a minimum of extra dependencies -- ideally I'd like
    > people to be able to download an executable, unzip it, and run it
    > immediately, without needing administrator permissions
    > * Should feel as much like a native app as possible -- I don't want
    > users to have to deal with an alien UI


    You'll have realised that there are a number of GUI packages which
    potentially meet your requirements, though none is perfect; be skeptical
    of anyone that says the particular one they're cheering is, without
    reservation, 'the best' or 'the only'.

    As an alternative to single posts which tell you which GUI package that
    author happens to like, you may find this 2008 survey of around 400 ruby
    programmers specifically on GUI programming in Ruby of interest:

    http://www.pressure.to/ruby_gui_survey/

    I wouldn't say that being most used or most preferred is an indicator of
    which is best; lack of knowledge and inertia play a part. But you might
    assume that the most-used cross-platform GUI packages (Ruby-GNOME2,
    Shoes, wxRuby) are used for a reason, and start by evaluating some of them.

    Bera in mind that Swing/Monkeybars may be disadvantaged in the poll by
    being tied to a less-used interpreter. But Swing/Monkeybars gets a good
    deal of regular promotion to compensate.

    cheers
    alex
     
    Alex Fenton, Oct 29, 2009
    #15
  16. Alex Fenton wrote:
    [...]
    > You'll have realised that there are a number of GUI packages which
    > potentially meet your requirements, though none is perfect; be skeptical
    > of anyone that says the particular one they're cheering is, without
    > reservation, 'the best' or 'the only'.


    Oh, of course. I just wanted to get a sense of what was being used and
    how people felt about it.

    >
    > As an alternative to single posts which tell you which GUI package that
    > author happens to like, you may find this 2008 survey of around 400 ruby
    > programmers specifically on GUI programming in Ruby of interest:
    >
    > http://www.pressure.to/ruby_gui_survey/


    Yes, I found that. It's fascinating and useful.

    >
    > I wouldn't say that being most used or most preferred is an indicator of
    > which is best; lack of knowledge and inertia play a part. But you might
    > assume that the most-used cross-platform GUI packages (Ruby-GNOME2,
    > Shoes, wxRuby) are used for a reason, and start by evaluating some of
    > them.



    I did check them out. None seems right for this project, but I will
    absolutely keep Shoes and wx in mind for future work.

    >
    > Bera in mind that Swing/Monkeybars may be disadvantaged in the poll by
    > being tied to a less-used interpreter. But Swing/Monkeybars gets a good
    > deal of regular promotion to compensate.


    In this case, I think being tied to JRuby may actually be an advantage.
    It's the only way I can see to have a cross-platform, easily
    distributable Ruby application. And it seems like both wxRuby and Shoes
    depend too much on native extensions to work with JRuby, and depend too
    much on MRI to distribute to general users. If I'm wrong on either of
    those, please correct me.

    >
    > cheers
    > alex


    Best,
    --
    Marnen Laibow-Koser
    http://www.marnen.org

    --
    Posted via http://www.ruby-forum.com/.
     
    Marnen Laibow-Koser, Oct 29, 2009
    #16
  17. Marnen Laibow-Koser

    Alex Fenton Guest


    > In this case, I think being tied to JRuby may actually be an advantage.
    > It's the only way I can see to have a cross-platform, easily
    > distributable Ruby application. And it seems like both wxRuby and Shoes
    > depend too much on native extensions to work with JRuby, and depend too
    > much on MRI to distribute to general users.


    Yes, I think you're right here. It's possible to create fully native
    packages using wxRuby etc, but there's no single cross-platform tool
    like RAWR. You have to use a mix of tools, eg Ocra for Windows, Platypus
    for OS X. RAWR is a credit to the developers.

    a
     
    Alex Fenton, Oct 29, 2009
    #17
  18. Marnen Laibow-Koser

    Will Parsons Guest

    Marnen Laibow-Koser wrote:
    > James Britt wrote:
    > [...]
    >> Users will still have to have Java installed to use a JRuby app.

    >
    > I know, but I think I can rely on that. Have you seen a computer
    > without a JVM lately?


    Yes. I'm working on one right now. If you want maximum cross-platform,
    you shouldn't rely on having Java.

    --
    Will
     
    Will Parsons, Oct 29, 2009
    #18
  19. Will Parsons wrote:
    > Marnen Laibow-Koser wrote:
    >> James Britt wrote:
    >> [...]
    >>> Users will still have to have Java installed to use a JRuby app.

    >>
    >> I know, but I think I can rely on that. Have you seen a computer
    >> without a JVM lately?

    >
    > Yes. I'm working on one right now.


    Really? Under what circumstances? Even "can't-change-anything"
    corporate deployments tend to have a usable JVM.

    > If you want maximum cross-platform,
    > you shouldn't rely on having Java.


    Got a better idea, short of dropping Ruby for this project? Native
    packaging on wx?

    Best,
    --
    Marnen Laibow-Koser
    http://www.marnen.org

    --
    Posted via http://www.ruby-forum.com/.
     
    Marnen Laibow-Koser, Oct 29, 2009
    #19
  20. Marnen Laibow-Koser

    gregarican Guest

    On Oct 29, 12:13 pm, Will Parsons <> wrote:
    > Marnen Laibow-Koser wrote:
    > > James Britt wrote:
    > > [...]
    > >> Users will still have to have Java installed to use a JRuby app.

    >
    > > I know, but I think I can rely on that.  Have you seen a computer
    > > without a JVM lately?

    >
    > Yes.  I'm working on one right now.  If you want maximum cross-platform,
    > you shouldn't rely on having Java.
    >
    > --
    > Will


    Just hopping on this thread after reading through the various takes on
    things. For me, I love using Ruby for quick and dirty scripting. The
    language itself is compact, intuitive, and doesn't clutter up my
    coding needlessly. But one of the big frustrations I've experienced in
    the past is trying to come up with a GUI app using it. This started
    back about 5 years ago now, when I was looking out there at the
    various Ruby GUI toolkits. Trying them out, none of them really seemed
    to reach out and grab me. Took the wind out of my sails for sure.

    When I think of GUI programming and using an IDE for such I think of
    drag and drop widgets, automated event bindings, etc. But after
    banging my head against my desk I had to resort to my tried and true
    Visual Studio install using Visual C#. The language itself isn't
    nearly as clean and elegant, but the tight GUI development environment
    is a hands-down favorite. Just wish that Ruby could have the same
    luxury. Ruby in Steel is something that's close, and I've looked at
    that in the past. But then again the GUI toolkit components aren't
    there, and that's the driving force behind why I would use Visual
    Studio in the first place :-/

    Since Ruby took a good amount of its inspiration and foundation in
    Smalltalk, I'd look at that as an example where a dynamic programming
    language can have a tightly integrated GUI development environment and
    pull it off well. It is possible, and to me that is one of the main
    things holding Ruby back from "the big time" in terms of standing toe
    to toe against Java, C#, and other languages.

    My US $0.02 at least :)
     
    gregarican, Oct 29, 2009
    #20
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. TC
    Replies:
    4
    Views:
    686
    JohnnyAppleseed
    Feb 7, 2005
  2. Replies:
    11
    Views:
    513
    Scott Weeks
    Feb 18, 2006
  3. Kevin Walzer

    Major desktop GUI apps in Ruby

    Kevin Walzer, Sep 11, 2011, in forum: Ruby
    Replies:
    1
    Views:
    1,999
    Michael Brooks
    Sep 11, 2011
  4. Mark Summerfield
    Replies:
    0
    Views:
    232
    Mark Summerfield
    Jun 3, 2012
  5. iMath
    Replies:
    7
    Views:
    2,107
    iMath
    Nov 10, 2013
Loading...

Share This Page