Blog

What’s up in Vaadin R&D?

By  
Matti Tahvonen
Matti Tahvonen
·
On Apr 21, 2016 7:58:00 AM
·

The core framework team, whose responsibility it is to develop Vaadin Framework, has been busy during the winter building a major update to the Vaadin Eclipse Plugin. But we have built many other new features during 2016 as well - most of them available for you to try today.

We have also decided that there will still be at least one big release for the 7.X series. Originally we planned to release Vaadin 8 next, but decided to publish some exciting features to the 7-series earlier. Version 7.7.0.alpha1 is just fresh out of the oven and you can try the most relevant features today.

The improvements in 7.7 (before summer) will be fully backwards compatible. API wise the same applies for Vaadin 8, with its improved data binding APIs and mobile support, but we’ll be paving way for new features by dropping some legacy browser support and only supporting Java 8 and newer in Vaadin 8-series.

Let’s cover some things that we have planned for Vaadin 7.7 and which you can already try out via our pre-releases repository.

AppWidgetset will make your widgetset invisible

In Vaadin 7.7 the widgetset concept will be invisible by default. Also transitioning from a “default widgetset project” to a project that is using add-ons will be easier. Practically we will be auto-generating the .gwt.xml file with tooling (Maven plugin) and you don’t need to think about it at all.

The autogenerated widgetset will by convention be called AppWidgetset and it will be a generated source file that you, for example, shouldn’t add to your source code management system. If you are using the autogenerated AppWidgetset, you don’t need to add a @Widgetset annotation or similar error prone web.xml configuration to your application, unless you are doing something more advanced. If you need some application specific GWT module declarations, you can still create the widgetset manually as you have done before.

Maybe the most visible thing with the new widgetset handling is, that if you don’t use any client side extensions, there will be no GWT compilation at all. A fresh Vaadin project from vaadin-archetype-application is now built in couple of seconds, if Maven has cached the required modules. To create a project with 7.7.0.alpa1, try following CLI commands:

mvn archetype:generate -DarchetypeGroupId=com.vaadin \
    -DarchetypeArtifactId=vaadin-archetype-application \
    -DarchetypeRepository=https://maven.vaadin.com/vaadin-prereleases \
    -DarchetypeVersion=7.7.0.alpha1 \
    -DgroupId=org.test -DartifactId=testapp -Dversion=1.0-SNAPSHOT 
cd testapp
mvn install jetty:run -Pvaadin-prerelease

 

CDN - widgetset goes to the cloud

We did an April’s fool about “CDN”, but seriously, we are working on hosting all your widgetsets from the cloud. Along with Vaadin 7.7, you can actually delegate the compilation of your widgetset to a cloud service and even leave the hosting for its task. And the best thing is that if the widgetset-combination already exists in the CDN, no compilation is needed and you’ll get it immediately! We’ll store all permutations used so far by any other Vaadin developer.

Many Vaadin developers only use add-ons from Vaadin Directory or maven central, which is a really good habit, actually. With a CDN mode, the next version of vaadin-maven-plugin can request a correct permutation of add-ons and Vaadin, and use that as your application’s “client side engine”. There is also a “hybrid mode” that downloads the CDN compiled widgetset for your web app to serve.

Although we believe it will become the most common way to consume Vaadin Add-ons, the cloud based solution can’t fit all cases. Some apps and organizations just cannot trust a third party service and if you have some application specific widgets or extensions, you’ll still have to use the plain old local compilation option.

If you try the 7.7.0.alpha1, you can adjust the widgetset compilation mode (local, cdn, fetch) with the following configuration to your vaadin-maven-plugin part in pom.xml:

    <configuration>
        <widgetsetMode>cdn</widgetsetMode>
    </configuration>

Maven build for framework - now easier to contribute to the core

Refactoring the old build system doesn’t affect you as a Vaadin user, but in case you want to contribute to the Vaadin Framework project, it will be a big help. Also, if you have an urgent situation in your project, you can really easily build custom versions of Vaadin for your project.

You can actually try the Maven build today, if you want. Assign the following commands to get Vaadin checked out from github and a development version built and installed into your local maven repository for testing it out in your own projects.

    git clone https://github.com/vaadin/vaadin.git
    cd vaadin
    git checkout feature/mavenize
    mvn clean install -DskipTests

Naturally we’ll get rid of the “branch checkout” step, once the feature branch is merged to master.

So now, if you get bored waiting for a fix to land in Vaadin, it should be easier to try fixing it yourself and testing the fix in your own project. We of course wish that you share the improvements with the community. See the contributing page for more details about pushing changes for review.

See all feature branch builds

We have still a couple of other neat changes we wish to finish for 7.7, but then we’ll go full steam with the data binding improvements and Vaadin 8.

Naturally you can follow all Vaadin development and feature branches from the github page, but if you’d just like to try some of the pre-releases (alphas, betas, feature branch releases), browsing the pre-release repository is an easy way to find all cool new features you could try. And remember to share your findings about experimental things as well via dev.vaadin.com.

Try Vaadin 7.7.0.alpha1 today!

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