Coder Social home page Coder Social logo

contextmapper / context-map-generator Goto Github PK

View Code? Open in Web Editor NEW
21.0 4.0 2.0 2.29 MB

A graphical DDD Context Map Generator based on Graphviz

License: Apache License 2.0

Java 72.43% Groovy 27.57%
contextmapper domain-driven-design ddd context-mapping context-map graphviz

context-map-generator's People

Contributors

stefan-ka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

easonyi willy77

context-map-generator's Issues

Expressing aggregator ownership and relations

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:

Provide additional rendering algorithms besides GraphViz

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?

graphviz (installed by brew) in MacOS is not found by Generate Graphical Context Map, if Eclipse is launched from the Dock

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.

Visualization of relations between one OHS and multiple consumers

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

Expected result:

Actual result:

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.

Expected result:
plantuml_expected

Actual result:
plantuml_current

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"):

kroki integration

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.