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.
About the demo applications
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.
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.