Vaadin 7.1 Beta out now

Sami Ekblad
Sami Ekblad
On May 3, 2013 6:17:00 PM


What a nice way to start a new week. The Vaadin build process was successfully completed on Friday and we have now a new minor (beta) release: Vaadin 7.1 Beta1 is available in Maven Central and on the download page.

Those of you who have been following Vaadin development lately already know that this is most prominently about the server-push. It is the feature to make your applications more server-driven than before - real-time, background processing, asynchronous, and more collaborative.

Even if you are not interested in creating asynchronous server-driven applications, there are still new features in 7.1 that might be interesting to you. The Calendar add-on has now been integrated into the core framework and there is now Page.getCurrent().getStyles() for injecting your own CSS for the components, a completely new debug window, and the possibility to optimize widgetset size.  For more details, please consult the release notes for the beta release here.

Your first push application

From a programming point of view, one should keep in mind that writing multithreaded applications is also a bit more complicated than writing single user, single threaded ones. We have tried to make it easier by providing some API for this. A couple of  important pointers:

  • XHR (or HTTP request-response) is still the default communication channel and to use server push you must enable it first. Take a look at the tutorial here:

  • Lock the UI instance when updating the content. There is UI.access(Runnable) method for doing this. Just remember to minimize the work done inside this Runnable to avoid performance problems.

  • ThreadPoolExecutor.submit(Runnable) is a simple way to run asynchronous tasks, but different Java EE servers may provide other Thread pooling mechanisms.

  • Vaadin 7 leverages Java asserts to give you some development time information. This is helpful in finding logical mistakes like thread deadlocks, etc. Use the command line option -ea to enable asserts in your JVM.

  • The push implementation is based on Atmosphere framework and you can find compatibility information here.

We still have some known limitations, but Vaadin 7.1 Beta should now be a good starting point for development of applications that need real-time updates fired from the server. Of course, your imagination is the limit, but to help you get started, here are some push-enabled Vaadin application prototypes we have made previously:

And surely there is more to come soon...

Sami Ekblad
Sami Ekblad
Sami Ekblad is one of the original members of the Vaadin team. As a DX lead he is now working as a developer advocate, to help people the most out of Vaadin tools. You can find many add-ons and code samples to help you get started with Vaadin. Follow at – @samiekblad
Other posts by Sami Ekblad