Question

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?

https://i.stack.imgur.com/9EVln.png

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top