contextmapper / context-map-generator Goto Github PK
View Code? Open in Web Editor NEWA graphical DDD Context Map Generator based on Graphviz
License: Apache License 2.0
A graphical DDD Context Map Generator based on Graphviz
License: Apache License 2.0
An aggregate might be present in multiple bounded contexts, in different forms. For example, as described in https://docs.microsoft.com/en-us/dotnet/architecture/microservices/architect-microservice-container-applications/identify-microservice-domain-model-boundaries (Figure 4-10), a User
from one bounded context can be a Buyer
in another. Could this be expressed somehow in terms of the DSL or the generators? Ideally the outcome would be something like this:
ContextMapper requires GraphViz for rendering the context maps.
This can be difficult in a corporate environment both on the local developer pc due to missing admin rights as well as on the build server as often additional libraries are not allowed to be installed.
PlantUML, therefore, provides additional options with Smetana and Elk for rendering the diagrams. Especially Elk gives optically pleasent visualizations.
Is this something you could imagine having in ContextMapper also?
Hi @stefan-ka ,
After the creation of the CLI example, I was playing around with the examples. I notice the example Insurance-Example_Team-Map.cml doesn't generate the expected result (including the teams).
I'm wondering if it is an outdated version of the Context Mapper.
Environment
MacOS Catalina 10.15.3
Eclipse 2019-12 (4.14.0)
ContextMapper plugin installed as per instructions
graphviz installed via home brew (brew install graphviz)
$which dot
returns /usr/local/bin/dot
Create .cml with an example ContextMap
All works fine, except graphical generation.
If Eclipse was launched from the Dock, and I use Context Map - Generate Graphical Context Map it does not find graphviz.
However, works OK, when I launch eclipse from a terminal shell where PATH is appropriate (includes /usr/local/bin).
This problem seems to be related to https://bugs.eclipse.org/bugs/show_bug.cgi?id=490816
The issue is not really in ContextMapper but in the way Eclipse interprets PATH variable in MacOS, reporting it here just as a note for the record in case any new user encounters the same - it took me a while to figure this out. Maybe it could be mentioned in "how to run on MacOS" part of documentation, or just keep this issue as resolved - "eclipse/MacOS problem" for the record.
When modeling three contexts ContextA
, ContextB
, ContextC
with ContextA
providing an OHS ServiceA
to both ContextB
and ContextC
where the relationships ContextA -> ContextB
and ContextA -> ContextC
have the same name
I would have expected a context map diagram with one OHS on ContextA
with edges to both ContextB
and ContextC
to make it obvious that both consumers consume the same OHS.
Instead, the context map diagram shows ContextA
with two OHSs, one for each relation.
I'm not sure whether this is intended behavior and just a misunderstanting of the visual notation on my side or a bug / due to limitations of how graphviz renders edges between nodes when no port is specified.
Here's an example:
ContextMap Demo {
contains ContextA
contains ContextB
contains ContextC
ContextA [U,OHS]->[D,CF] ContextB : ServiceA
ContextA [U,OHS]->[D,CF] ContextC : ServiceA
}
BoundedContext ContextA
BoundedContext ContextB
BoundedContext ContextC
A similar behavior can be observed when exporting to PlantUML where two interfaces for ServiceA
are generated with one of them being referenced by ContextB
and one by ContextC
.
Interestingly, the DDD sample linked from the examples page shows the visualization I would have expected.
Context map in the documentation:
Context map when generated from the stage 5 source of the sample using the contextmapper vscode plugin version v6.5.1 (operation "Generate Graphical Context Map"):
It would be great to have the kroki server (https://kroki.io/) generate the context map diagram.
This would allow build workflows without the need to install Graphviz on the local system.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.