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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset