Well, what should I tell you. It’s like a dream come true - I’m at the JAOO conference in Aarhus/Denmark.
After some extreme-airport-hopping (4 airports in 7 hours) yesterday and some major problems with the local geography (getting to my hotel), I still managed to survive JAOO Day 1.
On today’s program were some parallel sessions about Ruby on Rails, Spring, Equinox/OSGi and Test Driven Development. I participated in the Equinox and TDD sessions.
The former was held by Tom Watson and Jeff McAffer, two guys from IBM. They first explained the ideas and concepts behind OSGi, followed by a live presentation of a simple “Hello OSGi” bundle (those attendees who had their laptop with them were encouraged to try it themselves). They also provided the source code of a simple chat application, but due to all the (really interesting) discussions, there wasn’t enough time left to try this one in the session (but I started it and - well - it worked).
The bottom line: OSGi is a really interesting technology for glueing your components together, solving all of your classpath issues (well, not quite that is). A minor “problem” is, that development is a little different from “normal” Java development (as with every container there are new things to learn and understand).
Another problem is, that some libraries using a Thread’s context ClassLoader have problems running as OSGi bundle. Unfortunately one of these libraries is Hibernate, which would pose a problem for many people wanting to use OSGi on the server. Luckily there is the concept of a buddy classloader solving this problem, but this is not (yet?) part of the OSGi standard, but only provided by Equinox.
Session 2 - Test Driven Developmen - was moderated by the ThoughtWorker Erik Dörnenburg (I was waiting the whole session to hear the name Martin Fowler, but it just didn’t come). It was a good practical presentation about TDD and what it’s all about (to sum it up: red bar - green bar - refactor, in this order).
The second part of the session was an introduction into jMock. I found out, that I disliked it for a false reason. I always liked it because of its concise syntax (compared to easymock’s record-and-replay mechanism), but I thought that it was somewhat brittle to provide a method’s name as a string (e.g.
mock.expect(once()).method("someMethod")
). This of course poses a problem when you refactor your classes, but the key point is that your test will fail if you provide an invalid method name (jMock checks if a method with the provided name really exists). So you will find out if you did anything wrong.
Well, that’s about all from JAOO Day 1. What’s left is a pleasant feeling in my stomach - the reason may be the most expensive 3 small pieces of roast lamb I have ever had (26 Euro) or the most expensive beer (6,5 Euro for 0,4l … even at the Oktoberfest in Munich you get twice as much). Good night.