Glimmer

Simplified Desktop Development in Ruby

Introduction

Glimmer is a JRuby DSL that enables easy and efficient authoring of user-interfaces using the robust platform-independent Eclipse SWT library.

Glimmer comes with built-in data-binding support to greatly facilitate synchronizing UI with domain models.

Example

Here is an example of a program written in SWT, JFace, and Glimmer, to clearly illustrate the benefits of Glimmer's syntax.

SWT Java Example:

public static void main(String[] args) {
  Display display = Display.getDefault();
  Shell shell = new Shell(display);
  shell.setText("Example");
  shell.setLayout(new FillLayout());
  Composite composite = new Composite(shell, SWT.NONE);
  composite.setLayout(new GridLayout());
  Label label = new Label(composite, SWT.NONE);
  label.setText("Hello World!");
  shell.pack();
  shell.open();
  while (!display.isDisposed()) {
    if (!display.readAndDispatch()) {
      display.sleep();
    }
  }
  display.dispose();
}

JFace Java Example:

protected JFaceTest(Shell parentShell) {
  super(parentShell);
 setBlockOnOpen(true);
 open();
}
protected Control createContents(Composite parent) {
 getShell().setText("Example");
 getShell().setLayout(new FillLayout());
 Composite composite = new Composite(parent, SWT.NONE);
 composite.setLayout(new GridLayout());
 Label label = new Label(composite, SWT.NONE);
 label.setText("Hello World!");
 return composite;
}
public static void main(String[] args) {
 new JFaceTest(null);
}

Glimmer Ruby Example:

shell {
  text "Example"
  composite {
    label { text "Hello World!" }
  }
}.open

Background

Ruby is a dynamically-typed object-oriented language, which provides great productivity gains due to its powerful expressive syntax and dynamic nature.

While it is proven by the Ruby on Rails framework for web development, it currently lacks a robust platform-independent framework for building desktop applications.

Given that Java libraries can now be utilized in Ruby code through JRuby, Eclipse technologies, such as SWT, JFace, and RCP can help fill the gap of desktop application development with Ruby.

Goal

The goal of the Glimmer project is to create a JRuby framework on top of Eclipse technologies to enable easy and efficient authoring of desktop applications by taking advantage of the Ruby language.

Scope

The scope of the project is simply to make it possible to use a JRuby framework to author Eclipse-based applications.

Future work may involve enhancements to meet new use-cases or take advantage of other Eclipse technologies like the Eclipse Modeling Framework and other Ruby technologies like Rails.

While Glimmer's original goal is to enable desktop application development with JRuby, that does not preclude it from growing to cover other areas, such as web development.

For example, when SWT starts supporting Ajax widgets, Glimmer may be enhanced to further simplify web development (e.g. provide a Glimmer Rails plug-in.)

Initial Committers

Annas "Andy" Maleh (Obtiva)

Founded Glimmer project and contributed majority of source code and ideas. Experienced in RCP and Ruby on Rails development.

Nick Malnick (Obtiva)

Contributed to Glimmer by pair-programming on listener support and the Tic Tac Toe sample game, researching integration with RCP, and researching better ways to do unit-testing. Experienced in RCP and Ruby on Rails development.

Dave Hoover (Obtiva)

Contributed by encouraging and guiding the test-driven development process and helping with the creation of a RubyGem for the project. Experienced in Ruby and Rails development. Leads Obtiva's craftsmanship studio.

Kevin P. Taylor (Obtiva)

Contributed by testing Glimmer on the Mac. Will be a future resource for verifying Mac functionality. Experienced in RCP and Ruby on Rails development. President of Obtiva Corp.

Incubation
Incubation