Getting started

To model with Context Mapper you need either our Eclipse Plugin or our Visual Studio Code extension. Both provide support for the CML language and its surrounding tools. Please note that the VS Code extension does not support all our features yet. Here you can find a table that illustrates which features are available in Eclipse and VS code. The VS code extension shall support all features soon!

VS Code Extension

To start using Context Mapper in Visual Studio code, you can simply install or download our extension via the marketplace:

VS Code Marketplace: Context Mapper

Or search for “Context Mapper” in the extension view of your visual studio code.

Note: Does not support all features we have in Eclipse yet. You can find a feature support table here.

Eclipse Plugin

To start using Context Mapper in Eclipse, please install the plugin via the Eclipse Marketplace or our update site:

Eclipse Marketplace: Context Mapper

Online IDE (Gitpod)

In case your project is hosted by GitHub, you can use Gitpod as online IDE. Our VS Code extension is published to the Open VSX Registry and can be found in the extensions in your Gitpod.

Start online IDE now: Just try it out with our demo repository, right now.

System Requirements

Besides the IDE plugin/extension, you need the following tools on your machine:

  • Java JDK (JDK 8 or newer)
    • If using VS Code, there is an active issue with the recent versions of the JDK. Installing the archived version of JDK 15 GA seems to work.
  • If you want to use our Context Map generator, you must have installed Graphviz on your system.
    • Ensure that the binaries are part of the PATH environment variable and can be called from the terminal.
    • Especially on Windows this is not the case after the installation of Graphviz. The default installation path is C:\Program Files (x86)\GraphvizX.XX, which means you have to add C:\Program Files (x86)\GraphvizX.XX\bin to your PATH variable.
  • A PlantUML viewer for the Eclipse or VS Code:

Note: If you want to integrate the DSL and its tools as library within your application, find more information here.

Latest Releases

Release notes for all our latest releases can be found here.

Example

The following example gives you a first impression how CML context maps look like: (DDD Sample Application)

/** 
 * The DDD Cargo sample application modeled in CML. Note that we split the application into 
 * multiple bounded contexts.
 *
 */
ContextMap {
  contains CargoBookingContext
  contains VoyagePlanningContext
  contains LocationContext
  
  CargoBookingContext [SK]<->[SK] VoyagePlanningContext
  
  CargoBookingContext [D]<-[U,OHS,PL] LocationContext

  VoyagePlanningContext [D]<-[U,OHS,PL] LocationContext
}

The bounded contexts have to be specified before you can use them within a context map. A simple example of a bounded context definition is:

BoundedContext LocationContext {
  Module location {
    Aggregate Location {
      Entity Location {
        aggregateRoot

        PortCode portcode
        - UnLocode unLocode
          String name
      }

      ValueObject UnLocode {
        String unLocode
      }

      ValueObject LocationShared {
        PortCode portCode
        - Location location
      }
    }
  }
}

Next steps…

A First Model

Once you have installed Context Mapper, you can create a CML (Xtext) project and start modeling. Find more information how to create such a project here:

Check out our example models and the language reference if you do not want to start with an empty CML model.

Refactorings and Generators

Once you created your first Context Map in CML you can use the following tools to evolve your model and generate other representations of your architecture:

Reverse Engineer Context Map and Bounded Contexts

In case you work on a project with existing monolithic or (micro-)service-oriented architectures you may want to reverse engineer an initial Context Map or the domain models within your Bounded Contexts to simplify the start with our tool. In this case have a look at our reverse engineering library which is able to generate CML models from existing source code.