Scientific articles and reports for code generator engineers.

Templates are used to generate all kinds of text, including computer code. The last decade, the use of templates gained a lot of popularity due to the increase of dynamic web applications. Templates are a tool for programmers, and implementations of template engines are most times based on practical experience rather than based on a theoretical background.

Code Generation with Templates This book reveals the mathematical background of templates and shows interesting findings for improving the practical use of templates.

First, a framework to determine the necessary computational power for the template metalanguage is presented. The template metalanguage does not need to be Turing-complete to be useful. A non-Turing-complete metalanguage enforces separation of concerns between the view and model.

Second, syntactical correctness of all languages of the templates and generated code is ensured. This includes the syntactical correctness of the template metalanguage and the output language. Third, case studies show that the achieved goals are applicable in practice. It is even shown that syntactical correctness helps to prevent cross-site scripting attacks in web applications.

The target audience of this book is twofold. The first group exists of researcher interested in the mathematical background of templates. The second group exists of users of templates. This includes designers of template engines on one side and programmers and web designers using templates on the other side.

Where to obtain: Amazon, Springer

Arnoldus, B. J. and van den Brand, M. G. J. and Serebrenik, A. and Brunekreef, J.J., “Code Generation with Templates”, in Atlantis Press, 2012
Arnoldus, B. J. and van den Brand, M. G. J. and Serebrenik, A., “Less is more: unparser-completeness of metalanguages for template engines”, in Proceedings of the 10th ACM international conference on Generative programming and component engineering, 2011
Arnoldus, B. J., “An Illumination of the Template Enigma: Software Code Generation with Templates”, in PhD Thesis, 2010
Arnoldus, B. J. and Bijpost, J. W. and van den Brand, M. G. J., “Repleo: a Syntax-Safe Template Engine”, in GPCE '07: Generative Programming and Component Engineering, 2007
Arnoldus, B. J. and Gresnigt, J. and Grosskop, K. and Visser, J., “Energy-Efficiency Indicators for e-Services”, in Proceedings of the 2th Workshop on Green and Sustainable Software, 2013
Arnoldus, B. J. and Visser, J., “Voorkom onzichtbare verspilling: energiebehoefte van software”, in Informatie, 2012
Visscher, W. and Kats, J. and Terwijn, B. and Arnoldus, B. J. and van den Berg, D., “Metaforen in requirements engineering: Metaforen hulpmiddel bij communicatie over it.”, in Informatie, 2005