When I hear about Ruby, the first thought that comes to mind is Ruby on Rails and Web 2.0 applications. I would have never made the association from Ruby to desktop application. Until now. About a year ago, it was suggested that JRuby and SWT might be a viable combination for Ruby on the desktop. After all, SWT is the performant, native desktop library available from Eclipse, and Ruby gives you many productivity advantages. There was even a SWeeTgui project at the time, though it doesn’t seem like there was much traction.
Fast-forward one year, and we now have Glimmer: “a JRuby DSL that enables easy and efficient authoring of user-interfaces”. What advantages are there with Glimmer? Here’s what I see:
- A compact api that allows Ruby developers to write native destop applications
- A clean wrapper around the SWT libraries, that takes a minimalist approach by exposing the most important features and applying smart defaults everywhere
- An API that is based on Ruby’s programming paradigms, not Java’s.
- The ability to implement complex SWT desktop applications with only 25% of the code.
That last point is what brought me over. Being able to write the same functionality with just a quarter of the code (and time). I’ve been developing Java applications for nearly a decade now, and using SWT for two years, and I feel very comfortable. .
When I first saw Glimmer, I didn’t believe that I needed it for my Java SWT applications, because I know Java, and I know SWT. But as we discussed the merits of this API, and I saw a demonstration of some complicated user interfaces, I got a “glimmer” in my eye. I could see alot of productivity benefits here.
Take a look for yourself, and consider it for your next desktop project.