Glimmer Desktop Development Library for Ruby

Glimmer is a native-UI cross-platform desktop development open-source library that I wrote in Ruby and presented at RubyConf 2008. There has been a lot of recent development in Glimmer, like Rails-inspired scaffolding and native-executable packaging, as attested by the Ruby gem history. So, I am mentioning in case there are folks out there in need of a solid desktop development library that follows the Ruby way.

Glimmer’s main innovation is a JRuby DSL that enables productive and efficient authoring of desktop application user-interfaces while relying on the robust native-UI Eclipse SWT library. Glimmer additionally innovates by having built-in data-binding support to greatly facilitate synchronizing the UI with domain models. As a result, that achieves true decoupling of object oriented components, enabling developers to solve business problems without worrying about UI concerns, or alternatively drive development UI-first, and then write clean business components test-first afterwards.

Hello, World!

Glimmer code:

include Glimmer

shell {
  text "Glimmer"
  label {
    text "Hello, World!"


glimmer samples/hello/hello_world.rb

Glimmer app:

Tic Tac Toe

Glimmer code:

# ...
shell {
  text "Tic-Tac-Toe"
  composite {
    grid_layout 3, true
    (1..3).each { |row|
      (1..3).each { |column|
        button {
          layout_data :fill, :fill, true, true
          text        bind(@tic_tac_toe_board[row, column], :sign)
          enabled     bind(@tic_tac_toe_board[row, column], :empty)
          on_widget_selected {
            @tic_tac_toe_board.mark(row, column)
# ...


glimmer samples/elaborate/tic_tac_toe.rb

Glimmer app:

You may learn more about Glimmer at the open-source project page on GitHub:

By the way, Glimmer was originally an Eclipse project (Eclipse - The Eclipse Foundation open source community website | The Eclipse Foundation).I eventually moved to GitHub and the MIT open source license since that is more popular with Ruby programmers.

Math Bowling is a free open-source desktop game I wrote with Glimmer. It is included only as an educational reference on how to program practical desktop applications with Glimmer DSL and Data-Binding:

Glimmer additionally supports the idea of custom widgets and shells (windows).

Here is an open-source custom widget (Video):

Here is an open-source custom shell (Gladiator text editor):

Glimmer is in beta mode. Please help make better by adopting for small or low risk projects and providing feedback.

What are your biggest desktop development needs? Have you developed desktop applications in Ruby before? How was your experience? Please share. I’d like to learn more about the Ruby desktop development community.

P.S. This is not an advertisement since everything mentioned is free and open-source. Also, it is about Ruby programming, so it is relevant to Ruby Forum. I hope to benefit the Ruby desktop development open-source community with my ideas and code, and get feedback and contributions by interested folks in return.

1 Like

BTW, these are all the things that Glimmer does, which are not supported by other Ruby desktop GUI libraries (or not well enough at least):

  1. Glimmer offers a programmer friendly declarative DSL unlike FXRuby and GTK+
  2. Glimmer offers bidirectional data-binding support
  3. Glimmer offers scaffolding support for generating apps, custom shells (gems), and custom widgets (gems)
  4. Glimmer supports the native look and feel of Mac, Windows, and Linux via SWT (as opposed to Ruby Tk which has a non-native look and feel)
  5. Glimmer provides native executable packaging support (e.g. generate Mac DMG/PKG/APP file)