InfoQ

News

Ruby Shoes Roundup: Ruby-Processing with JRuby, The Shoebox, GitHub

Posted by Mirko Stocker on May 01, 2008 05:55 PM

Community
Ruby
Topics
Rich Client / Desktop ,
JRuby
Tags
JRuby ,
GUI ,
Frameworks

The Shoebox is a repository for Shoes applications, Why The Lucky Stiff's tiny toolkit for creating graphical applications. You can find an introductory article about the Ruby GUI toolkit Shoes here on InfoQ. Also, the book "Nobody knows Shoes" is now available for free.

Applications can be added to the Shoebox via its web interface, which also supports multiple versions, so modifying and republishing an application is made as simple as possible. Until recently, the Shoebox contained only Shoes applications, but now it has also become the home of Ruby-Processing, a JRuby wrapper for the Processing environment:

Processing is an open source programming language and environment for people who want to program images, animation, and interactions.

Ruby-Processing attempts to make Processing more Shoes-like, replacing Processing's Java syntax with Ruby. Let's take a look at an example: the following code suffices for a minimal application that displays a sphere that follows the cursor when it moves over the screen:

require 'ruby-processing'

class FollowCursor < Processing::App
 def setup
 # 4 lines of setup code omitted for brevity
 end

 def draw
 background 1
 translate( mouse_x, mouse_y )
 sphere 20
end
end

FollowCursor.new(:width => 200, :height => 200, :title => "Follow The Cursor!")

Some more extensive examples can be found in the Ruby-Processing download and of course on the Shoebox. The Shoes repository is now also hosted on GitHub.

No comments

Watch Thread Reply

Educational Content

Bindings, Platforms, and Innovation

This presentation focuses on the Internet and separating myth from fact, history from the future, and the mundane from the imaginative. Bob Frankston presents a vision of what could and should be.

Orchestrating Long Running Activities with JBoss / JBPM

This article explores the use of JBoss and jBPM to implement design solutions that effectively address the issue of orchestrating long running activities.

Neo4j - The Benefits of Graph Databases

This presentation covers the use of graph databases as an optimal solution for data that is difficult to fit in static tables, rapidly evolving data or data that has a lot of optional attributes.

Realistic about Risk: Software development with Real Options

This session introduces Real Options and shows how it can help in running your project. Real Options is a decision-making process that can be used to manage risk.

Communication Flexibility Using Bindings

This article discusses the use of bindings on services and references (including the instance of non-configured bindings) as the means to implement SCA communications in a Web and SOA environment.

Writing DSLs in Groovy

After a short introduction to DSLs, Scott Davis plays with the keyboard showing how to approach the creation of a DSL by typing working snippets of Groovy code that get executed.

Scaling Agile with C/ALM (Collaborative Application Lifecycle Management)

IBM Rational and InfoQ present, Scaling Agile with C/ALM, an eBook showing organizations how to become “finely tuned software delivery machines” by enabling team integration and scaling.

Concurrent Programming with Microsoft F#

Amanda Laucher presents a real life enterprise application written in F#. She shows actual code snippets, explaining design decisions and suggesting how to use some of the F# constructs.