Follow next link for an overview of the latest demos.


Swiby and Styles (part 1)
Swiby and Styles (part 2)
Swiby and Styles (part 3)

Swiby meets Pico (part 1)
Swiby meets Pico (part 2)
Swiby meets Pico (part 3)
Swiby meets Pico (part 4)
Swiby meets Pico (part 5)

Music Theory

The Matrix: Code Screen

The Actor pattern in GUI with Swiby/JRuby

The orginal article, a bit outdated now, talking about the first experimental Swiby: Experimental Declarative UI Language


Swiby is great for
Intranet applications

Swiby is a blend of Swing and Ruby for truly rich distributed applications.

It is aiming to be:

  • a truly rich client-side page technology via a browser plugin - think lazy-loaded Flash (see 'web mode')
  • alternatively embeddable as a big-up-front-download in a web page - much like the movie players in YouTube (see 'blob mode')
  • as editable as possible in design tools like DreamWeaver (see toolability)
  • as functional as Adobe's Flash, Microsoft's Silverlight and Sun's JavaFX
  • a single language as opposed to two-language compromises like HTML+Javascript (refer glass ceiling)
  • indexable by Google (or your favorite search engine)

Why Swing?

Swing is an incredibly sophisticated UI technology for Java that can meet all your UI needs. Applications like JetBrain's Intellij IDEA are built on it. There are other complimentary technologies like Java2D that are highly complementary to Swing.

Why Ruby?

Ruby is an interpreted language that is very adaptable and capable. It has been popularised by Ruby on Rails in recent years, its proving that less is more for web application development. We want the same gains for 'The Sweb' so we have defined a builder-like style for the marking up of Swiby pages. This style of page will:

  • be editable by non-programmers
  • allow the builder style to be broken out of for advanced functionality
  • be editable by design tools, with round-trip capability

Ruby, or more accurately JRuby will be fast to interpret each page that it processes. The is no compile stage that may invisibly slow rendering down.

Sun's JavaFX Script technology is closest to Swiby.

Sample Swiby Web Application

Jean started a simple bank-account application. Its has Transfers Lists and the ability to make new transfers. There is no server side yet, but it will gove you a glimpse of the pseudo-declarative form that is easy for newbies to code. The source for the app is two ruby scripts (click on each image to see the source). When you ar running Swiby, the first page gives way to the second when the user clicks the applicable button.

Transfers List ..

transfers image

Editing a Transfer ..

transfer image

Note the back button - like the web it will take you to the previous page.

The client-side model, Account and Transfer are not Swiby pages per se. They are plain ruby classes that Swiby holds on to through page traversals

Trying it out

Best to do this direct from Subversion. In a command shell:

svn co (full version with site source, quite big)
svn co (Swiby core files)
svn co (all demos)

cd core
jruby -Ilib lib/swiby/sweb.rb ../demo/banking/banking.rb

Requires JRuby installed and 'jruby' in your PATH

Getting involved

It is quite early days for the project. Nothing is useable in any serious way yet, and we have a ton of work to do. However if you're a swing loving Ruby convert or a C++ person with a like of writing browser plugins think about helping us. The management app for Codehaus projects shows you where the mail lists and issue tracker are. We're looking forward to patches in advance of taking committers on :-)