/context-mapper-dsl

ContextMapper DSL: A Domain-specific Language for Context Mapping & Service Decomposition

Primary LanguageJavaApache License 2.0Apache-2.0

Context Mapper

Context Mapping Language (CML) Build Status codecov License

ContextMapper is an open source tool providing a Domain-specific Language based on Domain-Driven Design (DDD) patterns for context mapping and service decomposition.

With the ContextMapper DSL language you can express DDD context maps. Once you have modeled your system with the language you can use the provided generators to create UML diagrams or calculate proposals for service decomposition.

Checkout our website https://contextmapper.github.io/ to get started. The Context Mapper project has been developed in a term project at HSR and you can find the project report with further background information and the projects foundations here.

Features

  • ContextMapper DSL language support (CML files)
    • Write context maps with bounded contexts and their relationships (Strategic DDD)
    • Specify bounded contexts (Tactic DDD): Tactic DSL based on Sculptor
    • Find examples in our examples repository
    • Consult our online documentation to get detailed language documentation, manuals and how to get started.
  • Use our Architectural Refactorings (ARs) to evolve and improve your DDD context maps iteratively.
  • Generate MDSL (micro-) service contracts out of DDD context maps
  • Generate PlantUML component diagram from context map
  • Generate PlantUML class diagram from bounded context (tactic DDD)
  • Generate ServiceCutter input files for service decomposition proposals
  • Convert ServiceCutter output back into context map (CML)

System Requirements

To use the ContextMapper DSL you need the following tools:

Getting Started

  1. Install the Eclipse plugin for creating context maps with ContextMapper DSL by using the following update site: https://dl.bintray.com/contextmapper/context-mapping-dsl/updates/
  2. Find a detailed manual how to create your first CML project here.
  3. Examples which introduce the language (CML) capabilities can be found here: https://github.com/ContextMapper/context-mapper-examples
  4. Further instructions, user guides and documentation can be found on our website https://contextmapper.github.io/.

Development

If you want to contribute and setup the IDE on your local system follow the following instructions. Here you get the instructions in more details.

Building the Project

The project uses the Maven Wrapper.

After cloning the project it can be built with the following command within the root directory of the project:

./mvnw clean install

Note: This is an Xtext project and the tests which are evaluating the correctness of the language grammar need an additional maven goal besides test to be executed. Use this command if you want to execute the tests:

./mvnw clean integration-test

Of course they are also executed with a clean install.

Setup Eclipse IDE

Since this is an Xtext project you need an Eclipse IDE to work on it. Download the Eclipse IDE for Java and DSL Developers from here. The latest version of eclipse we worked with is 2018-09.

Additional requirements

Before importing the project you need to install the Tycho Configurator m2e connector. This can be done by following these steps:

  1. Start your Eclipse
  2. Open the maven preferences page: Window -> Preferences -> Maven
  3. Under Discovery press the button Open Catalog and search for Tycho. You should find the Tycho Configurator.
  4. Select the Configurator and press Finish.
  5. An eclipse installation wizard will appear. Go through the wizard to finish the installation and restart eclipse.

Importing the project

After having installed the Tycho Configurator you can import the project with as an existing maven project (Import -> Existing Maven Project).

Build in Eclipse

After importing the project you will have lots of build errors. This is because you have to generate some Xtext sources first. There exists an eclipse launch configuration called 'GenerateContextMappingDSLInfrastructure' delivered with the project. Run this launch configuration (yes, even if there exist build errors). As soon this has completed, execute a clean build with Project -> Clean... -> Clean all projects.

That's it. You should have a clean workspace now without build errors.

Contributing

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

Licence

ContextMapper is released under the Apache License, Version 2.0.