Back from JavaPolis, and seeing the Rails book lying where I’ve left it last Tuesday, made me pick it up and continue reading — instead of looking into GlassFish, the new persistency API, JSF and all the other new stuff I’ve seen in Antwerpen. It’s all alpha, beta, preview releases; and even if it isn’t it’s still so far away: Jeroen (colleague also attending JavaPolis) and I figured we’re lucky if we’ll be able to use Java SE 5 in our daily work (read: in BEA WebLogic) by the end of 2006 (when Mustang, Java 6 is already out), and Java EE 5 by the end of 2007 (when Dolphin, Java 7 is out). Two years and two more Java versions before we can use the technology we’ve been presented this week! So I’ve more or less lost interest momentarily and gone back on track with Rails.
There was very little mention of Ruby at JavaPolis. None of the people I spoke with had actually done anything with Ruby. What I did see:
- Graham Hamilton, Sun VP, announced in his keynote on Thursday that Java 7 may support ‘new JVM bytecodes for dynamic languages like Ruby’. This would make it possible for Ruby code to be compiled into JVM bytecode.
- A lot of presentations I saw, about Java EE 5 (GlassFish) but also for instance about Spring, stressed that everyone now focusses on EoD and ‘code by exception’, meaning: only having to code the exceptions to the default behaviour. For example, take the new persistence API (which is to be decoupled from the EJB3 JSR). Coding a persistent class is now as easy as adding two annotations: one (@Entity) to specify that the class is persistent, and one (@Id) to specify the key field. By default, the table name is assumed to be the same as the class name, and the column names to correspond to the class field names. You do still have to include all field declarations and getters and setters in the class. And why, as Jeroen asked me, didn’t they take one extra step to assume the key field is named ‘id’ in the database?
Of course, code by exception is not something exclusive to Ruby on Rails, but I did think it’s nice to see it’s becoming quite a trend in the Java world also.
- Then there was a meters long whiteboard with the Java timeline, starting with the inception of Lisp in the 50s, up until 2005 and beyond: the future of Java. Someone had written a wishlist for Java’s future, including dynamic typing and method parameters. Method parameters was actually mentioned by Graham Hamilton as a possible addition to Dolphin (Java 7), so there is hope. We’ll only have to wait until 2008…
- And a nice visual joke that only few people seemed to pick up, in the presentation by Thomas Huusom Christensen on ‘Zero Calories J2EE’. He told about his company’s search for the best minimal set of Java frameworks to use in their new projects. He then showed a slide titled ‘Still we clearly need a trim’, with a photograph of two stacks of books: on the left, a huge pile of books on Java frameworks; on the right, only two books: Programming Ruby and Agile Web Development with Rails. Too bad the presentation is not yet online, I’d love to show the photo here!
[Edit] Thanks to Rick Bradley (see comments) for providing the link to the photo I mentioned:
It’s not a completely fair comparison; Fowler’s pattern book should be on the right stack as well; although on the left side you could add books on Spring and JSF. And it still is a great photo to show at a Java conference!