Upgrading between major versions a minor task

Jani Laakso
On Jun 17, 2009 12:29:00 PM
Let's say you have an IT Mill Toolkit based application involving couple hundreds of java classes on your UI module alone. Of course you have also developed new client-side components of your own and your project contains custom style sheets and graphics which extends Toolkit's default theme. And now you wonder what kind of task it would be to upgrade your project to use latest Vaadin 6.0.0.
For me that was the case and I decided to give it a try. Simply put, I was genuinely surprised how straightforward task it was to migrate from Toolkit 5.4 to Vaadin 6.0. Thumbs up for the Vaadin core developers, you have done excellent job on backward compatibility and getting one more happy Vaadin user to your rows.
So, how to do it? You can find out all the necessary information from Vaadin 6.0.0 release notes. I found it handy to use Eclipse's Search / File feature with Replace... to convert my project imports from com.itmill.toolkit. into com.vaadin. for every Java file. Same feature can be used to convert your theme class names into Vaadin compatible. For most parts upgrade was just simple mass search & replace operation and few straightforward code modifications.
After two uneventful hours my task was done! The result? 292 added files, 5 removed and 142 modified in our customer's SVN repository. This includes new compiled widgetset which is now based on Vaadin. As a bonus it was nice to try out our customer project with new themes that Vaadin 6 provided, I even tried multiple different themes by testing with plain Vaadin Reindeer or Runo theme and I also tried extending stock themes with our customer's theme. Now we have an option to run our customer project based on Reindeer theme too, will be nice.
Time to kick out toolkit.jar and replace it with vaadin-6.0.0.jar. Finally just one small caveat. If your project happens to use earlier than 5.4 version of Toolkit, your application wont probably work as straightforward as mine because layouting code has been enhanced quite a bit in Toolkit 5.4 version, still it should not be too big of an task.
Eclipse is a nice tool here
Jani Laakso
You haven't yet written a blog author profile for yourself. Go to My Account page to write a short description of yourself.
Other posts by Jani Laakso