Code Generation with Templates

  • Jeroen Arnoldus
  • Mark van den Brand
  • A. Serebrenik
  • J.J. Brunekreef
Part of the Atlantis Studies in Computing book series (ATLANTISCOMP, volume 1)

Table of contents

  1. Front Matter
    Pages i-ix
  2. Jeroen Arnoldus, Mark van den Brand, A Serebrenik, JJ Brunekreef
    Pages 1-18
  3. Jeroen Arnoldus, Mark van den Brand, A Serebrenik, JJ Brunekreef
    Pages 19-34
  4. Jeroen Arnoldus, Mark van den Brand, A Serebrenik, JJ Brunekreef
    Pages 35-49
  5. Jeroen Arnoldus, Mark van den Brand, A Serebrenik, JJ Brunekreef
    Pages 51-92
  6. Jeroen Arnoldus, Mark van den Brand, A Serebrenik, JJ Brunekreef
    Pages 93-110
  7. Jeroen Arnoldus, Mark van den Brand, A Serebrenik, JJ Brunekreef
    Pages 111-135
  8. Jeroen Arnoldus, Mark van den Brand, A Serebrenik, JJ Brunekreef
    Pages 137-189
  9. Jeroen Arnoldus, Mark van den Brand, A Serebrenik, JJ Brunekreef
    Pages 191-195
  10. Back Matter
    Pages 197-204

About this book

Introduction

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.

 

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

Keywords

Code Generation Model driven engineering Programming languages Syntax safety Templates

Authors and affiliations

  • Jeroen Arnoldus
    • 1
  • Mark van den Brand
    • 2
  • A. Serebrenik
    • 3
  • J.J. Brunekreef
    • 4
  1. 1.Technische Universiteit EindhovenEindhovenNetherlands
  2. 2.Eindhoven University of TechnologyEindhovenNetherlands
  3. 3.Technical University of EindhovenEindhovenNetherlands
  4. 4.EindhovenNetherlands

Bibliographic information

  • DOI https://doi.org/10.2991/978-94-91216-56-5
  • Copyright Information ATLANTIS PRESS 2012
  • Publisher Name Atlantis Press, Paris
  • eBook Packages Mathematics and Statistics
  • Print ISBN 978-94-91216-55-8
  • Online ISBN 978-94-91216-56-5
  • Series Print ISSN 2212-8557
  • Series Online ISSN 2212-8565