Java Eclipse DSL MDD

Using Domain Specifc Languages for Java Development

Mod4j (Modeling for Java) is an open source DSL based environment for developing administrative enterprise applications. It uses a collection of Domain Specific Languages (DSLs) to model different parts of the architecture, which is combined with manually written code.

Currently Mod4j consists of four DSLs: the Business Domain DSL, Service DSL, Data Contract DSL and Presentation DSL. The modeling environment is seamlessly integrated into the Eclipse IDE which gives the developers one environment where they can easily combine working with models and code. Mod4j uses a textual syntax for its DSLs, stores models in text files, does code generation incrementally using the automatic Eclipse build system. DSL editors have developer-friendly features like syntax coloring, outlining, code completion and model validation, also between multiple DSL models.

To gain flexibility the different DSL’s used in Mod4j can be used independently, but if they are used in collaboration they will be fully validated with each other. The technology behind this inter-DSL validation, called CrossX, has been recognized as a missing link the Eclipse Modeling Project and is now used in the official Eclipse project proposal EMF Index, where Jos Warmer is one of the committers. Mod4j itself makes extensive use of the Eclipse Modeling Project and openArchitectureWare.

Apart from integration in the Eclipse IDE, Mod4j also supports the use of Maven. That is, using the DSL models as the source, the complete code generation process can be run automatically on a build server without the need for Eclipse. This is important for professional development and fits well in current ways of working.

Although Mod4j delivers a ready to use MDD environment, the vision behind Mod4j is much wider. We aim to get a growing collection of DSLs that can collaborate together using the CrossX technology. Users can then pick and choose which DSL’s are applicable in a specific project. Because of the open source nature DSL’s cal also be adapted to meet specific requirements.

Mod4j officially becomes open source in April 2009. Currently the Mod4j project is in transition from our internal project environemt to Codehaus. You will see the contents of the page grow gradually over time