What is this book about?
The technique of code generation, its purpose
and real world application.
What is code generation?
Code generation is the technique of building
and using programs to write other programs. A
concrete example is using a code generator to
build database access code or remote proce-
dure layers. The central idea is to create consis-
tent and high quality code more quickly.
Who is this book written for?
Software engineers or architects at any level of
experience. Project and engineering managers
can also benefit from reading the first part of the
book that presents code generation within a
larger context.
What is exciting about code
generation?
Code generation is a technique akin to design
patterns, extreme programming or object-
oriented design. Used properly it can funda-
mentally change the way that you produce
code to make you more productive. Under-
standing code generation will make you a
better engineer.
Is code generation a product?
There are wide variety of code generators avail-
able commercially or as open source. This
book provides references to those tools and
scenarios of their use. However, the fundamen-
tal intent of the book is to teach code genera-
tion techniques and then cover their
application.
Why should I learn about code
generation?
Reading the book from cover to cover will
teach you everything you need to know to
build and/or use code generators effectively in
your development.
Does this book cover code generation
for my language?
Code generation is a technique that can be
applied to any computer language. The book
tends to center itself around Java but does pro-
vide a great deal of information for Perl,
Python, C, C++ and other languages.
This is not a Java book. It is a book that
teaches a techniques and the application of
that technique to solve real world problems. It
is a valuable resource for any software engineer
regardless of his choice of implementation
language.
Does this book cover code generation
for my architecture?
A code generator is most easily likened to
another set of hands, so it’s important to
understand where those hands are applied in
the overall architecture of your code. For
that reason we cover a wide range of techni-
cal architectures and provide high level and
low level generation solutions for those
architectures.
How is the book organized?
The book is divided into two parts. The first
part covers the fundamentals of the code gen-
eration technique. It covers what generators
do, how they are applied, and how they fit into
the development flow. It finishes by presenting
some small generators that you can use as start-
ing points.
The second part of the book covers practical
application of code generation to build various
types of code such as database access, user inter-
face, unit tests, and web services.
inside front cover_2col.fm Page 3 Monday, July 7, 2003 1:16 PM
inside back cover.fm Page 3 Monday, July 7, 2003 1:34 PM
Code Generation in Action