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
JRuby,
Rich Client / Desktop
Tags
GUI,
Frameworks,
JRuby

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

Reply

Exclusive Content

Rationalizing the Presentation Tier

Thin client paradigm characterized by web applications is a kludge that needs to be repudiated. Old compromises are no longer needed and it's time to move the presentation tier to where it belongs.

Agile Project Management: Lessons Learned at Google

In this presentation filmed during QCon 2007, Jeff Sutherland, the creator of Scrum, talks about his visit at Google to do an analysis of Google's first implementation of Scrum.

AtomServer – The Power of Publishing for Data Distribution

In this article, Bryon Jacob and Chris Berry introduce AtomServer, their implementation of a full-fledged Atom Store based on Apache Abdera, which is now available as open source.

An Introduction to Virtualization

It is easy to think that virtualization applies only to servers. In reality the recent resurgence of the concept is also being applied to networking, storage, and application infrastructure.

REST Anti-Patterns

In this article, Stefan Tilkov explains some of the most common anti-patterns found in applications that claim to follow a "RESTful" design and suggests ways to avoid them.

Choosing between Routing and Orchestration in an ESB

In this article, Adrien Louis and Marc Dutoo discuss the differences and relative merits of using orchestration vs. routing in a typical ESB setup, and discuss various implementation options.

Enterprise Batch Processing with Spring

Wayne Lund discusses batch processing, Spring Batch objectives and features, scenarios for usage, Spring Batch architecture, scaling, example code, failures and retrying, and the future roadmap.

User Story Estimation Techniques

Developer Jay Fields draws on his experiences as a ThoughtWorks consultant to describe effective user story estimation techniques.