O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Code Generation in Action

Book Description


Code Generation in Action covers technique and implementation for building high-quality machine-generated code for today's complex applications frameworks. The book includes step-by-step instruction for building dozens of code generators of varying types. These generators build high-quality output that is consistent and maintainable. Code generation abstracts the design of the code so that multiple outputs can be created from a single model of the application functionality, which means development teams can focus on higher-level design work and strategic problems, while still meeting goals for maintaining production applications. The book covers techniques that range from simple code processors that handle common coding problems to more elaborate and complex generators that maintain entire application tiers.


Code Generation in Action covers building database access, user interface, remote procedure, test cases, and business logic code as well as code for other key system functions.

Although code generation is an engineering technique it also has a large impact on the engineering team and management. The book discusses the non-technical justifications for code generation in depth, and offers practical advice for making code generation succeed in any organization.

What's Inside

  • Code generation models

  • Practical examples of database access generation

  • Architectures for generators for all of today's popular technologies

  • Insight into deployment issues

  • Direct examples are provided on a variety of platforms. These include Java/J2EE, Microsoft's ASP and ASP.NET, as well as Open Source solutions such as Perl, Python and PHP.

  • Who can benefit from this book

  • Senior engineers looking for ways to improve their productivity and the quality of their work.

  • Systems architects who want to maintain their design decisions in abstract form and then generate code to match the design.

  • Product Managers and Project Managers who wish to understand the design principles and cultural benefits of code generation techniques.

  • About the author

    Jack Herrington is a software engineer with 20 years of experience developing applications using a diverse set of languages and tools. He has shipped applications from scientific real-time applications to web applications for business. He is an expert in the use of code generation techniques from very simple code maintenance to code generators, which build entire tiers of functionality. The author lives in Union City, California.