Skip to content

ContextMapper/context-mapper-examples

Repository files navigation

Context Mapper

DSL Examples Build Gitpod ready-to-code License

This project contains example DDD Context Maps written in the ContextMapper DSL. The examples are provided for two different types of users. The simpler business analysis examples should be easy to understand for business analysts without technical background, while the detailed examples are meant for software architects and/or engineers.

Find out more about our DSL and tools on our website https://contextmapper.org/ and papers published by OST (former HSR).

Start exploring the examples in the Context Mapper online IDE right now:

Push

IDE Requirements

This is a Gradle project and can easily be imported into any IDE (ideally VS Code or Eclipse with Context Mapper installed) that supports Gradle.

Context Mapper

In order to have language support for editing the CML files (Context Mapper Language), you need to install ContextMapper in Eclipse, Visual Studio Code, or use the online IDE Gitpod:

The examples:

The following graphical illustrations of the context maps are inspired by Vernon and Brandolini. Once you modelled your context map in CML you can generate such graphical representations.

In the folder src/main/cml/insurance-example you find example context maps for a fictitious insurance company, inspired by Lakeside Mutual.

Context Map

The insurance example contains an example for a classic DDD context map written in the ContextMapper DSL (CML).

Insurance Company Example Context Map

Team Map

It further contains a team map, illustrating the teams and their relationships. Additionally, CML allows to define which bounded contexts are implemented by which teams.

Insurance Company Example Context Map

The Lakeside Mutual microservice project is another fictitious insurance application that demonstrates microservices and the application of Microservice API Patterns (MAP).

We reverse engineered the initial CML model of the project by using our discovery library. In addition we conducted an Event Storming (tutorial coming soon) for a future claim processing feature and modeled the results in the CML model. The model and the Event Storming result can be found in the following folder: src/main/cml/lakeside-mutual

The following graphical Context Map of the model has been generated with our Context Map generator:

Lakeside Mutual Context Map

In the folder src/main/cml/context-mapper-example we modelled our own tool and framework with CML. The following context map illustration of our bounded contexts and framework components is generated out of the CML model with the Context Map generator:

Context Mapper Example Context Map

The folder src/main/cml/ddd-sample contains a context map based on the DDD sample from Eric Evans DDD book.

To make the sample interesting for our context mapping language, we splitted the Cargo application into three bounded contexts.

Insurance Company Example Context Map

The Context Mapper tool provides several Architectural Refactorings which can be applied to your models. A documentation of all available refactorings can be found under https://contextmapper.org/docs/architectural-refactorings. The folder src/main/cml/architectural-refactorings contains example CML models (input and ouput) to illustrate the architectural refactorings purposes.

Contributing

Contribution is always welcome! Here are some ways how you can contribute:

Licence

ContextMapper is released under the Apache License, Version 2.0.