Tapestry 3.0.4 upgrade to version 4

Posted on June 26th, 2006 by arnljot.
Categories: appfuse, java.

I started upgrading my application “Servibase” today. That was a nightmare… Tapestry really doesn’t care much for backward compatibility. I had to fix the cookie implementations (to the better in T4). And just about all element tags in component and page descriptions had to be exchanged for new tags with new attribute names.

Also the implementation of page and component classes had to be updated, as Tapestry 4 for some reason didn’t call my properties the same way. I suddenly had a forest of “NullPointerExceptions” giving runtime “BindExceptions”. But that was due to sloppy programming in the first place I guess.

Also T4 uses “hivemind” and the enhanced classes don’t belong to the same package as the abstract class. So I had to tweak the logging strategy as well so that I had some debug. Got to look into the “hivemind” way to do it, so my code become nicer :)

I really like T4, but it worries me that they have so little respect for backward compatibility. I think this is the only upgrade I will ever do in my application, at least when Tapestry is concerned.

Also several articles on the net spoke of the “Tapestry way” to do things in terms of business logic, that it’s better to delegate it to services rather than having listener methods deal with it in the pages like my Tapestry/Spring/Hibernate 3.0.4 application did. I’ll have a sideways glance at it. But I don’t expect that I’ll put in the effort to do that also, after having worked till 4am each morning to do the upgrade.

Maybe I shouldn’t have put in such long hours this weekend, I found my self spending 3 hours looking for a bug to why T4 didn’t find my component “ProductInfo” in the namespace, only to realise that of course; it’s called “ProjectInfo”! One litre of coffee didn’t seem to help the bug hunt. ;-P

Too bad I’m not using java 1.5 yet. I’d really love to use annotations, seems like a real tiger of a feature… :-P

0 comments.

Leave a comment

Comments can contain some xhtml. Names and emails are required (emails aren't displayed), url's are optional.