问题描述
我正在绘制一些图表,我想知道演员在图表中多次出现是否可以接受(以提高图表的透明度)?
I am drawing some diagram, and I am wondering if it is acceptable for the actor to be in diagram more than once (for better transparency of the diagram)?
谢谢
推荐答案
UMLDiagram
是 UMLDiagramElement ,但是 Actor
是否 UmlDiagramElement
,它是元素
。 Actor的 UMLDiagramElement
对应物是 UMLShape
(显示为图标/数字时)或 UMLClassifierShape
(当显示为类框时)。
UMLDiagram
is a composition of UMLDiagramElement
s, however Actor
is NOT UmlDiagramElement
, it is an Element
. The UMLDiagramElement
counterpart for Actor is either UMLShape
(when shown as icon/figure) or UMLClassifierShape
(when shown as a class box).
您必须将 UML模型和 UML图的概念分开。模型是您领域的概念性表示,图是模型的具体视觉表示。
You have to keep the concepts of "UML Model" and "UML Diagram" separate. Model is a conceptual representation of your domain, and diagram is a concrete visual representation of a model.
然后,通过关联将模型和图中的两个元素连接起来(B .2.2)。
The two elements from Model and Diagram are then connected by an association (B.2.2).
关联为N:M(且是单向的),模型不在乎它
The association is N:M (and unidirectional), the model doesn't care that it is being visualized.
据我所知,没有什么可以限制您对单个演员进行多种视觉呈现。
最后,正如托马斯(Thomas)和盖尔特(Geert)所说,这是一个不良习惯。如果您的图是如此复杂,以至于您需要多种表示形式,则应该将其分解。
Lastly as both Thomas and Geert mentioned, it is a bad practice. If your diagram is so complex that you want multiple representations you should probably decompose it.
这篇关于UML图表:我可以在一个图表上多次使用同一个actor吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!