Over the last month, I’ve been learning more and more about Vaadin. I’ve also become more and more convinced that this could be the future of rich Internet application development for Java. Vaadin is an incredible powerful framework that solves many of the front-end difficulties developers have to deal with.
In this regard, Vaadin is the missing link for Java web application development. My current favorite technologies are:
- Google App Engine for hosting. Although calling Google App Engine (GAE) a Java host might be doing it a little disrespect. But until I’ve really had time to really dive into GAE, that’s exactly what it is for me: a cheap, reliable and scalable place to put Java web applications (with some limitations).
- The Spring framework is what ties together pretty much every enterprise application. Its dependency injection container and the incredible number of integrated technologies make this the one stop shop for Java developers: MVC, webflow, JPA, transaction management, JavaScript, security, etc. The introduction of many new features in a rather short timespan, might be turning Spring into a beast with many heads instead of the lean mean framework it used to be. For now, there is no alternative.
- Vaadin, obviously.
And that’s all you need. It seems easy, only 3 technologies and no more. The reality is a little different.
I started both my GAE and Vaadin test projects in Eclipse. Although I don’t really have a preference when it comes to IDEs, it was the obvious choice because both GAE and Vaadin have Eclipse plugins that make development a lot easier. It took a little experimenting, but in the end, both worked together and I was a happy developer.
Until I wanted to add Spring to the mix. Spring, by its nature, comes with tons and tons of dependencies to many Java projects. And while this is the strength of Spring, it also showed the limitations of the dependency management in Eclipse (or actually the lack thereof).
For better or for worse, when it comes to dependency management, Java applications have only one popular tool and it’s called Maven. This is where things went wrong. I created a Maven project, I even used the GAE archetype that comes with this maven plugin. I tried the M2Eclipse integration, which is great BTW. But nothing seemed to correctly configure the Google AppEngine plugin. It never found the appengine-web.xml configuration file.
It took me a while, but eventually I figured out, the GAE plugin does not support the traditional Maven project structure. A real shame in my humble opinion.
Luckily I found the solution: Just before publishing I found this blogpost. Patrik has created an archetype that creates the files in just the right location. You still need to be able to stomach the pretty inconsistent project structure, but at least everything works.
The Vaadin wiki also has a lot of useful information.
Update: If you want the full solution to this problem, please check this follow up post.