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.
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:
-
A Git client (download here),
-
JDK 7 (download here),
-
Maven 3 (download here).
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.
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:
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
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