Vaadin 24.4 integrates with React, unifies Flow and Hilla development, and more!

Community Spotlight - February 2016

Matti Tahvonen
Matti Tahvonen
On Feb 29, 2016 9:24:00 AM

For this month's episode I interviewed an active Vaadin user and add-on author, Jonas Hahn.

Jonas Hahn and Vaadin Framework project lead Sami Ekblad in JFokus conference.

Where do you work and what is your typical working day like?

I am a freelance Java-developer and mostly hired by larger companies in the financial or automotive sector, where I support them with their business development projects. That involves programming the UI and backend services, as well as configuring the continuous integration development environment and setting up the initial production deployment setup.

How did you find out about Vaadin for the first time?

I was on a team with 5 other developers starting a greenfield Java EE 6 business application. We were evaluating different UI frameworks, among them JSF, Struts and Vaadin. Half of the team had no experience in developing Web-UIs with HTML, CSS + Javascript and the timeline for the project was quite challenging with the first customer demos already planned. Vaadin had the benefit of plain server-side Java coding and coming with decent looking default styling, so finally we settled for Vaadin, which turned out to be a wise decision. We basically used the reindeer default theme, added some custom borders around the UI elements and the application logo on top to give it some unique touch and it looked quite pleasing for a business application right from the start. That gave us more time to work on the business logic and we successfully delivered the first prototype on time for the customer demo. Since then I kept an eye on the Vaadin development and I was pleased that my last two projects were using Vaadin.

What is the main feature in Vaadin, which makes you want to use it?

Plain server-side Java-coding  is still the top feature for me. I don't have to switch my tools all the time and the UI is more integrated into the application architecture from a programmer's perspective. My experience is that it also lowers the barrier for coders on the team who consider themselves backend-only to work on UI-code.

You have recently been working on an add-on called ComponentRenderer. What kind of problems does it solve for Vaadin developers?

When Vaadin announced the new Grid component I was quite excited, until I realized that Grid does not support standard Vaadin components in its body cells. After going through the pain of writing some custom renderers using GWT and also realizing that you need control over the widgetset which is not the common case in larger businesses, I started experimenting with a renderer which takes components on server-side and displays them in the Grid cells.

Vaadin 7.6 came with some nice hooks for the Grid renderer mechanism, which finally enabled me to solve the problem of high server-side memory use. So with this add-on you can do plain server-side Java coding as you are used to and still use Grid. It comes with a slight performance tradeoff compared to a specialised pure-GWT renderer, but now for every column you have the choice if you really need to fiddle with the client-side, browser-compatibility, etc. You can find the renderer in the add-on directory and a demo-application in github, so you can easily get started.

Which other Java libraries (like Vaadin add-ons) are you often using in your Vaadin projects?

Besides the well known standard Vaadin add-ons like Testbench, GridExtensionPack added some nice features to the Grid. And I used the V-Leaflet add-on to conveniently add maps in my last business project. Recently I stumbled upon Viritin, which offers a very clean and easy to use API on top of Vaadin. Actually that API inspired me to provide some similar convenience features to ComponentRenderer. LazyListContainer included in Viritin also looks very promising, so that will be the next thing I will try out. During the development of ComponentRenderer, I spent more time in Vaadin Directory and I realized there are quite some valuable gems hidden there, so from now on I will check it more frequently.

What are the top features you’d like to see in the upcoming versions of Vaadin Framework?

Actually, I am quite satisfied with the current feature set of Vaadin, as the last couple of minor versions already brought a lot of smaller and bigger changes. With the introduction of Valo in 7.3 (great work by the way), Vaadin again looks very modern out of the box and now you can very easily adjust the theme to your corporate identity. Grid in 7.4 already was very promising and now with 7.6 starts to be fun to use.

What I was missing when using Vaadin in the context of larger businesses I worked recently, was the possibility to have sub-themes with their own styles and icons. In most larger companies, a dedicated framework-team develops a core application frame and components, which other teams use to build sub-applications. The framework team has the sole control over the widgetset and the theme, but the sub-applications often need specific icons and stylings for application-specific components or slight adjustments. Of course you can load icons by the java class loader and do creative stuff, like use Page.getStyleSheet() to inject custom styles, but those are ugly workarounds. The sub-theme option should be configurable, so that a central enforcement of a unique style still is possible if needed, but it is also easy to theme sub-applications. If the widgetset could also be modular that would be a dream, but I assume the monolithic widgetset is a GWT restriction and feature for optimizations.

Thanks Jonas for the interview, we are eagerly waiting for your upcoming contributions!

Try ComponentRenderer add-on

Matti Tahvonen
Matti Tahvonen
Matti Tahvonen has a long history in Vaadin R&D: developing the core framework from the dark ages of pure JS client side to the GWT era and creating number of official and unofficial Vaadin add-ons. His current responsibility is to keep you up to date with latest and greatest Vaadin related technologies. You can follow him on Twitter – @MattiTahvonen
Other posts by Matti Tahvonen