Wicket, Tapestry, Vaadin – Framework Fun
I’ve been poking around with “new to me” frameworks for a while. I would like to replace my main website with something that I can use to program (currently it is straight HTML5). I’ve played with Wicket and Tapestry – both seem ok, but wicket seems to mush everything together, has a fairly small community, and leaves to you all the issues of layout and UI. Tapestry is a much bigger project and community and looks like a good framework. I’ll probably do some more work with it, but while I was exploring that I found Vaadin (vaadin.com) and it intrigued me.
What is Vaadin?
Well – you can read up on it at vaadin.com, right? Looks interesting – some wrappers, extensions, and tools that sit on a core of GWT. Primarily focused at Java developers, but has some interesting AJAX and web features for applications. The UI and GUI components look pretty darn comprehensive. I did some work a few years back with Icefaces and Echo2 – Vaadin looks similar, but has a lot more widgets and perhaps does not have some of the performance issues seen with Icefaces (round tripping to the server to much IMHO).
Trying Out a Few Things
One of the nice features of Vaadin so far is that the website, tutorials, and documentation are pretty nice. I was able to get the Eclipse plugin installed, build a project with the wizard, and deploy it to tomcat 7 locally with no issues – a surprisingly rare event for application frameworks (PHP, Java, or whatever). The project structure is pretty straightforward if you are familiar with J2EE project structures. You can see in the screen shot of the structure that there’s the usual web.xml and crap plus some libraries from Google and sutff. The main Vaadin distribution seems to be a single jar.
Docs and Tutorials
There’s a full set of APIs and a good tutorial that pretty much works (I did find some deprecation issues), but it is clearly written and I got things working pretty easily. The Eclipse plugin works pretty well for creating new projects and all the regular code editing features work correctly. In the tutorial I did replace references to com.vaadin.ui.SplitPanel with the proper references to HorizontalSplitPanel and VerticalSplitPanel because SplitPanel is deprecated. In section 4.4 don’t forget to update your call to new PersonList(this) to get the generated data added to the table. When I did have a problem with the tutorial code a quick download and check and I could correct things.
Another good feature of Vaadin is exception handling – it seems to actually have a decent implementation where errors are fairly easy to understand – you don’t just get a billion lines where the error you need to know about was one of the “too many to include in the server stack trace”. Here’s a good example of an exception that could be a PITA to track down.
The error is that I had a data field in my person container that didn’t match the column names used in the string arrays for the column headers (I used “address” instead of “streetAddress” in my person class). That’s the kind of error that can waste hours of time tracking down, but in this case the exception handler does a great job letting me know what the problem is.
What does the HTML look like?
Its all fine and great that you can generate some cool code – but what does it look like behind the scenes and what happens when you “mess around” with it?
This really looks like a fun tool – its easy and it works. I’m already starting on Part 2!