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.
- 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)
To use the ContextMapper DSL you need the following tools:
- Java JDK (JDK 8 or newer)
- Eclipse
- ContextMapper Eclipse Plugin (Eclipse Update Site: https://dl.bintray.com/contextmapper/context-mapping-dsl/updates/)
- You may want to install one the following two plugins to display the plantUML diagrams directly in Eclipse:
- Asciidoctor Editor (Update site: https://dl.bintray.com/de-jcup/asciidoctoreditor)
- PlantUML Eclipse Plugin (Update site: http://hallvard.github.io/plantuml/)
- Note: Both plugins require Graphviz to be installed on your machine!
- Alternatively you can use the plantUML online server.
- 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/
- Find a detailed manual how to create your first CML project here.
- Examples which introduce the language (CML) capabilities can be found here: https://github.com/ContextMapper/context-mapper-examples
- Further instructions, user guides and documentation can be found on our website https://contextmapper.github.io/.
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.
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.
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.
Before importing the project you need to install the Tycho Configurator m2e connector. This can be done by following these steps:
- Start your Eclipse
- Open the maven preferences page: Window -> Preferences -> Maven
- Under Discovery press the button Open Catalog and search for Tycho. You should find the Tycho Configurator.
- Select the Configurator and press Finish.
- An eclipse installation wizard will appear. Go through the wizard to finish the installation and restart eclipse.
After having installed the Tycho Configurator you can import the project with as an existing maven project (Import -> Existing Maven Project).
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.
Contribution is always welcome! Here are some ways how you can contribute:
- Create Github issues if you find bugs or just want to give suggestions for improvements.
- This is an open source project: if you want to code, create pull requests from forks of this repository. Please refer to a Github issue if you contribute this way. In our wiki you can find out how to build the project and setup the development environment locally.
- If you want to contribute to our documentation and user guides on our website https://contextmapper.github.io/, create pull requests from forks of the corresponding page repo https://github.com/ContextMapper/contextmapper.github.io or create issues there.
ContextMapper is released under the Apache License, Version 2.0.