Oracle opened the day with their keynote, and they naturally talked a lot about JSF. They made one new announcement about contributing more code to open source, a JSF/Javascript drag and drop framework they were demoing and then continued with BPEL, but I found the general session somewhat boring. At least for me, the session of the day was Gavin King's "Introduction to JBoss Seam". Java EE 5 implementation with some open-source but proprietary components as has traditionally been the "JBoss way". Gavin's a *really* good, entertaining speaker and I really enjoyed his talk complete with Spring and Struts bashing remarks. The biggest innovation in Seam is the notion of conversations - i.e. a transaction that spans through several requests but is not bound to a session. The EJB 3 persistence annotations together with an Entity manager is already a huge leap forward, but Seam just builds on top of that offerering a tight integration with JSF and because of the conversation scope, reduces the "boiler-plate" code for fetching and attaching the persistent business objects. As a simple example, in conventional JSF, you'd have a bean property to get / set an id of say, a user profile, then in "edit" action method you'd fetch the object, navigate to an edit page and in a save action you'd store the bean (values). The lifetime of the bean would be in a separate configuration. Now, in Seam you'd instead start a conversation with @Begin annotation in the get method, fetch the bean and end the conversation with @End in the store method. The scope and lifetime of the bean is managed with these annotation automatically and it eliminates the need for action binding, resulting in big reduction of lines of code you need to write.
Also, I attended "super packages" session, a possible new language feature in Dolphin. It's quite interesting and I can see many useful purposes for it, but still it spurred some heated discussion, because it's not absolutely necessary language feature, and frankly, I don't like the new "module file" compilation unit the current JSR is suggesting.
Another interesting session was JUnit for by Kent Beck, especially considering I had attended the TestNG session the previous day. JUnit4 annotations look pretty much the same as TestNG, so I suppose there's even less incentive in moving away from JUnit. One interesting thing he showed was an Eclipse plugin that runs your unit tests automatically every time you make a code change. Kent has some good points about unit testing in general, and that even though now everybody's talking about it, still a minority is doing it in practice. Still, Kent's unit testing dogmas, fast, flexible and completely isolated have always been controversial to me: Integration tests depending on the database and servlet container just cannot be run fast if they run in a complete isolation, starting up and stopping everything before and after every unit test. I asked about Kent's opinion on TestNG in which the isolation principle is somewhat relaxed, but he refused to comment on it. Software, like anything else is just big boys playground, and you sure can't go and take over somebody's elses sand castle.
Posted by thoughts at May 22, 2006 03:24 PM | TrackBack