May Meeting Recap

Posted by jvanfleet, Mon May 14 13:48:00 UTC 2007

First, thanks to Stu of Relevance for taking time out of his schedule to visit us in Richmond. We all appreciate it very much.

As he revealed at the Curry House after the meeting was over, Stu has been working with Venkat Subramaniam recently on training materials, and the two of them come from different schools of thought concerning slideshow presentations. After Stu’s recent JavaOne experience, he decided to use as few slides as possible during his presentation.

The Opening Gambit

Having already read (and reviewed) Stu’s book, I was very interested to see his application of many of the important concepts in the book in his opening section. He began with an AppFuse piece of Struts controller code, and refactored it into Ruby on Rails code one step at a time.

  • dynamic typing
  • Stuff (this is a family blog!) can go wrong
  • convention versus specification
  • instances instead of arguments
  • no managers
  • one domain class for all aspects
  • convention over configuration

Introducing each of these concepts in turn, he turned more than a dozen lines of Java code and reduced it to three equivalent lines of Rails code. See for yourself at the Relevance blog.

JRuby

The next segment of our talk was an introduction to JRuby. We were given examples of inventive language options that a programmer has when working with JRuby. I noted some of the ones I found most interesting:

  • Mixing Java and Ruby in Thread calling—also getting to use Java’s threads.
  • Importing Java classes into a Ruby module-space (e.g. java.io.File becomes JIO::File)
  • Adding method implementations to interfaces!

We were also given some examples of working with JRuby at the jirb command line. Although noting that there was no single project that Relevance has that worked 100% with JRuby out of the box, he did say that the number of failures is very low, and on Java 5 the errors do not appear. JRuby is obviously very close to being ready for prime-time.

Groovy and Grails

Stu said that he had recently been reintroduced to the status of Groovy and Grails, but it was clear that he really liked what he had seen. I feel quite certain he would recommend Graham’s book on the subject if any readers are interested in a Java solution.

Scripting Languages on the JVM

When comparing applications written in one of the dynamically typed alternatives available on the JVM with standard, AppFuse-style code, he offered a phrase rhyming with “your smock will be beaned.” You’ve been warned. Avoid smock beaning!

UPDATE: Added link to Stu’s dynamic typing and readability post.

Filed Under: Meetings | Tags: meetings

Comments

Have your say

A name is required. You may use HTML in your comments.