Skip to main content
  • Book
  • © 2012

Code Generation with Templates

  • There is no fundamental literature on the topic of (web) templates The book shows the fundamental properties and languages of templates Two case-studies show improvement of separation of concerns and re-use by using a two-stage architecture based on templates instead of a single stage implementation Syntax-safe templates prevent cross-site scripting by means of compact grammar definitions
  • Includes supplementary material: sn.pub/extras

Part of the book series: Atlantis Studies in Computing (ATLANTISCOMP, volume 1)

Buy it now

Buying options

eBook USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book USD 109.00
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book USD 109.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Other ways to access

This is a preview of subscription content, log in via an institution to check for access.

Table of contents (8 chapters)

  1. Front Matter

    Pages i-ix
  2. Introduction

    • Jeroen Arnoldus, Mark van den Brand, A Serebrenik, JJ Brunekreef
    Pages 1-18
  3. Preliminaries

    • Jeroen Arnoldus, Mark van den Brand, A Serebrenik, JJ Brunekreef
    Pages 19-34
  4. The Unparser

    • Jeroen Arnoldus, Mark van den Brand, A Serebrenik, JJ Brunekreef
    Pages 35-49
  5. The Metalanguage

    • Jeroen Arnoldus, Mark van den Brand, A Serebrenik, JJ Brunekreef
    Pages 51-92
  6. Syntax-Safe Templates

    • Jeroen Arnoldus, Mark van den Brand, A Serebrenik, JJ Brunekreef
    Pages 93-110
  7. Repleo: Syntax-Safe Template Evaluation

    • Jeroen Arnoldus, Mark van den Brand, A Serebrenik, JJ Brunekreef
    Pages 111-135
  8. Case Studies

    • Jeroen Arnoldus, Mark van den Brand, A Serebrenik, JJ Brunekreef
    Pages 137-189
  9. Conclusions

    • Jeroen Arnoldus, Mark van den Brand, A Serebrenik, JJ Brunekreef
    Pages 191-195
  10. Back Matter

    Pages 197-204

About this book

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

Authors and Affiliations

  • Technische Universiteit Eindhoven, Eindhoven, Netherlands

    Jeroen Arnoldus

  • Eindhoven University of Technology, Eindhoven, Netherlands

    Mark van den Brand

  • Technical University of Eindhoven, Eindhoven, Netherlands

    A. Serebrenik

  • Eindhoven, Netherlands

    J.J. Brunekreef

Bibliographic Information

  • Book Title: Code Generation with Templates

  • Authors: Jeroen Arnoldus, Mark van den Brand, A. Serebrenik, J.J. Brunekreef

  • Series Title: Atlantis Studies in Computing

  • DOI: https://doi.org/10.2991/978-94-91216-56-5

  • Publisher: Atlantis Press Paris

  • eBook Packages: Mathematics and Statistics, Mathematics and Statistics (R0)

  • Copyright Information: ATLANTIS PRESS 2012

  • Hardcover ISBN: 978-94-91216-55-8Published: 23 May 2012

  • Softcover ISBN: 978-94-6239-052-2Published: 12 June 2014

  • eBook ISBN: 978-94-91216-56-5Published: 22 May 2012

  • Series ISSN: 2212-8557

  • Series E-ISSN: 2212-8565

  • Edition Number: 1

  • Number of Pages: IX, 204

  • Number of Illustrations: 98 b/w illustrations, 2 illustrations in colour

  • Topics: Software Engineering, Programming Techniques, Computer Science, general

Societies and partnerships

Buy it now

Buying options

eBook USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book USD 109.00
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book USD 109.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Other ways to access