vaadin / mpr-demo

Demonstrate stepwise migration of Vaadin 8 to Vaadin 13 using MPR (DevDays May / 2019)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mprdemo

This project demonstrates stepwise migration of Vaadin 8 to Vaadin 13 using Multi Platform Runtime product.

The master branch is the Vaadin 8 app.

The migration steps are in branches mpr-x

Step 1

Take MPR into use.

Step 2

Change TabSheet component to Vaadin 13 AppLayout component and refactor UI to wrap Video, Spreadsheet and Chart.

Step 3

Change legacy Chart component to new version.

Workflow

To compile the entire project, run "mvn install".

To run the application, run "mvn jetty:run" and open http://localhost:8080/ .

To produce a deployable production mode WAR:

  • change productionMode to true in the servlet class configuration (nested in the UI class)
  • run "mvn clean package"
  • test the war file with "mvn jetty:run-war"

Client-Side compilation

The generated maven project is using an automatically generated widgetset by default. When you add a dependency that needs client-side compilation, the maven plugin will automatically generate it for you. Your own client-side customizations can be added into package "client".

Debugging client side code

  • run "mvn vaadin:run-codeserver" on a separate console while the application is running
  • activate Super Dev Mode in the debug window of the application

Developing a theme using the runtime compiler

When developing the theme, Vaadin can be configured to compile the SASS based theme at runtime in the server. This way you can just modify the scss files in your IDE and reload the browser to see changes.

To use the runtime compilation, open pom.xml and comment out the compile-theme goal from vaadin-maven-plugin configuration. To remove a possibly existing pre-compiled theme, run "mvn clean package" once.

When using the runtime compiler, running the application in the "run" mode (rather than in "debug" mode) can speed up consecutive theme compilations significantly.

It is highly recommended to disable runtime compilation for production WAR files.

Using Vaadin pre-releases

If Vaadin pre-releases are not enabled by default, use the Maven parameter "-P vaadin-prerelease" or change the activation default value of the profile in pom.xml .

About

Demonstrate stepwise migration of Vaadin 8 to Vaadin 13 using MPR (DevDays May / 2019)


Languages

Language:Java 87.6%Language:SCSS 12.4%