Best Tool Integrated Jruby GUI framework

Hi, been doing Jruby for server side purposes however I now have a
project which entails a desktop GUI and mobile app. I do like Apache
Flex but want to keep especially client side domain logic in Ruby and
thus I’m thinking about evaluating Jruby for GUI building. I’ve read the
books but i would appreciate if somebody would be kind enough to remind
me which of the Jruby guy frameworks is most amenable to using Gui
design tools and in particular the GUI design tool within Jetbrains
IDEA.

thanks

Charles

Charles -

Idea’s GUI builder is for Swing. Here’s the page:

I’m pretty sure that the vast majorityof Java GUI support tools will be
Swing-specific.

I wasn’t clear, you’re not lookingfor both the desktop GUI and the
mobile apps to use the same library, right?

  • Keith

Keith R. Bennett

Keith:

Hi, well I figured so but my point is that instead of following the
Swing API I was hoping to a perhaps more productive frameworks e.g.
MonkeyBars but I believe that those frameworks require you to layout by
hand. So if I do want to use a GUI design tool it seems I just have to
follow the Swing API. As you point out thanks to Jruby that api does not
have to be as painful as it would in raw Java. Furthermore,Swing is a
mature and maintained framework which Is important as well.

I would prefer to use Apache Flex for building of thin GUIs but I do
need client side business logic which I would want to maintain in Ruby.
Thus unless I find a convenient bridge between Flex and Jruby locally it
seems I need to revisit the idea of doing Swing for GUI building.

Charles

Charles M. wrote:

Keith:

Hi, well I figured so but my point is that instead of following the
Swing API I was hoping to a perhaps more productive frameworks e.g.
MonkeyBars but I believe that those frameworks require you to layout by
hand.

No. Monkeybars was designed to play especially well with compiled Java
Swing code, such as what you can generate using the Netbeans WYSIWYG
editor. I’ve help build quite complex desktop programs with Monkeybars
and making the UI with by-hand Swing code would have been torture.

So long as you follow some basic naming conventions (because of some
dynamic lookups) you are good to go.

You can do the GUI part by hand for Monkeybars if you want.

Sometimes it is is easier to just define the UI using basic Swing and,
say, the MiG layout jar. That was the motivation behind Swingset-NG: to
offer a simple API for basic UI to avoid having to pop open Netbeans or
something just to create an “About” form or something.

The choice is yours either way. Larger programs benefit from using a
GUI editor to generate the Java or .class files to be used with the
Monkeybars controller and model files.

James B.

Monkeybars project admin

Neurogami - Avant-garage Research & Development

[email protected]

Charles M. wrote:

Excellent ! I had read the section on MonkeyBars from one of the Jruby Pragmatic
Bookshelf books a while back but now this is coming up to the front burner. I use
IDEA so would prefer to use their GUI builder. I siuspect that MonkeyBars doesn’t
have any bias for Matisse. I’ll re -read the MonkeyBars section and I guess go
back on to the site to look for examples where the GUI builder output i.e. Swing
compiled output is used.

If you have a direct link or further sources of example code that I could look
at , it would be appreciated.

Try this: https://github.com/Neurogami/JotBot

JotBot used to be a commercial product, but there was wasn’t enough of a
paying audience (or I wasn’t a good enough salesman) so I open-sourced
it.

Make sure you get the Monkeybars gem from gems.neurogami.com, or grab
the source from GitHub.

(Same goes for Rawr and Swingset-NG)

James B.

Neurogami - Avant-garage Research & Development

[email protected]

Excellent ! I had read the section on MonkeyBars from one of the Jruby
Pragmatic Bookshelf books a while back but now this is coming up to the
front burner. I use IDEA so would prefer to use their GUI builder. I
siuspect that MonkeyBars doesn’t have any bias for Matisse. I’ll re
-read the MonkeyBars section and I guess go back on to the site to look
for examples where the GUI builder output i.e. Swing compiled output is
used.

If you have a direct link or further sources of example code that I
could look at , it would be appreciated.

thanks

Charles

thanks

Charles

Just use Glimmer in JRuby: GitHub - AndyObtiva/glimmer: DSL Framework consisting of a DSL Engine and a Data-Binding Library used in Glimmer DSL for SWT (JRuby Desktop Development GUI Framework), Glimmer DSL for Opal (Pure Ruby Web GUI), Glimmer DSL for LibUI (Prerequisite-Free Ruby Desktop Development GUI Library), Glimmer DSL for Tk (Ruby Tk Desktop Development GUI Library), Glimmer DSL for GTK (Ruby-GNOME Desktop Development GUI Library), Glimmer DSL for XML (& HTML), and Glimmer DSL for CSS

It is the only active JRuby GUI project I am aware of that truly follows the Ruby way while supporting bidirectional data-binding, scaffolding and native-executable packaging (e.g. DMG/PKG on the Mac and EXE/MSI on Windows).

Example syntax:

include Glimmer

shell {
  text "Glimmer"
  label {
    text "Hello, World!"
  }
}.open

hello world screenshot

1 Like