Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: Extensible Code Generation with Java, Part 1

Extensible Code Generation with Java, Part 1 Code generation is a key new trend in engineering, one that you need to understand well. The reason is simple: today's modern frameworks are extremely code-intensive. Using a code generator to build the code

Tutorial Details:

The Basics
Code generation is using one application to build code for another application. In this case, XSLT will be our generator application. Input for a code generator can come in many forms (source code, database schemas, XML models, etc.). Regardless of the source, we call the input the model because it represents (models) what is to be built. On the other side are the templates. The templates render the model into code, or other artifacts such as documentation.

There are two types of code generation: passive and active. In the passive model, you generate the code once and then tweak it. In the active model, you generate the code continuously (often as part of a build process). As changes to the model are made, the generator will be run and new code is created.

It's easy to think about how to use code generation on new projects that build new code, but what about existing an code base? We all love new code, but most of us get paid to work on old code. Is there a way we can use code generation to aid us in extending and maintaining existing applications?


 

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
Extensible Code Generation with Java, Part 1

View Tutorial:
Extensible Code Generation with Java, Part 1

Related Tutorials:

JavaWorld article about JavaCC
JavaWorld article about JavaCC
 
Adelard, one year later - JavaWorld
Adelard, one year later - JavaWorld
 
Code generation using Javadoc - JavaWorld August 2000
Code generation using Javadoc - JavaWorld August 2000
 
Breathe intelligence into Java - JavaWorld April 2001
Breathe intelligence into Java - JavaWorld April 2001
 
Web services hits the Java scene, Part 1
Web services hits the Java scene, Part 1
 
Reflection vs. code generation
Reflection vs. code generation
 
Pick up performance with generational garbage collection
Pick up performance with generational garbage collection
 
Generate JavaBean classes dynamically with XSLT
Generate JavaBean classes dynamically with XSLT
 
Boost Struts with
Boost Struts with XSLT and XML
 
Good introduction to JDO
Good introduction to JDO
 
Call on extensible RMI
Call on extensible RMI
 
Template-Based Code Generation with Apache Velocity, Part 1
Template-Based Code Generation with Apache Velocity, Part I'm going to discuss template-based code generation, explain basic concepts related to templates and transformations, and demonstrate the huge benefits they can bring in code generation.
 
Extensible Code Generation with Java, Part 1
Extensible Code Generation with Java, Part 1 Code generation is a key new trend in engineering, one that you need to understand well. The reason is simple: today's modern frameworks are extremely code-intensive. Using a code generator to build the code
 
Template-Based Code Generation with Apache Velocity, Part 2
Template-Based Code Generation with Apache Velocity, Part 2 As described in part one of this series, code generation typically uses a template engine to transform some kind of "model" into compilable code, given the formatting specified by a template.
 
Extensible Code Generation with Java
Extensible Code Generation with Java Part 2 In part 1 of this series, we looked at the idea of generated code, which is code written not by hand but by another application. The appeal of generated code is that it can eliminate drudgery (and mistakes) i
 
Java Development on Eclipse, Part 1
Java Development on Eclipse, Part 1 Author\'s note: In part one of a two-part series of excerpts from Eclipse\'s Chapter 2, we\'ll get down to the business of developing Java using Eclipse. We\'re going to take a look at using Eclipse for Java developm
 
Working with Hibernate in Eclipse
Working with Hibernate in Eclipse Eclipse is a great example of the power of an open, extensible environment in which people all around the world can contribute.
 
Attribute-Oriented Programming with Java 1.5, Part 1
In this article, I will consider the case of a status-bar component embedded in a GUI application. I will explore a number of different ways to implement this status reporter, starting with the traditional hard-coded idiom. Along the way, I will introduce
 
Reduce code bloat with XDoclet
Reduce code bloat with XDoclet XDoclet can easily be one of the more versatile cross-technology code-generation tools in your Java programming toolbox. Unfortunately, developers often overlook XDoclet's general utility and use it only when it's bundled a
 
Creating EJB clients using the Eclipse Rich Client Platform
This article shows how to build a sample EJB client using the Eclipse Rich Client Platform (RCP), which has become increasingly popularity due to its extensible nature.
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.