umlcomponent-diagram

Does Interface Symbol Show Data Transfer Direction


I am trying to understand UML Component diagrams but I am confused about the direction of ball and socket symbols for interfaces. I am not completely sure what the direction of the ball and socket exactly represents.

On some sources it says that it shows material input/output direction. The component with ball provides data through an interface to the component with the socket.

On some other sources it says that it shows which one provides the interface and which one uses it. The component with the ball implements the interface while the component with the socket uses it.

So which explanation is more accurate?


Solution

  • So which explanation is more accurate?

    from the standard (chapter 11.6.4 Notation of formal/2017-12-05 ) ---O represents a provided interface and ---( a required interface

    see Figure 11.40 A Component with two provided and three required Interfaces page 211 and Figure 11.41 Black box notation showing a listing of provided and required interfaces page 212

    enter image description here

    enter image description here

    It is the same for part/role/port of structured classifiers in general, see chapter 11.2.5 Examples of formal/2017-12-05

    Still from the standard a component is a modular unit with well-defined Interfaces that is replaceable within its environment. To use components and provided/required interfaces to shows material and flow of data with the direction of the flow is not part of the standard. If you really want to use them for that I strongly encourage you to add a note explaining your goal/usage to make it clear. Note in UML material etc are part of the deployment (chapter 19 of formal/2017-12-05 )