posted 10 years ago
Templating languages help you define a skeleton structure of a file. The structure will have static and dynamic aspects. The dynamic aspect can be added at runtime. For example, velocity can be used to generate a Java source file which implements DAO pattern. Instead of hand coding the DAO for each persistent object. One would use a templating language to define the skeleton of the DAO and add the table specific part in it at runtime.