Adding Describer Classes should be easy, as I suggest that to be the most agile part in Lalm development for a long time. Generating descriptions is different between languages and there are a lot of strategies to implement the generator, starting from string substitutions up to highly complex Natural Language Generation engines with highly sophisticated grammar assemblers, sentence planning stuff and so on.
Unfortunately Tapestry is developed following a strong mantra: Static Structure, Dynamic Behavior.
In fact that means that a Tapestry template is static, even a component’s template is static and cannot change substantially. It’s possible to hardcode alternatives and use a parameter or some other data source to choose one of them, but every alternative again has to be hardcoded in that template and (!) in the corresponding components java class.
Therefore adding a new describer component involves the following steps:
- implement the describer component’s class.
- add it to the ConfigurableDescriberComponent.java source:
- put it into the describerMap hashmap by extending the initDescriberMap() method.
- inject the block like it’s done with the other blocks
- add the new block to the ConfigurableDescriberComponent.tml
Using the Describer afterwards simply involves setting the configuration value in the lalm.properties file.