structurizr / dsl

Structurizr DSL
https://docs.structurizr.com/dsl
Apache License 2.0
1.41k stars 266 forks source link

Document what is a 'relationship identifier' #177

Closed dgutson closed 1 year ago

dgutson commented 1 year ago

The DSL documentation mentions many times the term "relationship identifier" but I don't what it is, since it is never defined.

dgutson commented 1 year ago

Examples:

<element identifier> -> <element identifier> [description] [technology]
<relationship identifier> [description]

or

The !identifiers keyword allows you to specify that element identifiers should be treated as hierarchical (relationship identifiers are unaffected by this setting).

dgutson commented 1 year ago

@simonbrowndotje I'll go and visit the penguins with my family. If you fix this documentation issue, I'll take a picture of a penguin for you and will attach it here.

dgutson commented 1 year ago

@simonbrowndotje as a proof of good will, I'm sending the first part. If you document what a relationship identifier is, I will post the complete penguin I took for you :) 20221121_213834

simonbrowndotje commented 1 year ago

A relationship identifier is an identifier for a relationship.

By default, all elements and relationships are anonymous, in that they can't be referenced from within the DSL. ... Identifiers are only needed where you plan to reference the element/relationship.

For example, myRelationship in the following DSL snippet:

myRelationship = a -> b "Uses"

So in a dynamic view, the following would be equivalent:

dynamic ... {
  a -> b
}
dynamic ... {
  myRelationship
}
dgutson commented 1 year ago

That is a very useful feature, and a very clear example. I suggest you add it to the documentation. Nobody here thought about id = a->b by reading the documentation as is now.

simonbrowndotje commented 1 year ago

Done.

dgutson commented 1 year ago

oath = daniel -> simon "send penguin" 20221117_153056