Initially published on Gantthead.com October 17, 2005.
On a four-month
project early this year, Headstrong, Inc., a global consulting company,
increased productivity more than fivefold using code generation software on a
project for one of its top clients1.
results such as Headstrong's are not unusual with code generation. "Model-driven
code generation streamlines the product development cycle in a big way," says
Jack Herrington, owner of the Code Generation Network portal. "It drastically
cuts the defect count. And it cuts way down on the time it takes to implement a
It is a
technology which has been available since the days of COBOL and mainframes, but
developers have been slow to take it up. An informal poll
on the AngryCoder.com website revealed that only 43 percent of the
developers sampled used the code generation in previous projects.
The fact that the
makers of code generation tools have been slow to update their products to match
rapidly changing technology may be one reason developers have so often ignored
code generation and its potential for increased productivity and decreased
defect counts. However, code generation may be coming into its own
Gartner, code generation based tools "allow organizations to be at least 40
percent more productive" and the market will grow with at least a 30 percent
annual compound rate through 20082.
This article will
examine improvements which make this technology a better bet than ever before
and discuss which projects can benefit most from code generation and
are the best candidates for code generation are:
these criteria are simple to generate due to the repetitious nature of the code.
Resource management applications are a good example. They track resources,
skills, certifications, training, projects and staffing and contain some
reporting functionality (e.g. "which resources are available that match my
needs?"). Their strong CRUD-based, database I/O focus makes them ideal
suited for code generation:
these criteria are more difficult to generate due to their complexity and the
non-repetitious nature of their code. Portfolio management applications are a
good example. They contain: advanced reporting such as complex calculations in
rollup spotlight reports; workflow such as the approval process for
rebase-lining budgets or schedules; and security, such as disallowing viewing of
certain portfolios for certain users. Projects of this sort will always gain
some benefit from code generation, however, because it provides a foundation of
code upon which to build.
"I'd say you
could get at least 50 percent time savings, even on a project that is heavily
business rule centric," says Ankush Tewari, Headstrong senior consultant. "Just
getting the CRUDs out there would probably save half the time."
Time savings is
the most valuable and measurable benefit of code generation. Other benefits
decreases a project's defect count because generated code is more consistent and
less error prone than hand-written code. Customer satisfaction can be increased
because code generation provides the ability to generate prototypes during
design, which allow customers immediate visual feedback regarding their
application prior to development. Increased project predictability comes with
the standardization that a code generator provides and can additionally lead to
decreased maintenance cost. The final benefit is a decrease in delays due to
data model changes, which often require a significant amount re-work due to last
minute requirement changes.
drawback is the increased learning curve associated with learning a new
tool--and potentially a new architecture and new coding standards. A quality
Commercial off-the-shelf (COTS) code generator can help mitigate this through an
array of pre-implemented best practices and architectures.
can make it so easy to generate code that more code is generated than is
necessary; code bloat is the result. This increases complexity and maintenance
costs and potentially degrades application performance. Bloat can be minimized
with thorough product evaluations since some COTS code generators are better
When used on the
right project code generation can be a valuable tool. For larger, structured,
CRUD-based projects, the primary downside of an increased learning curve is
easily made up for by the upsides of increased in productivity and
maintainability, and the decrease in defects. Even on some less suitable
projects, code generation's structure can prove a valuable asset.
Lee Richardson is a veteran of more than nine years in the custom
application development and code generation industries. Lee is the founder of
Automated Architecture, Inc, and is the author of Blue Ink, a tool for Rapid Application
Headstrong, Inc. uses an hours-per-entity metric to track development
productivity. Over the past six years, Headstrong reduced this metric from an
average of 121 to 77 hours-per-entity using various rapid application
development technologies. Using Automated Architecture's Blue Ink code
generation product, they further reduced the metric to 23 on a recent resource
management project. This resulted in a 426 percent increase in developer
Gartner, MDSFs Offset J2EE Complexity, December 22, 2003
Copyright © 2017 Automated Architecture, Inc. All rights reserved.