Jigsaw Advent Calendar
The code is released into the public domain via CC0 so it can be used without any limitations.
The Advent Calendar
Even though I do my best to ignore the whole christmas kerfuffle, it seemed prudent to have the demo uphold "the spirit of the season". So it models an advent calendar:
- There is a
Calendar, which has 24
- Each sheet knows its day of the month and contains a
- The death march towards Christmas is symbolized by printing the sheets (and thus the surprises) to the console.
Of course the calendar needs to be created first.
It can do that by itself but it needs the means to create surprises.
To this end it requires a
The demo consists of several sections, each building on the previous ones. There is a branch for each section.
0️⃣Before Jigsaw: describes the application's organization before Jigsaw 1️⃣Creating A Module: moves the application into Jigsaw land by moving it into a single module 2️⃣Splitting Into Modules: explores more of Jigsaw's core features by splitting the application into several modules 3️⃣Services: introduces services and the
ServiceLocatorfor loose coupling between modules
4️⃣Automatic Modules: shows how modules can depend on non-modularized JARs 5️⃣Optional Dependencies: demonstrates dependencies that are mandatory at compile time but are not required at run time
This demo (obviously) requires Java 9.
For it to work the Java 9 variants of
java must be available on the command line via
java9, e.g. by symlinking them.
The root directory contains a
compileAndRun.sh, which - surprise - compiles and runs the example.