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
You are not right and the diagram is syntactically incorrect.
Let me first explain the concepts and their meaning:
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 :)):
Note: I must say that this diagram looks extremelly suspicious even semantically. You should probably reconsider it.