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)

About the demo applications

This book offers value in two ways: the book itself with its explanations, and its companion source code. Instead of developing one single application throughout the book, several small demo applications demonstrate the concepts explained in each chapter. This helps you to jump to any chapter you are interested in, and fully understand the purpose of each part of the code without worrying about the technicalities that we have looked at in other chapters.

Understanding the source code

Before you compile the project, you have to start an H2 database instance. For your convenience, a server is configured in the Data-centric-Applications-with-Vaadin-8/chapter-05 Maven module. You can create a run configuration for the following Maven command or you can run it directly on the command line:

cd Data-centric-Applications-with-Vaadin-8/chapter-05
mvn test exec:java -Dexec.mainClass="packt.vaadin.datacentric.chapter05.jdbc.H2Server"

Once the database is up and running, you can build all the demo applications by executing the following:

cd Data-centric-Applications-with-Vaadin-8
mvn install

All the demo applications are aggregated in a multi-module Maven project, where each module corresponds to one chapter of the book.

This book assumes that you are proficient enough with Maven to follow the example applications of each chapter. If you have no previous experience with Maven or multi-module Maven projects, please spend some time going through the tutorials and documentation at: http://maven.apache.org/guides.

Each chapter's module may contain multiple sub-modules depending on the concepts being explained in that chapter. We will use the Jetty Maven plugin to run the examples. Most IDEs today have good support for Maven. The best way to use this book's code is by importing the Data-centric-Applications-with-Vaadin-8 Maven project into your IDE and creating individual running configurations for each demo application. There are tons of resources online that explain how to do this for the most popular IDEs, such as IntelliJ IDEA, NetBeans, and Eclipse. For example, to run the example application for this chapter in IntelliJ IDEA, create a new running configuration like the following:

Make sure the working directory corresponds to the correct module in the project. Alternatively, you can run the application by executing the following on the command line:

cd Data-centric-Applications-with-Vaadin-8/chapter-01
mvn package jetty:run

This executes the package Maven phase and starts a Jetty server. The application should be available at http://localhost:8080.

So, go ahead! Download the source code, import it into your IDE, and run a couple of examples. Feel free to explore the code, modify it, and even use it in your own projects.