The base Niggle API's that abstract away your web app's interaction with page templates. The construct that will be of most interest to the application programmer is the {@link com.revusky.niggle.templates.Page Page} interface. Page is an interface that encapsulates the idea of an HTML page template in which you can embed dynamic data. In particular, via the {@link com.revusky.niggle.templates.Page#expose(java.lang.String,java.lang.Object) expose} methods, one can drop an arbitrarily complex data structure onto the page, consisting of hash, list, and scalar variables. Note that a Niggle data record is converted into a hash-type variable.
The design goal of these classes was that it would be possible to wrap up various page template solutions in this API. As of this writing, there are 2 concrete implementations, one that leverages the Freemarker template engine and another that uses WebMacro.. The Freemarker-based implementation is the default and has been subject to more testing than the one based on WebMacro.