Skip to content

#27 Add deployment and dynamic diagrams support#34

Closed
kirchsth wants to merge 13 commits intoplantuml-stdlib:masterfrom
kirchsth:master
Closed

#27 Add deployment and dynamic diagrams support#34
kirchsth wants to merge 13 commits intoplantuml-stdlib:masterfrom
kirchsth:master

Conversation

@kirchsth
Copy link
Copy Markdown
Member

@kirchsth kirchsth commented Oct 14, 2019

I'm extending the Structurizr.Net with an new PlantUML writer with dynamic and deployment view support. During that I added the 2 diagrams definitions. If you want you could pull it.
I added the definitions, samples and updated the readme.

**please update all raw references to the correct one during merge from
https://raw.githubusercontent.com/kirchsth/C4-PlantUML/master/...
to
https://raw.githubusercontent.com/RicardoNiepel/C4-PlantUML/release/1-0/... ***

@adrianvlupu
Copy link
Copy Markdown
Member

adrianvlupu commented Oct 19, 2019

Hi,

While I think it's a good idea to add deployment elements, I don't really agree with the implementation.
The only difference between a Deployment_Node and a general Boundary is the solid border and the black font color.
The ContainerInstance should just be a Container.
This way, the diagrams would better resemble the ones in the C4Model docs.

A better implementation would be to add a new skinparam

skinparam rectangle<<node>> {
    Shadowing false
    StereotypeFontSize 0
    FontColor #000000
    BorderColor #000000
    BorderStyle solid
}

and new Node element

!define Node(e_alias, e_label, e_type) rectangle "==e_label\n<size:TECHN_FONT_SIZE>[e_type]</size>" <<node>> as e_alias

The C4_Dynamic.puml seems to serve no purpose. I think new puml files should be added only if they add new elements.

Also, don't forget to update C4.code-snippets with the new elements.

@kirchsth
Copy link
Copy Markdown
Member Author

kirchsth commented Oct 20, 2019

My main intention was to extend structurizr/dotnet with a new C4PlantUmlWriter which creates similar diagrams like structurizr itself (the test_writeBigBankPlcWorkspace() test produces the different diagrams – if you want to see them replace the 2 "" with one ") and with my “C4-PlantUML” merge request I only want to synchronize the generated diagrams.

at DeploymentNode, ContainerInstance) all terms are already used in the structurizr model therefore I “reused” them as Deployment_Node and ContainerInstance (I cannot use container, because term container is already used and has a different meaning in the model).

at DeploymentNode, Boundary) the C4 diagrams use already 3 different boundaries and a node is not a boundary. Additional structurizr uses round corners in the diagrams and I want to produce the same layout (e.g. round corners) too. And a container is not an instance therefore I added the round corners to the instances too.
(colors and shadows are a matter of taste but none of the boundary colors was black in the other diagrams)

at Deployment_Node) I reused only the same pattern like all boundary Container_Boundary, Enterprise_Boundary ... but Node itself is fine too

at C4_Dynamic.puml) basically you are right, but I want to decouple the writer and C4-diagram definitions and introduced the C4_Dynamic.puml too that each diagram type has its own *puml file (e.g. it could be that different legends are introduced,…)

at C4.code-snippets) can you extend it? I generate the diagrams with structurizr/dotnet and use no code snippets

KIRCHSTH added 4 commits November 3, 2019 14:44
…pdate based on review: rename to node, instance supports instance name [additional to container properties], updated styles)

(via plantuml-stdlib#31 Dynamic diagram supports automatically numbered interactions - dynamic has a purpose too)
…pdate Deployment Diagram with named instances)
@kirchsth
Copy link
Copy Markdown
Member Author

kirchsth commented Nov 3, 2019

@adrianvlupu can you check my changes in my branch before I make a new pull request? C4.code-snippets are in work. I will finish it as soon your check is ok.

KIRCHSTH added 4 commits November 9, 2019 10:37
…fix Deployment Diagram with named instances, both have same description )
…ix missing LAYOUT_AS_SKETCH and LAYOUT_WITH_LEGEND "()" in samples)
…eployment offers only new macro node - Simon Brown doesn't like the idea of Container Instances in the diagrams too)
…dd includes, interact, node and extend relations with directions enum)
@kirchsth
Copy link
Copy Markdown
Member Author

Hi @adrianvlupu, @RicardoNiepel all my changes are in:

  • Deployment.puml has a new Node,
  • Dynamic.puml has a new Interact and Interact2 == Rel with automatic numbering,
  • Updated C4 code snippets
  • fix missing LAYOUT_WITH_LEGEND... () in images and documentation

I hope you like it, I used the changes already in the new structurizr-C4PlantUmlWriter

Best regards
Helmut

PS.: It still contains links to my git repository, please update/remove them as soon you accept my changes

@adrianvlupu
Copy link
Copy Markdown
Member

Hi @kirchsth,

I like how you handled the $index for the dynamic diagrams. I took your example of both deployment and dynamic diagrams and added them to my repository with some changes.

Because I updated my version a while back to use plantuml 1.2019.6, I couldn't merge your version directly. I also changed Interact and Interact2 to Rel (override) and RelIndex just for the sake of simplicity.

👍 Just wanted to thank you for the contribution and I wish you a happy holiday season 🎄

@surmansk
Copy link
Copy Markdown

What is needed to merge this pull request? If nothing, could we merge this branch as soon as possible?

@ab0ris
Copy link
Copy Markdown

ab0ris commented Jun 9, 2020

Would be really great to see this merged.

@prathik
Copy link
Copy Markdown

prathik commented Sep 8, 2020

@RicardoNiepel could we get this merged, feature is useful

@NJ-Brad
Copy link
Copy Markdown

NJ-Brad commented Oct 7, 2020

There were several changes required, in order to work with the new preprocessor. I have made the required changes, and incorporated many of the pull requests into my fork of this great project. https://github.com/NJ-Brad/C4-PlantUML I am working on several projects and wanted to utilize these improvements.

@stale
Copy link
Copy Markdown

stale Bot commented Dec 6, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the wontfix This will not be worked on label Dec 6, 2020
@stale stale Bot removed the wontfix This will not be worked on label Dec 11, 2020
@kirchsth
Copy link
Copy Markdown
Member Author

@adrianvlupu merged my changes already via a different PR, therefore I close my PR

@kirchsth kirchsth closed this Dec 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants