Transforming the Business of Development
The Generator - The JeeWiz Engine
This section is for developers who are interested in the generator-level features.
Like many other generators, JeeWiz uses Velocity as its scripting language and Ant to run the generation process
JeeWiz Version 1, which was first available in 2001, had innovations for generating large-scale systems:
As described in the Architect view ,
our longer term goals have been to make JeeWiz universal and to automate as much as possible.
This has required additional features in the generator, as shown in the diagram below:
- Large model composition from multiple input files
- Large system builds, using a recursive manufacturing build process
(i.e. building parts into sub-assemblies, and sub-assemblies into delivered assemblies).
|Any input format
||Designs, even in UML, come in multiple input formats.
To allow a logical model to built by any tool,
we allow any input format and use JeeWiz to convert into 'Simple XML' -
a lowest common denominator XML format.
We have customers using various input formats - UML/XMI of various flavours, Javadoc tags, XML Schema/WSDL and a specialised modelling tool.
|Any design model
||JeeWiz provides a general-purpose meta-modelling facility, which is universal - any domain can be modelled.
Standard views and queries on meta-objects are generated automatically.
Custom logic is implemented in Java, so technical programmers can build or modify meta-models.
The meta-modelling facility supports the creation of arbitrarily high-level concepts,
via inheritance relationships between meta-models. For example, the Java or C# class
ends up turning into the 'service' and 'entity objects in the business model.
The benefit is that the higher level concepts are more powerful -
an 'entity' generates persistence code, which the Java or C# class doesn't -
but they are built up in small increments.
The set of meta-models used in a build is configured at generate-time.
Similar meta-models can be used as alternatives in similar stacks -
for example, Java and C# generation can be selected by configuring in the appropriate meta-model.
Most modelling tools only support a single-level meta-model.
To use JeeWiz's meta-models in a modelling environment,
there is a converter that collapses the modelling environment
and then applies a simple filter to use or remove various parts of the modelling environment.
This allows end-users to build modelling tool plug-ins specialised for their standards.
Effectively these become DSLs (Domain Specific Languages) for the customer's environment.
||Patterns are JeeWiz's model-to-model transforms
and are the primary mechanism for turning high-level concepts into implementation-level concepts.
To give an idea of the power of patterns, after applying patterns in the
the output model is over 30 times larger than the input.
A small but important use of patterns is to fill in smart defaults on the input side,
so that JeeWiz can use incomplete models ('UML as sketch') which then transition without a break into
rich specifications ('UML as blueprint') as the missing details are added.
But model-to-model transform is the easy bit.
The difficult, but valuable, bit is to also specify the behaviour in a general way,
creating the interaction between the generated concepts.
JeeWiz supports this because it is the key to large-scale automation:
once the patterns have fired, we have not only created the low-level concepts,
but also created the implementation.
Patterns are implemented in XML and Velocity, plus your language of choice or our Java/C# combination.
In other words, it doesn't require specialised technical skills
or a special language to implement practical patterns.
The idea is that domain specialists can implement their own generation systems, to encapsulate their knowledge.
One of the difficulties in building a general-purpose system generation (e.g. for J2EE) is the number of aspects -
overall architecture, the implementation language,
local standards, technologies used, company or delivery channel look&feel -
that must be incorporated into generated files - and then easily changed.
JeeWiz provides an 'aspects backbone' to hold these various aspects.
Each backbone, or level, can use aspects from lower levels, or override all or individual parts of it.
The levels are pluggable, in the same way as meta-models are pluggable.
This means that we can plug in/swap backbone levels as main layers in the stack
(e.g. swap C# for Java, or add a user look&feel)
or as minor layers (e.g. adapt J2EE persistence to use JDO rather than EJB).