The Communicatio Diagram is most commonly used by both novice and industry professionals to model the different interactions between objects according to space. Communication diagrams are similar to sequence diagrams, however sequence diagrams arrange their objects according to time. Communication diagrams are particularly useful to determine the relationship between different objects.
Communication diagrams are not bound to a specific use case such as sequence diagrams. This allows communication diagrams to be used in both single and along several different use cases. In the professional industry, these diagrams are used less than sequence diagrams but are no less important. Communication diagrams indicate the messages passed between objects. They are much more straight forward and simple than sequence diagrams.
Communication Diagram Example
In this simple communication diagram example, we are going to use the same use case used in the sequence diagram, but this time the user is ordering chocolate ice cream as their flavor. The use case goes as follows: As a user, I would like to order chocolate ice cream as my flavor of ice cream.
The user is the customer who represents the starting point of the communication diagram example. Following the customer, the first message is made to the interface which the customer orders chocolate as their flavor. The messages are all numbered to show the path of the diagram. Another unique part of communcation diagrams is that the relationship messages can vary in abstraction as messages can be as broad or as specifc as you desire. Moving on to the lines that connect to each object, those are called links. They represent the relationships between the objects themselves and which ones can send and recieve messages from one another. If the object sends messages to themselves, the line loops back, creating a loop, however that is not present here. The interface sends a message to the system which sends the requested flavor to the customer object which saves the request for chocolate. The customer object sends a message to the system which then returns and displays on the interface that the choice of chocolate ice cream has been recieved. This examples highlights the simplicity and straight forward nature of cummication diagrams. Understanding the relationship between objects is crucial, esspecially when explaining the system to clients and those who have a less technical background.