The blog I decided to read this week is UML Diagram Types. As we learn more about UML, it is important to know about the many types of UML diagrams. There are two main types of UML diagrams, Structure and Behavioral. Structure types include Class, Component, Deployment, Object, Package, Profile, and Composite Structure Diagram, while Behavioral types include Use Case, Activity, State Machine, Sequence, Communication, Interaction, Overview, and Timing. The main difference between Structure and Behavioral diagrams is Structure shows what is in a modeled system, while Behavioral shows the behavior, or what is supposed to happen in the system.
Of these diagrams, we have worked with the Class diagram. These diagrams are used primarily for Object-Oriented situations. This is because they show the classes along with their attributes and operations of each class. Component is another type of UML diagram. These, as the name implies, show the structural relationship of components in a particular system. Deployment diagrams are used to show the hardware of a system and the software used with that hardware. These diagrams are useful when you have software deployed across multiple machines. Object diagrams are very similar to Class diagrams, however Object diagrams use real world examples. Package diagrams are used to show dependencies between different packages in a particular system. Profile diagrams are relatively new to UML, and are used to profile things like stereotypes, definitions, and constraints. Lastly for Structure diagrams are Composite Structure diagrams. These are used to show the internal structure of a particular class.
For Behavioral diagrams, we start first with the Use Case diagram, which is used to show an overview of various actors that are involved in a system, how different functions are needed by those actors, and how the different functions interact. Activity diagrams are used to represent workflow, for example business or operational workflow. State Machine diagrams are similar to Activity diagrams, and are used to describe the different behaviors of objects and how they act based on what state they are in. Sequence diagrams show how objects interact with each other and, as the name Sequence implies, what order they interact. Communication diagrams are what the old UML 1 Collaboration diagram was. These are similar to Sequence diagrams, but are focused on the messages based between objects, instead of the order they interact. Interaction Overview diagrams are essentially multiple Sequence diagrams all inside another diagram, to show how many things interact and how they interact with each other, and in the order that they interact. Timing diagrams are also like Sequence diagrams but show the behavior of objects within a specific timeframe.
I chose the following blog post because it gave clear and concise definitions and explanations of the many types of UML diagrams, and allowed me to appreciate them even more than I did before.
From the blog CS@Worcester – Erockwood Blog by erockwood and used with permission of the author. All other rights reserved by the author.