Skip to content

graniteds-tutorials/graniteds-tutorial-data

Repository files navigation

GraniteDS Data Tutorial

This tutorial shows how to build a simple data application that manages a database of user accounts. All connected clients are notified and synchronized with data updates using a GraniteDS long polling channel.

How to use this tutorial

GraniteDS integrates various client and server technologies, thus its actual use somehow depends on which of these technologies you will be using. This tutorial includes most of the combinations supported by GraniteDS, so first you will have to build and generate the documentation for your technologies of choice.

You will need a few tools to use this tutorial:

The first step is to clone this git repository from the command line:

git clone http://github.com/graniteds-tutorials/graniteds-tutorial-data.git

NOTE:

Next cd in the tutorial folder and build the project and tutorial document (see next section for other options):

cd graniteds-tutorial-data

mvn clean install asciidoctor:process-asciidoc -Dserver=spring -Dclient=javafx

Finally, each time you launch one of the above build, a dedicated documentation is generated in target/docs/graniteds-tutorial-data.html. Refer to this document to know how to run the sample application and how its source code is designed.

Available Server / Client Configurations

The available options for the server are:

  • spring

  • ejb

  • cdi

The available options for the client are:

  • javafx

  • flex

  • air

All available builds are listed below:

JavaFX Client
mvn clean install asciidoctor:process-asciidoc -Dserver=spring -Dclient=javafx
mvn clean install asciidoctor:process-asciidoc -Dserver=ejb -Dclient=javafx
mvn clean install asciidoctor:process-asciidoc -Dserver=cdi -Dclient=javafx
Flex Client
mvn clean install asciidoctor:process-asciidoc -Dserver=spring -Dclient=flex
mvn clean install asciidoctor:process-asciidoc -Dserver=ejb -Dclient=flex
mvn clean install asciidoctor:process-asciidoc -Dserver=cdi -Dclient=flex
Air Client
mvn clean install asciidoctor:process-asciidoc -Dserver=spring -Dclient=air
mvn clean install asciidoctor:process-asciidoc -Dserver=ejb -Dclient=air
mvn clean install asciidoctor:process-asciidoc -Dserver=cdi -Dclient=air