You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Optionally it is possible to define a `name` or `implementation technology` for each relationship by using the corresponding setters. The following example calls show how we set them on relationships from the example above:
@@ -95,7 +95,67 @@ Optionally it is possible to define a `name` or `implementation technology` for
95
95
96
96
The generator adds those information as additional labels to the generated relationships, as this example shows:
The Context Map generator also allows users to illustrate which development teams work on which subsystems, components, or Bounded Contexts. By default, a Bounded Context is of
102
+
the type "generic", but there is another constructor that allows you to create Bounded Contexts of the type "team". If a Bounded Context is of the type "team", it can
103
+
"realize" a Bounded Context of the type "generic". The following example illustrates how you can use this concept to visualize which teams work on which Bounded Contexts:
By default, the generator produces the following _team map_:
145
+
146
+
<ahref="https://raw.githubusercontent.com/ContextMapper/context-map-generator/master/examples/team-map-example-1.png"target="_blank"><imgsrc="https://raw.githubusercontent.com/ContextMapper/context-map-generator/master/examples/team-map-example-1.png"alt="Example Team Map (Clustered)" /></a>
147
+
148
+
As you can see, the generator clusters the Bounded Contexts of the two types (teams and generic BCs) together. Alternatively, you can disable the clustering as follows:
In this case the produced graphic looks as follows:
157
+
158
+
<ahref="https://raw.githubusercontent.com/ContextMapper/context-map-generator/master/examples/team-map-example-2.png"target="_blank"><imgsrc="https://raw.githubusercontent.com/ContextMapper/context-map-generator/master/examples/team-map-example-2.png"alt="Example Team Map (Unclustered)" /></a>
99
159
100
160
### DDD "Cargo" Sample Application
101
161
```java
@@ -121,7 +181,7 @@ new ContextMapGenerator().setLabelSpacingFactor(10)
With the following methods you can parameterize the `ContextMapGenerator`:
@@ -131,13 +191,14 @@ With the following methods you can parameterize the `ContextMapGenerator`:
131
191
| setHeight(int height) | By using this parameter you can fix the height of the produced image. Note that if you use fix the height, the width will be adjusted dynamically. | 1000 |
132
192
| setWidth(int width) | By using this parameter you can fix the width of the produced image. Note that if you use fix the width, the height will be adjusted dynamically. | 2000 |
133
193
| setLabelSpacingFactor(int spacingFactor) | The Graphviz layouting algorithm doesn't ensure that the labels of the edges do not overlap. Especially the boxes with the relationship patterns (OHS, PL, ACL, CF) may often overlap in our case. By introducing spacing between the edges we can often bypass this issue. This parameter (a factor between 1 and 20) controls how much spacing we add. | 1 |
194
+
| clusterTeams(boolean clusterTeams) | This parameter allows you to control whether Bounded Contexts of the different types (teams vs. generic) are clustered together or not. It is relevant for team maps only (see example team maps above). | true |
134
195
135
196
## Supported Output Formats
136
197
As illustrated in the example code above, the `generateContextMapGraphic` method takes a parameter to define the output format. The following formats are supported:
If you want to contribute to this project you can create a fork and a pull request. The project is built with Gradle, so you can import it as Gradle project within Eclipse or IntelliJ IDEA (or any other IDE supporting Gradle).
0 commit comments