Encodera

Thanks for reading!

Donate to the site — we work hard for you.

Contents

What Vaadin is

Vaadin Flow is a framework for web interfaces written entirely in Java. Buttons, input fields, grids and dialogs are Java objects: you create them in code, add them to the page and attach handlers. You do not write HTML, JavaScript or a REST API — Vaadin draws the interface in the browser and sends the user's actions back to the server.

This approach suits internal systems: admin panels, CRMs, business dashboards. There it matters more to put forms and grids together quickly than to craft a unique design.

How it works

The whole interface lives on the server. The browser loads a small client that shows ready-made web components and forwards events.

  1. The user opens an address, for example /posts.
  2. The server creates the Java object of the screen and its components.
  3. The client in the browser receives a description of the components and draws them.
  4. The user clicks a button, and the client sends the event to the server.
  5. Your Java handler changes the components, and Vaadin sends only the changes to the browser.

The state of every open screen is kept in the session on the server. That is why Vaadin needs no separate API between frontend and backend: a button handler can call a service and save data to the database right away.

Flow and Hilla

Vaadin has two ways to write an interface:

OptionInterface languageWhen to choose it
FlowJavaThe whole team writes Java and needs results fast
HillaReact and TypeScriptThere are frontend developers and a custom design

This course is about Flow. From here on, "Vaadin" means Flow.

Versions in this course

ComponentVersion
Vaadin25.3
Spring Boot4.1
Java25 (Vaadin 25 needs Java 21 or newer)
BuildMaven

Vaadin 25 runs on top of Spring Boot: Spring creates services and repositories, Vaadin creates screens. You do not need to know Spring Boot in advance — everything needed is explained along the way.

What we will build

The running example of the course is a blog admin panel:

  • a list of posts in a grid with sorting, search and inline editing;
  • a form for creating and editing posts with field validation and a cover image upload;
  • a side menu and a header with a log-out button and a language switch (English and Russian);
  • login with a username and password, permissions for the ADMIN and USER roles;
  • background statistics that update the screen;
  • screen tests and a build into a single JAR file.

Common mistake

Beginners try to open a Vaadin page as plain HTML and look for text in the server response:

curl http://localhost:8080/hello

The response holds only a page skeleton with scripts — no labels or buttons. The Vaadin client draws them in the browser after loading. Check screens in the browser or with the tests from the "Finishing the app" chapter, not with curl.

Thanks for reading!

Donate to the site — we work hard for you.