Business Logic
In a Vaadin application, views don’t implement business logic themselves. They call application services, which carry out business operations, and define the transaction and security boundaries around them. For the reasoning behind this, see Conceptual Layers.
Start with Add a Service, which shows how to design an application service and call it from a view. The Background Jobs deep dive covers work that runs outside the request of a user, such as long-running operations, scheduled jobs, and follow-up work triggered by events.
To store data, see Persistence. To protect services from unauthorized calls, see Protect Services.
These guides don’t cover caching. To cache the results of service methods, see Cache Abstraction in the Spring Framework documentation, and Caching in the Spring Boot documentation. An in-memory cache exists once per application instance. If you run several instances, each has a cache of its own, as explained in What This Means for Deployment.
Topics
- Add a Service
- Learn how to add an application service to a Vaadin application.
- Background Jobs
- How to handle background jobs.