Choosing the right UML Diagram

If you’re a newbie when it comes to all things UML, this really is the perfect starting point for you. UML diagrams are generally divided into two main categories, i.e. :

  1. Structural Diagrams and
  2. Behavioural Diagrams

Basically, Structural Diagrams depict the structural elements composing a system or function. These diagrams reflect the static relationships of a structure. It is these static parts, which are represented by classes, components, objects, interfaces and also nodes. Structural diagrams are further sub-divided into four types of diagram :

  1. Class Diagram
  2. Object Diagram
  3. Component Diagram
  4. Deployment Diagram

Class Diagram

These are what most diagrammers are used to, since they are the most common type when it comes to UML design. Class diagrams usually consist of interfaces, classes, associations and collaborations. These types of diagrams represent the object-oriented view of a system that is largely static in nature. Having said that, an active class is something that is used in a class diagram to illustrate the concurrency of a system. Generally, a class diagram highlights the object orientation of a system is the most widely used diagram when it comes to system construction.

Object diagrams

Object diagrams are generally described as an instance of a class diagram. So object diagrams would be closer to real life scenarios when it comes to implementing a system. These diagrams consist of a set of objects and their relationships are like class diagrams and are representative of the static view of a system. The utilization of such object diagrams are similar to class diagrams, however, they are used to construct a model of a system from a perspective that is practical.

Component Diagram

Component diagrams are representative of a set of components and their relationships. The components present in these types of diagrams consist of classes, interfaces or collaborations. So such diagrams offer the implementation view of the system. During the design phase, software artifacts of the system are placed in various groups based on their relationship to each other. These groups are called components and are basically used to visualize the implementation process.

Deployment diagrams

Deployment diagrams would illustrate a set of nodes and their respective relationships. These nodes are described as being physical entities where the components are deployed. Deployment diagrams are used for visualizing the deployment view of a system.

Now let's look at Behavioural Diagrams, which also forms a vast part of UML diagrams. To put it simply behavioral diagrams capture the dynamic aspect of the system. The word “dynamic” in this context can be described as being the changing parts of the system.

Unlike Structural Diagrams, Behavioural Diagrams can be subdivided into five types of diagrams :

  1. Use case Diagram
  2. Sequence Diagram
  3. Collaboration diagram
  4. State Chart Diagram
  5. Activity Diagram

Use case Diagram

These consist of a set of use cases, actors and their respective relationships. These diagrams seek to represent the use case view of a system. A diagram of this type illustrates the functionality of a system. So a use case diagram is utilized to represent the relationships that exist among the functionalities and their controllers (internal/external), which are known as actors.

Sequence Diagram

A sequence diagram is also commonly known as an interaction diagram. A diagram of this type deals with certain sequences, which are messages that flow from a certain object to another. It is important to note that the interaction that is present between the components of a system is significant from an implementation and execution perspective. So a sequence diagram is utilized to visualize the sequence of calls in a system when it comes to performing a functionality that is specific.

Collaboration diagram

Another form of an interaction diagram is known as a collaboration diagram. This type of a diagram illustrates the structural organization of the system and the messages that are sent or received. These structural organizations consists of various objects and links. The specific aim of a collaboration diagram is to visualize the organization of objects and their respective interaction.

State chart diagram

A state chart diagram is utilized to illustrate the event driven state change of a system. It basically describes the state change of a class and interface amongst other things. A state chart diagram is used to visually represent the reaction of a system through internal or external factors.

Activity diagram

An activity diagram would illustrate the flow of control in the system. This means that such a diagram consists of both activities and links. The flow is usually sequential, concurrent or even branched. The activities are the functions within a system. Ideally, activity diagrams are usually used to illustrate the flow of controls in a given system. Such diagrams are excellent when it comes to have an idea of knowing how a system will work when it is executed.

Image from - http://www.securitycatalyst.com/revisit-the-basics

Learn How Creately Diagrams works

Learn How Creately Diagrams works