Monday, October 13, 2008

GWT version blues

I've been working with GWT (Google Web Toolkit) for about 18 months now, ever since I made the decision to code Skollar using this technology. I really appreciate the power to build cross platform javascript applications, using Java, a language I can almost code in my sleep.

But sometimes the boys and girls at Google can be very annoying.

Last week, after returning to make some changes to Skollar, I noticed that some core pieces of my application had stopped working. I suspected it was the GWT libraries, as a version that I had on Amazon's EC2 was still working fine, whilst a development version on a local server using the same codebase but a newer GWT library was not. I tracked the problem down to a change in the Element class API. Previously, when I needed to get an outerHML String, I used the toString() method on the Element instance. But as of v1.5, toString() no longer has this behavior which is replaced by getString(). Is this rather important API change mentioned in the release notes? If it is, it is obscure, and I cannot find a direct reference to this change. Now if I was part of the GWT development team, I would have asked for this change to be made obvious in the documents and I would have used getOuterHTML() instead of getString() to make this change more obvious to the developer.

Fortunately the code changes were simple to fix this time, but I wish the Google folks would think a little more before they release the next beta.

No comments: