structurizr / java

Structurizr for Java
https://docs.structurizr.com/java
Apache License 2.0
1.01k stars 288 forks source link

DotWriter/GraphViz too limited to visualize workspace? #102

Closed victorvogelpoel closed 6 years ago

victorvogelpoel commented 6 years ago

I decided to take a stab at C4 and work out a workspace. I was already using GraphViz and Dot for automatically generated graph visualizations and was hoping that a C4 workspace can visualized using Dot/GraphViz. I find that the DotWriter spits out dot content just fine, but that GraphViz cannot create a complete image for a more complex workspace... Is that your experience as well? I was hoping for GraphViz to visualize all the defined views in the workspace in one image, but only the first digraph ends up in the image. Online GraphViz versions confirm the behavior.

Working with the .NET framework, I ported your Java DotWriter to C# (easy) and did a crude port of Java LivingDocumentation.DotDiagram to C# (harder). Then I used one of your example workspaces, Big Bank plc, to try out the ported DotWriter/DotDiagram and found that the dot content contains several digraphs, but GraphViz only visualizes the first one...

simonbrowndotje commented 6 years ago

The DotWriter produces one diagram definition per system context, container and component view defined in the workspace (i.e. one digraph per view); see this gist for an example. I don't think you can feed the entire output to graphviz in one go though, which is probably why you're only seeing a single diagram.

victorvogelpoel commented 6 years ago

I figured as much.

Next up: trying structurizr as the visualizr.

simonbrowndotje commented 6 years ago

It depends what your requirements are, but the PlantUML writer in conjunction with something like docToolchain might be worth a look. But yes, Structurizr will certainly give you some other options for visualising workspaces, and navigating between diagrams. I will close this issue if that's okay?

victorvogelpoel commented 6 years ago

Currently I want clean simple visualizations of the C4 workspace model for a software system I inherited. I'll take a look at docToolchain. Closing the issue is ok.

Is it worth publishing the .NET port of LivingDocumentation.DotDiagram and DotWriter for Structurizr?