All atomic-powered posts filed in “Technologies”:



Rolling a JRuby desktop application

Atomic has been using JRuby, several Java libraries, and Jar Jar Links to distribute five different Ruby desktop applications (read: not Rails applications) as single, executable jar files. In this article, I will show how we:
  • Work on our application as developers
  • Distribute our application as a single jar file to our users
  • Compile the Ruby source files into Java class files
  • Integrate third-party Ruby and Java libraries

This article includes an example project that demonstrates all of the above.

Read the rest of this entry
Filed in: Technologies, Tips, Tools

Presenter First Modeling Tools for Visual Studio

Brooke Hamilton has developed some of his own extensions to Presenter First and a cool-looking visual modeling tool to match. We at Atomic have not put it to use yet (none of us is using Visual Studio 2008) but it sure looks snazzy.

The tool and its source code are hosted on CodePlex: A Modeling Tool for the Presenter First Pattern

Also linked from that page is a bit of explanation regarding Brooke’s take on PF, setting it up for DSL use. I have not made use of this derivation of Presenter First (I tend to use my Presenters as the place where I describe my features—the one part of my application that cannot be auto-generated) but Brooke’s tool and approach have been working well for him, and as he says, “it’s a lot of fun, too.” Give it a read.

Desktop Application Development in JRuby

Is JRuby a realistic candidate for authoring complex desktop applications?

Yes.

Last spring Karlin Fox and I became involved with a project that aimed to rewrite an old DOS app as a modern desktop app. Once Java was selected as our platform we immediately began to consider if JRuby could play a role in the project. We discussed several levels of JRuby usage. We had applied JRuby in the past for testing and various tool-smithing tasks, but we wanted to see JRuby play a larger role. The decision was made to write as much of the application as possible in Ruby.

We are now in the 22nd week of the project and there have been no regrets with our decision to use JRuby. It continues to excite me that I get to use my favorite programming language to test and create an attractive desktop application. Micah Alles joined the project in the 10th week increasing the team to three members. The code is now being exercised by 793 RSpec examples at the unit level and 73 integration examples that exercise the app just below the GUI. The application has reached a size of 187 classes which contribute to 7,890 lines of code.

The application is a simulation that shows a two dimensional topological view of connected nodes that the user gets to interact with. Users can load different topologies into the application. Data is gathered while the simulation runs and the user has the ability to view various reports about their performance.

We are using the Batik SVG Toolkit to render the topology. The rendered SVG is interactive. Clicking on components brings up swing dialogs. Using SVG gave us the ability to easily integrate artwork created by the design team.

Using Swing components through JRuby has been much easier than with straight Java. We have built several complicated widgets using complex components like JTable. For layout purposes we have used Cheri::Swing, Profligacy, translated output from the Netbeans GUI designer, and rolled some views by hand. Our only setbacks have been the slow progress of Java integration features in JRuby and the lack of a comprehensive Swing layout manager.

We are bundling all of the application’s Ruby code, Ruby and Java dependencies, and JRuby itself into a single executable jar which we deliver weekly at the end of each iteration. Our target OS is Windows, but we all develop on OS X and Linux as well.

We should be able to provide some screen shots by springtime when the application is officially released, and will post anything noteworthy during the rest of our development effort. Please share any JRuby success stories you have with us and be sure to post them on the JRuby wiki. Thank you JRuby team!

Rich Internet Application Platform Shoot-out

I’ve been tracking the Rich Internet Application (RIA) framework technology scene lately.

That’s a broad category. As the technology is put to use, its applicability grows into other domains. Mobile or otherwise-embedded devices, set-top boxes or game consoles, tables, and stand-alone or kiosk applications are all targets now. Web applications are still the largest niche for RIA platforms, so I’ve compiled a list of the web-oriented technologies for comparison. Since I most enjoy writing web applications in Ruby, I’m tracking the way each platform supports Ruby integration—specifically Ruby on Rails.

Here are the contenders, in order of fitness for web application development, according to my own opinion:

Read the rest of this entry