Code generation is one of the cornerstone techniques of rapid development. Through the application of both passive and active code generators, we saw how it is possible to speed up the development process and simplify the task of creating complex J2EE components, such as enterprise beans, with attribute-oriented programming.

Now J2SE annotations make program-level metadata available at both compilation and runtime. This new language feature is expected to herald a new wave of development tools that simplify the development of Java applications. Already, the draft EJB 3.0 specification is looking to use annotations to enable developers to define enterprise beans as lightweight classes. We can therefore expect annotations to feature prominently in future versions of J2EE servers.

Code generation delegates the boring, humdrum tasks to the code generator, leaving us free to work creatively and imaginatively on the problem of building better solutions for the customer. After all, it is the application of the creative mindset that makes software engineering such an engaging profession.

Chapter 7 continues with the theme of code generation and focuses on one of the richest sources of metadata available, the database.

Additional Information

Another form of programming based on the principles of code generation is generative programming. This term was first coined by Krzysztof Czarnecki and Ulrich Eisenecker in their book, Generative Programming: Methods, Tools, and Applications [Czarnecki, 2000]. Generative programming involves using active code generators to solve families of software engineering problems rather than using custom solutions to solve individual problems.

The Code Generation Network site, found at, provides links to various code generation resources, including a wide range of code generators for Java developers.

    Rapid J2EE Development. An Adaptive Foundation for Enterprise Applications
    Rapid J2EEв„ў Development: An Adaptive Foundation for Enterprise Applications
    ISBN: 0131472208
    EAN: 2147483647
    Year: 2005
    Pages: 159
    Authors: Alan Monnox © 2008-2017.
    If you may any questions please contact us: