Have one to sell? Sell yours here
Tell the Publisher!
I'd like to read this book on Kindle

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.
Sorry, this item is not available in
Image not available for
Color:
Image not available

To view this video download Flash Player

 

Code Generation in Action [Paperback]

Jack Herrington D.
4.1 out of 5 stars  See all reviews (21 customer reviews)


Available from these sellers.


Shop the new tech.book(store)
New! Introducing the tech.book(store), a hub for Software Developers and Architects, Networking Administrators, TPMs, and other technology professionals to find highly-rated and highly-relevant career resources. Shop books on programming and big data, or read this week's blog posts by authors and thought-leaders in the tech industry. > Shop now

Book Description

July 1, 2003 In Action
Covering technique and implementation for building code for complex applications frameworks, this book demonstrates how to build high-quality output that is consistent and maintainable. Lessons on abstracting the design of the code so that multiple outputs can be created from a single abstract model of the application functionality are provided. Techniques that range from using simple code processors to handle common coding problems to creating more elaborate and complex generators that maintain entire application tiers are covered. Topics such as building database access, user interface, remote procedure, test cases, and business logic code are also addressed, as is code for other system functions. Although code generation is an engineering technique, it also has an impact on engineering teams and management, an aspect of code generation that is covered in depth in this resource.


Editorial Reviews

About the Author

Jack Herrington is an engineer, author and presenter who lives and works in the Bay Area. His mission is to expose his fellow engineers to new technologies. That covers a broad spectrum, from demonstrating programs that write other programs in the book Code Generation in Action. Providing techniques for building customer centered web sites in PHP Hacks. All the way writing a how-to on audio blogging called Podcasting Hacks. All of which make great holiday gifts and are available online here, and at your local bookstore. Jack also writes articles for O'Reilly, DevX and IBM Developerworks.

Jack lives with his wife, daughter and two adopted dogs. When he is not writing software, books or articles you can find him on his bike, running or in the pool training for triathlons. You can keep up with Jack's work and his writing at http://jackherrington.com.


Product Details

  • Paperback: 368 pages
  • Publisher: Manning Publications; Revised edition (July 1, 2003)
  • Language: English
  • ISBN-10: 1930110979
  • ISBN-13: 978-1930110977
  • Product Dimensions: 7.4 x 0.8 x 9.1 inches
  • Shipping Weight: 1.4 pounds
  • Average Customer Review: 4.1 out of 5 stars  See all reviews (21 customer reviews)
  • Amazon Best Sellers Rank: #633,054 in Books (See Top 100 in Books)

More About the Authors

Discover books, learn about writers, read author blogs, and more.

Customer Reviews

Schema Oriented Code Generation is a practical approach to code generation. Zen Micro User  |  6 reviewers made a similar statement
Most Helpful Customer Reviews
10 of 10 people found the following review helpful
Format:Paperback
The writing is precise and clear with annotated examples everywhere. Positioning and justification of various techniques is very compelling.

The author's classification of various forms of active code generation clearly elucidates the potential of Code Generation. Usage of templates for code generation is an excellent suggestion. Explanations on various code snippets and regex macros are simply second to none. Chapters 3, 4, 5 and 10 are a must read for every developer.

Having implemented a large-scale database conversion from IDMS to DB2 (schema, data dictionary, run time and programs) using home grown automated generators in the past, I really enjoyed reading Chapter 10. I completely agree with the assertions made there and I am impressed by the way the author addresses common concerns. This chapter documents a practical approach to ease the burden of writing repetitive code for code heavy frameworks. Schema Oriented Code Generation is a practical approach to code generation. I also find various references in this Chapter and others extremely valuable.

The author has shown that with sufficient metadata about a system, a significant portion of the repetitive coding tasks relating to data access, user interface, test and documentation can be automated in a consistent manner using custom code generators.

It is refreshing to see code snippets in Ruby. The author's selection of Ruby becomes self evident after reading the various code snippets.

I find this to be a very compelling book and a must have for architects and seasoned developers!

Comment | 
Was this review helpful to you?
10 of 12 people found the following review helpful
5.0 out of 5 stars Finally a dedicated book on the subject November 29, 2003
Format:Paperback|Amazon Verified Purchase
I embraced code generators long time ago, so I was more than happy to finally found a dedicated book on the subject, since this is almost unexplored topic. The author clearly has a solid understanding of the topic, and manages to deliver a compelling book, with an excellent flow, where each chapter builds on previous concepts and ideas.
All the code snippets and regular expression samples are explained in a very clean, detailed way. I was pleased to see that many examples were non-trivial, covering concrete, real world, implementations. Herrington uses Ruby as an implementation language; you may like it or not, but what really matters here are the concepts, not the syntax and even if you don't know Ruby (like me), you will find the code pretty easy to follow.
Comment | 
Was this review helpful to you?
37 of 51 people found the following review helpful
1.0 out of 5 stars Poor choice of tools; code not very useful December 17, 2004
Format:Paperback|Amazon Verified Purchase
I have been doing language parsing and generation in C for several years: English, French, Japanese, Chinese, Korean. Still, I hoped to learn something new from CGIA for Java. I was disappointed. I think the book misdirects the reader away from more effective solutions into less productive paths.

The book suffers from two problems. (1) the regular expression technology proposed is inappropriate (2) the exercises provided are not rich enough to be useful.

I have no objection to scripting languages. I have happily used bash, gawk, python/Jpython and php. I avoided perl because I was struck by its lack of readability and writability. Ruby is no better and no worse than many scripting languages, but the documentation and error messages leave very much to be desired. CGIA offers almost nothing in the way of real help with the language. It took me some time to figure out how to install the libraries properly and debugging was a nightmare! Ruby's regular expression language is yet another variation in the regex language Babel. This is not something I would foist on developers in my organization. Especially when there are much better alternatives.

For years I have been using lex (flex actually) in C for code generation and human language processing. (I have never had much use for YACC/Bison.) When I switched to Java, I found an excellent flex equivalent called JFlex (http://jflex.de/).

JFlex.jar is around 240K. The regular expression language for JFlex is extremely close to that of lex and gawk. It is much more readable and modular than that of ruby, perl, etc. Your Java programmers and maintainers need not learn a new language or download/install/configure an additional 28 MB of libraries. Even better, they can use JFlex in runtime production code, since it produces compiled FSA's which are orders of magnitude faster than an interpreted regex processor like ruby.

Additionally, you can get with lex/flex/JFlex full grammars for C++ and Java, not the superficial variable reader that came with CGIA. And the debugging mode, while not perfect, is quite usable. (There are commercial visual tools for debugging flex grammars, if you need and can afford them.)

From the code point of view, I found nothing usable in CGIA. In my judgment most of the examples were more suited to the classroom than to work, and the solutions presented were often not competitive with alternatives. On the theory/fundamentals side the book does not contribute much to the the understanding of language parsing or generation issues.

The arguments for using code generation are cogent. But if you want to use a more useful, popular, constantly evolving (but equally poorly documented) code generation system, go for XDoclet.

My recommendation: skip CGIA. Spend your time and money learning flex/JFlex for parsing and XDoclet for generating and you will be much better off. If you want theory, sink your teeth into something like the "Dragon" classic (Aho & Ullman).
Was this review helpful to you?
Most Recent Customer Reviews
1.0 out of 5 stars Useless
Two problems with this book:

1. The language -- Ruby -- is a strange choice. I've been writing and using code generators, in some form, for decades; I've used mmm... Read more
Published on February 23, 2007 by J Jacob Jingleheimer Schmidt
5.0 out of 5 stars Reader with another perspective
Prospective buyers that are discouraged by some of the negative reviews may be encouraged by a perspective I have gained from writing code that writes code:

--I find it... Read more
Published on August 19, 2005 by Dan Conroy
5.0 out of 5 stars Excellent for Java Developers!
This is the first book I found that looked worth purchasing on the topic of Code Generation. I live and breathe in the Java World, and this particular subject is increasingly... Read more
Published on January 9, 2005 by Danilo Gurovich
5.0 out of 5 stars The Code Generation Bible
Essential reading for anyone interested in learning about code generation - written by one of the world's leading code generation gurus.
Published on September 14, 2004 by PJ Murray
4.0 out of 5 stars A good introduction to meta-programming.
I had already written a few code generators when I saw this book and was hoping to find some insights into improving and extending what I had already done. Read more
Published on July 26, 2004 by Mike
3.0 out of 5 stars Ultimately Disappointing
There are things I like about this book, and the topic is certainly timely, but this falls down the same rabbit hole many books do: the examples are just paltry and do not add up... Read more
Published on March 1, 2004 by R. Williams
4.0 out of 5 stars Great introductory material on code generation
The introduction and motivation are quite compelling, though a bit more detail on the dismissal of passive code generators (i.e. Read more
Published on December 21, 2003 by Lars Bergstrom
2.0 out of 5 stars Not very useful when the examples are written in RUBY!!
There's a lot of why and what but almost no "how" here, unless you want to learn a language called Ruby. He doesn't even give much in the way of Ruby code, either. Read more
Published on December 12, 2003 by Robert H. Ruff
5.0 out of 5 stars Excellent work!
I'm interested in code generation. Currently I started a project to generate different types of code (Java, HTML, EJB Descriptors, Database schema, etc.. Read more
Published on December 10, 2003 by Giuseppe Naccarato
5.0 out of 5 stars Avoiding common mistakes to generate high-quality code
Expertly written by Jack Herrington (a software developer of twenty years' experience), Code Generation In Action is a competent and "user friendly" guidebook and... Read more
Published on November 13, 2003 by Midwest Book Review
Search Customer Reviews
Only search this product's reviews


Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

Forums

There are no discussions about this product yet.
Be the first to discuss this product with the community.
Start a new discussion
Topic:
First post:
Prompts for sign-in
 



So You'd Like to...


Create a guide


Look for Similar Items by Category