BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Vaadin Releases Version 8 of Their Polyglot Framework

Vaadin Releases Version 8 of Their Polyglot Framework

Leia em Português

This item in japanese

Four years since the release of version 7, Vaadin released version 8 of their polyglot framework for building web apps with UI components. Vaadin 8 features 21 improvements that include:

  • Typesafe Java APIs:
    • Improvements to Vaadin:
      • Components
      • Validators
      • Grid
      • Exception messages
    • A new ItemCaptionGenerator
    • Typesafe lambda expressions
  • Improved Defaults:
    • Null values
    • Ordered layouts
  • Improved Performance:
    • Less overhead for in-memory data sets
    • Less CPU required for large data sets
  • Built for the Future:
    • Drop support for older Java versions and Servlet specifications
    • Drop support for legacy browsers

Example - Difference Between Version 7 and 8

The following grid contains typesafe lambda expressions that demonstrate one of the simplifications from Vaadin version 7 to version 8:

Version 7: Version 8:
                    
Grid grid = new Grid();
grid.setContainerDataSource(
    new BeanItemContainer<>(persons));
grid.removeAllColumns();
grid.addColumn("firstName");
grid.getColumn("firstName")
    .setHeaderCaption("First Name");
grid.addColumn("lastName");

 

                    
Grid<Person> grid = new Grid<>();
grid.setItems(persons);
grid.addColumn(Person::getFirstName)
    .setCaption("First Name");
grid.addColumn(Person::getLastName)
    .setCaption("Last Name");

 

Note the elimination of wrapping data in a container in version 8. The Vaadin Container interface has been removed from the API.

Vaadin also updated the Creating CRUD UI with Vaadin example (located in Spring Guides) for Vaadin 8.

Getting Started

The following command, using Maven, initiates an application build:


mvn -B archetype:generate -DarchetypeGroupId=com.vaadin
-DarchetypeArtifactId=vaadin-archetype-application -DarchetypeVersion=8.0.4
-DgroupId=org.test -DartifactId=vaadin-app -Dversion=1.0-SNAPSHOT
&& cd vaadin-app && mvn package jetty:run

This will create a simple single-module example application (as specified in -DarchetypeArtifactId), create a subfolder (as specified in -DartifactID), change directory to it, launch an instance of Jetty, and run the application as as shown below:

For a more complex multi-module example application, simply substitute the value, vaadin-archtype-application-example, in -DarchetypeArtifactId.

In the Vaadin 8 release statement Matti Tahvonen, product marketing manager at Vaadin, discussed upcoming near-term goals:

Although Vaadin 8.0.0 brings in a lot of nice enhancements, it is also a basis for further enhancements. Dropping support for old JDK versions and unmaintained Internet Explorers, we’ll be able to deliver new things much faster. In the next minor release, scheduled already for April, we’ll add often requested hierarchy, drag and drop and component support to the Grid component.

 

Naturally we’ll also continue our regular bugfix releases, so in case you face “.0 bugs,” report them right away via GitHub.

Resources

Rate this Article

Adoption
Style

BT