Code driven vs. Model driven Generators

A code driven generator contains both code and generation commands. Typical examples are Javadoc or XDoclets. The advantage is that this type of generator is simple. The disadvantage is that commands are tied to a specific language used e.g. in the code pieces. This make platform-independence impossible.

Model-driven generators keep a separate model which drives generation. Therefore artifact in different programming languages or runtime platforms (J2EE and .NET e.g.) can be generated.