(Article) Cross-platform development with JRuby and Swing
Article : Cross-platform development with JRuby and Swing
Description
In addition to building Web and console applications with Ruby, you can write complex GUI desktop applications that run unmodified on multiple platforms. Thanks to JRuby, a robust alternative to the traditional C implementation of Ruby, Ruby GUI toolkits can use UI tools available to the Java™ platform. This article introduces Monkeybars, a library that uses JRuby and Swing for building applications, and takes you through an example application.
Ruby is currently best known as a programming language for building Web applications, primarily with the Ruby on Rails framework. However, the language is more than capable for developing graphical desktop applications as well. In this article, you'll learn more about using Ruby for the desktop, and you'll work through a detailed example that uses Monkeybars — an open source library based on Swing and JRuby — to create a GUI desktop application.
Ruby for the desktop
The standard Ruby distribution includes code for bindings for Tk, an open source, cross-platform set of widgets for creating graphical desktop applications. This can be extremely handy. But when you install Ruby from source code, you need to be sure you also have the Tk dependencies and make sure the compilation settings include Tk. If you install Ruby on Windows® using the excellent "one-click" installer package, you still must take extra steps to have Tk working, because it no longer supports automatic installation...
Courtesy: Ibm.com
- guru's blog
- Login to post comments
