uml component diagram difference between assembly and interfaces with dependency

前端 未结 1 1106
一个人的身影
一个人的身影 2021-02-09 15:59

Can someone explain in what\'s the difference between elements marked in diagram? I think it only depends on how many interfaces we want to connect. Am I right?

http://i

1条回答
  •  深忆病人
    2021-02-09 16:31

    You are not right and the diagram is syntactically incorrect.

    Let me first explain the concepts and their meaning: enter image description here

    Dependency between components exist on the definition level (top part of the diagram). They can be drawn between the required and provided interface, between a component and interface or even between two components (no interfaces), depending on what we want to show.

    Assembly is completelly different relationship and it does not make sense on the definition level (between components). It's because it is a special kind of link - a relationship established in run-time between two instances of a classifier (here - component, the lower diagram).

    So, in summary we could say that a dependency between two components on classifier level expresses a potential link or assembly between the corresponding instances in run-time.

    On your example there are several syntax errors (if you could compile it, it would give you this report :)):

    • Assemblies "Item Code" and "Customer Details" cannot connect two components (only their instances)
    • Dependency between Order and Account is in wrong direction (should go from required to provided interface with the same name)

    Note: I must say that this diagram looks extremelly suspicious even semantically. You should probably reconsider it.

    0 讨论(0)
提交回复
热议问题