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 MyBatis

MyBatis is a persistence framework that maps SQL to Java objects. The MyBatis learning curve is flatter than JPA's and leverages on SQL, which makes it a good match if you have good knowledge about SQL or have many complex SQL queries you want to reuse.

As usual, you first need to add the dependency. Here is how to do it with Maven:

<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.4.5</version>
</dependency>

You can find the full implementation of the example developed in this section in the Data-centric-Applications-with-Vaadin-8/chapter-06/mybatis-example Maven project.

Defining a database connection

...