Open briggySmalls opened 4 years ago
I think I'd rather go with option 2 (more freedom) vs. option 1 (more opinionated)
I wonder if opinions could be captured as 'warnings' when parsing the model, rather than forcing it to stop working?
This is pretty annoying to implement.
Curently all 'implicit' relationships are added, and checked if they link elements of interest. The way excessively 'abstract' implicit relationships are ignored is by controlling the 'elements of interest'.
Adding the 'scope' element to the elements of interest would, at present, cause any exisiting correct relationships to be duplicated with an abstract one added to their parent (the scope).
The diagram below tries to illustrate a set of relations.
If a context diagram is to be generated, putting C as the scope then 'D' will be added as a 'main' object. No associations will be added because D is not connected to anything, neither explicitly or implicitly.
If C were added as an object of interest then the diagram would display the correct connections.
However if this change was implemented regressions would appear
Now, correctly, an A -> D
connection would appear.
However an A -> C
connection would also appear. This is no good.
This feels like it is to be solved in view
(same logic for tag and context) by looking at explicit relationships that have one end connected to an anscestor of the primary elements.
But then the implicit relationships are still required as the non-primary end may need to be changed to a parent element
Ok. One further. This is the nasty example alluded to in the previous comment.
With two explicit associations. One nicely between two leaf elements - tagged i)
. But one mean one that is from a leaf to a higher-level component (the scope) - tagged ii)
.
The final diagram should contain:
A -> D
with tag i)
A -> C
with tag ii)
This is annoying because without care the association A -> C
will show both tags, given they need to be found from implicit relationships.
It's making me think there needs to be a way of taking a set of associations and determinine their implicit associations. Rather than only allowing this for all associations in a model.
Urgh, graphviz 'clusters' are a convention. And you cannot have a connection to a subgraph cluster without some nasty syntax and connecting to a child node... https://stackoverflow.com/questions/2012036/graphviz-how-to-connect-subgraphs
The context diagram will draw an association between two elements that are within the scope.
However if one of the elements contains sub-elements and is made the scope of a context diagram, the same association will not be drawn to the enclosing scope 'package'.
This is inconsistent behaviour, either: