Processors

Templater's architecture is designed to have pluggable data type processors.
For example .NET has ObjectProcessor, EnumerableProcessor, DataTableProcessor, etc. JVM version has ResultSetProcessor, MapProcessor, IterableProcessor, etc. They are used to recognize passed data and act accordingly.

Only what processor can do is call low level API. IterableProcessor calls Resize(Int) and iterates on every item in its collection and call appropriate functionality.
So, when collection is passed to high level API, Templater will find tags from collection element properties, fields and methods. It will resize context which contains all found tags (this can be single or multiple rows in a table, list with its nested sublists, etc).

What's cool about Templater is that it can be used as presentation layer for domain model. Same objects which are used to display values in GUI can probably be used to display report. Templater requires that bindings are specified in tags (for example: [[Items.Product.Name]]).
Since specific processor will be invoked for each binding and part of binding, even with default processors very complex designs can be achieved. With custom processors fine tuning and special cases can be covered too.

Example: Iterable processor

Template screenshot:
Iterable processor - before

Result screenshot:
After processing of this template, tag names are replaced with specialMenu and dailyMenu corresponding properties.

Iterable processor - after


Example: Named range
Template screenshot:
Named range - before

Result screenshot:
The resulting screenshot shows a named range filled with data. In this case, there is only one table created (Group 0). Named range - after



Back to Features