Vaadin is an interesting RIA platform built by Vaadin, LTD. Vaadin differs from your standard RIA by existing almost exclusively on the server. All application state remains on the server and all events are handled through communication with the server. The display layer is written as a layer above GWT and the whole project is open source and free. This evaluation post is the first in a series of my lessons learned while evaluating this framework. Vaadin is a good fit for all the web-applications that fit in the general bucket of “enterprise support tools.” The reasons why are covered after the jump.
What’s special about it?
I think the biggest departure from the frameworks that I’ve been using for web programming is that Vaadin is stateful. The client state is tied in the session with a state on the server. This has some major implications for deployment, such as requiring sticky-sessions in load-balancing and shared caches for failover. The developers of Vaadin made the framework stateful to facilitate building all the interaction code on server. The browser is only used for display. This means that you can use your ordinary Java toolset to walk through your event handling. You don’t need firebug or any javascript knowledge, unless you are creating a custom widget. The Book of Vaadin provides lots of detail on this model in their chapter on Architecture. I have no desire to repeat the documentation here, but just provide enough of a glimpse in case you are more interested.Would I use it?
I think Vaadin fits in nicely within a specific niche. I would not use it for a normal website (nor do they recommend it), nor would I use it for a consumer-facing or heavily trafficked web application. The stateful model just doesn’t scale like that. However, there’s a whole other class of applications, management consoles, intranet web-apps and other systems that could just live on one server that are a perfect fit for Vaadin. Even more so if you can control which browsers the users run (IE javascript is really slow). These are the things that I really liked about the product:- Complete documentation. You don’t have to dig through a user-generated wiki. They have the whole book up on the website.
- Friendly forums. A search shows multiple people that had the same problem. Instead of the usual, “use the search function,” that you see on a lot of other forums, there were real replies.
- All java. A developer can build an entire web-application with just Java. That’s really important if web-application programming isn’t a core competency.
- Doing things the Vaadin way is really easy. For instance, the hbncontainer makes building an app around hibernate trivial.
- The widgets really work like their desktop equivalents. The table responds to keystrokes and the split panels work.
- Vaadin hides the complexities of layouts on the web. You just specify your container strategy.
Were there problems?
While Vaadin is pretty easy and built on a language I’m familiar with, there was still a learning curve. Most of my issues came from doing things outside of the Vaadin way.- Vaadin and Maven don’t seem to get along too well. Trying to install the Visualizations plugin was a nightmare. Eventually I had to install it and its dependent sources into my test project to build the widget set.
- Documentation and examples on how to leverage your existing DAO layers was sparse and incomplete.
- The same goes for Spring integration, esp Spring Security.