Book Image

Data-Centric Applications with Vaadin 8

By : Alejandro Duarte
Book Image

Data-Centric Applications with Vaadin 8

By: Alejandro Duarte

Overview of this book

Vaadin is an open-source Java framework used to build modern user interfaces. Vaadin 8 simplifies application development and improves user experience. The book begins with an overview of the architecture of Vaadin applications and the way you can organize your code in modules.Then it moves to the more advanced topics about advanced topics such as internationalization, authentication, authorization, and database connectivity. The book also teaches you how to implement CRUD views, how to generate printable reports, and how to manage data with lazy loading. By the end of this book you will be able to architect, implement, and deploy stunning Vaadin applications, and have the knowledge to master web development with Vaadin.
Table of Contents (11 chapters)

Connecting to SQL databases using JPA

The first thing you need to know about the JPA is that it is a specification, not an implementation. There are several implementations, Hibernate and EclipseLink arguably being the most popular ones. In this book, we'll use Hibernate. The other things you need to learn about JPA are better learned by coding! Let's see how to create a simple Vaadin application that shows a Grid with the messages in the database.

What do you think is the first thing you need to do to start using JPA, or more specifically, Hibernate? It's, of course, adding the dependencies. Create a Vaadin project and add the following dependencies to your pom.xml file:

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.2.10.Final</version>
</dependency>
You can...