Code generation with templates

B.J. Arnoldus, M.G.J. Brand, van den, A. Serebrenik, J.J. Brunekreef

Research output: Book/ReportBookAcademic

Abstract

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
LanguageEnglish
Place of PublicationAmsterdam
PublisherAtlantis Press
ISBN (Electronic)9789491216565
ISBN (Print)978-94-91216-55-8
DOIs
StatePublished - 2012

Publication series

NameAtlantis studies in computing
Volume1
ISSN (Print)2212-8557

Fingerprint

Engines
Code generation

Cite this

Arnoldus, B. J., Brand, van den, M. G. J., Serebrenik, A., & Brunekreef, J. J. (2012). Code generation with templates. (Atlantis studies in computing; Vol. 1). Amsterdam: Atlantis Press. DOI: 10.2991/978-94-91216-56-5
Arnoldus, B.J. ; Brand, van den, M.G.J. ; Serebrenik, A. ; Brunekreef, J.J./ Code generation with templates. Amsterdam : Atlantis Press, 2012. (Atlantis studies in computing).
@book{9ae2f829db7d4233bdf77953d5055637,
title = "Code generation with templates",
abstract = "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",
author = "B.J. Arnoldus and {Brand, van den}, M.G.J. and A. Serebrenik and J.J. Brunekreef",
year = "2012",
doi = "10.2991/978-94-91216-56-5",
language = "English",
isbn = "978-94-91216-55-8",
series = "Atlantis studies in computing",
publisher = "Atlantis Press",
address = "Netherlands",

}

Arnoldus, BJ, Brand, van den, MGJ, Serebrenik, A & Brunekreef, JJ 2012, Code generation with templates. Atlantis studies in computing, vol. 1, Atlantis Press, Amsterdam. DOI: 10.2991/978-94-91216-56-5

Code generation with templates. / Arnoldus, B.J.; Brand, van den, M.G.J.; Serebrenik, A.; Brunekreef, J.J.

Amsterdam : Atlantis Press, 2012. (Atlantis studies in computing; Vol. 1).

Research output: Book/ReportBookAcademic

TY - BOOK

T1 - Code generation with templates

AU - Arnoldus,B.J.

AU - Brand, van den,M.G.J.

AU - Serebrenik,A.

AU - Brunekreef,J.J.

PY - 2012

Y1 - 2012

N2 - 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

AB - 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

UR - http://www.springerlink.com/openurl.asp?genre=book&isbn=978-94-91216-56-5

U2 - 10.2991/978-94-91216-56-5

DO - 10.2991/978-94-91216-56-5

M3 - Book

SN - 978-94-91216-55-8

T3 - Atlantis studies in computing

BT - Code generation with templates

PB - Atlantis Press

CY - Amsterdam

ER -

Arnoldus BJ, Brand, van den MGJ, Serebrenik A, Brunekreef JJ. Code generation with templates. Amsterdam: Atlantis Press, 2012. (Atlantis studies in computing). Available from, DOI: 10.2991/978-94-91216-56-5