Vaadin 25 migration skills

I was delighted to discover the official Vaadin Skills repository

This once again demonstrates how the team at Vaadin recognises the signs of the times and keeps us developers supplied with the latest ‘hot stuff’. Especially given that the maintenance phase for Vaadin 24 is coming to an end and the transition to Vaadin 25 is underway – with some features being deprecated – perhaps it would be a good idea to make a few additional migration skills available? From my own experience in my projects, I know that, for example, the switch to the new upload/download handlers is a somewhat tedious but necessary task that can be easily automated. Is this an idea that could be taken up by the official Vaadin team?

Kid regards
Dominik

3 Likes

That would be very useful. I can imagine some OpenRewrite recipes. They can probably be downloaded via the Vaadin MCP server I guess.

I used the file mentioned below (sorry for German) as a kind of migration-skill.md yesterday. I migrate 95% of an ERP app with this comments. The remaining stuff was LoginForm (again :see_no_evil: migrate from LoginOverlay due to Password Manager issues etc) and some 3rd party components with customized JS methods (e.g. FullCalendar)

---
name: vaadin-migration-25
---

# Was muss alles angepasst werden ?

- pom.xml
- DonwloadHandler
- Upload
- elemental.json auf Jackson 3 update
- Jackson 3 ohne try /catch da alle json Exception unchekced RuntimeExceptions sind
- SecurityConfiguration
- grid column setClassNameGenerator auf setPartNameGenerator (incl. Umstellung in den CSS files)
- Verzeichnisse der Vaadin Frontend Artefakte
- Styling & Theming
- vaadin-dev-server

Berücksichtige folgende Upgrade- und Migration Guides:

- https://vaadin.com/docs/latest/upgrading
- https://github.com/stefanuebe/vaadin-fullcalendar/wiki/Migration-guide-6.x-to-7.x
- https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-4.0-Migration-Guide



## pom.xml
vaadin 25.1.3
spring boot 4.0.4
Lombok 1.18.42

## Downloadhandler

- Anchor mit StreamResource ist deprecated und sollte nicht mehr genutzt werden
- statdessen soll der neue DownloadHandler.-Mechanismus genutzt werden, 
- siehe https://vaadin.com/docs/latest/flow/advanced/downloads

## Vaadin Upload Component

- migriere die Vaadin Upload component

## JSON migration
- migriere von Elemental JSON auf Jackson 3
- entferne ggf. try/catch Blöcke um Jackson2 Json-Exceptions, da in Jackson3 diese alle unchecked Runtieexceptions geworden sind
- entferne einfach die Statements im catch() Block dieser jackson-2-Exceptions ohne weitere Änderungen

## SecurityConfigutaion

## setClassNameGenerator
- migriere die Verwednung von Vaadin Grid Column Methode 'setClassNameGenerator' auf die neue 'setPartNameGenerator'
- ändere für alle Stellen, an denen auf diesem Weg eine CSS Klasse referenziert wird, auch die Definition im CSS File auf Part
- beachte ALLE css files im frontend Folder


## Verzeichnisse mit Frontend Artefakte
- nutze die neue Verzeichnis Struktur unter src/main/frontend wie im Vaadin Upgrade Guide angegeben

## Styling und Theming
- migriere auf die Verwednung der neuen @StyleSheet annotationen, vermeide das alte @Theme 
- kopiere die referenzierten Files an die richtigen neuen Verzeichnisse

## Vaadin Dev Server
- füge die flg. dependency der pom.xml hinzu

<dependency>
    <groupId>com.vaadin</groupId>
    <artifactId>vaadin-dev</artifactId>
    <optional>true</optional>
</dependency>

AI is more effective when you write everything in english btw.