Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dotted arrows for relationships #67

Closed
fineconstant opened this issue Jun 10, 2020 · 9 comments
Closed

Add dotted arrows for relationships #67

fineconstant opened this issue Jun 10, 2020 · 9 comments
Milestone

Comments

@fineconstant
Copy link

fineconstant commented Jun 10, 2020

Hello,

An option to make relationship arrows dotted would be very useful to express different types of relationships and distinguish them visually 😃

I made a pull request with changes here #66
For now I named new elements using _Async suffix e.g. Rel_Async(...), but maybe it is better not to suggest that these new relationships are asynchronous and normal ones are synchronous... in the end it can mean something different based the context.
Other names like _Weak, _Dotted or something entirely else are possible - feel free to comment on this or suggest something 😄

@stale
Copy link

stale bot commented Nov 22, 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 Nov 22, 2020
@aheil
Copy link
Member

aheil commented Nov 29, 2020

C4 Model is about simplicity, ambiguity should be avoided. Annotations are essential. Adding an additional type of lines would introduce the "boxes and lines" dilemma the C4 model tries to avoid.

Examples:

  1. What are semantics of dotted lines in general? Will all developers understand the difference and will all developers interpret it the same way?

  2. In one diagram both types of lines are used but annotated differently. Will you follow the line style or the annotation. You have introduced redundancy we usually try to avoid in C4.

  3. Two types of lines might lead to the point where relationships are not annotated anymore as humans are "lazy". While this is ok to some degree, the implicit knowledge of this semantics will be lost over time for this particular diagram.

Also this would lead to the request of more lines and more colors while ending up in the root cause leading to the C4 model.

@stale stale bot removed the wontfix This will not be worked on label Nov 29, 2020
@fineconstant fineconstant reopened this Nov 29, 2020
@fineconstant
Copy link
Author

Thanks for your input.
I partially agree with you, I think that ambiguity must be avoided at all costs and annotations are essential indeed - I do not propose dropping them.

  • About introducing new style of lines
    C4 already supports different kinds of lines/ relationship arrows - take a look at Financial Risk System example from Structurizr. Solid and dashed lines are event mentioned in Simon Brown's book as @jikuja pointed here: Add dotted relationships arrows #66 (comment).

    In my opinion it is not about introducing new style to C4 model but rather making this library comply with existing standard.

  • About avoiding ambiguity
    @jikuja Add dotted relationships arrows #66 (comment) also quoted the book:

    Once again, ensure that any styling supplements the existing information wherever possible and that the styles you use are described on the key/legend.

    I agree, in order to make different styles of lines/ relationship arrows understandable in the same way by everyone, they must be described.

  • About colours
    This option is already present, you can easily customize colours on your diagrams:

    Rel_(c1, c2, "label", "tech", "-[#cc44ff]->")
    Rel_(c3, c4, "label", "-[#cc44ff]->")
    

I will continue working on my PR and try to add arrow line styles to legend when there is more than one style present on the diagram. I hope that this way I can propose more comprehensive solution. 🏭

I look forward to receiving more feedback from other people as well 😃

@stale
Copy link

stale bot commented Jan 28, 2021

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 Jan 28, 2021
@Potherca Potherca removed the wontfix This will not be worked on label Feb 1, 2021
@FastNinja
Copy link

Having legend for dotted lines that explain what they mean ("async communication") can be a solution?
Showing Async VS Sync is actually very important for lots of systems and having the ability to add it would be great.

@Potherca Potherca added the not-stale Stop issue from being marked stale by bot label Feb 25, 2021
@kirchsth
Copy link
Member

Atm we have 64 (!) different relation definitons, I wouldn't introduce additional Rel styles anymore.
I think the simplest solution is to add the "async communication" as part of the technology like below.
A second advantage would be that we need no special legend extensions.

@startuml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml

SHOW_PERSON_SPRITE(person2)

Person(user, "Business User")
System(frs, "Financial Risk System")
System(ex1, "Ext1 System")
System(ex2, "Ext2 System")

Rel(user, frs, "view reports")
Rel(frs, ex1, "get data", "HTTPS")
Rel(frs, ex2, "get data", "RabbitMq, asnyc")
@enduml

A possible extension could be the support of an additional argument with "icon characters" e.g <&link-intact> (or sprite?), but I would prefere characters because they are typically smaller and predefined.

@startuml
[Actor]
[Participant]

sprite $triangle {
    00000000000
    00000F00000
    0000FBF0000
    0000FBF0000
    000F999F000
    000F999F000
    00F66666F00
    00F66666F00
    0F3333333F0
    0F3333333F0
    0FFFFFFFFF0
    00000000000
}

Actor -LEFT-> Participant: "<$triangle> - <&link-intact>\nldfjklasdfas fajkls dhfa"
@enduml

@kirchsth
Copy link
Member

Hi @fineconstant,
dotted arrows cannot be defined via skinparams.
With PR #130 you can change the color and add symbols.

Can this solve your problem?
BR Helmut

@kirchsth
Copy link
Member

@fineconstant, @Potherca: can we close this issue based on #130?

@Potherca Potherca modified the milestones: v2.3.0, v2.2.0 Apr 12, 2021
@Potherca Potherca removed the not-stale Stop issue from being marked stale by bot label Apr 12, 2021
@kirchsth
Copy link
Member

With #160 dotted lines are supported too

@Potherca Potherca moved this to Todo in All Projects Jul 3, 2022
@Potherca Potherca moved this from Todo to Done in All Projects Jul 3, 2022
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

No branches or pull requests

5 participants