Structural UML diagrams

The structural diagrams represent the static aspect of the system. These static aspects represent those parts of a diagram, which forms the main structure and are therefore stable. These static parts are represented by classes, interfaces, objects, components, and nodes.

Structure diagrams emphasize what things must be in the system being modeled —

♦ Class diagram: describes the structure of a system by showing the system’s classes, their attributes, and the relationships among the classes.

♦ Component diagram: depicts how a software system is split up into components and shows the dependencies among these components.

♦ Composite structure diagram: describes the internal structure of a class and the collaborations that this structure makes possible.

♦ Deployment diagram: serves to model the hardware used in system implementations, and the execution environments and artifacts deployed on the hardware.

♦ Object diagram: shows a complete or partial view of the structure of a modeled system at a specific time.

♦ Package diagram: depicts how a system is split up into logical groupings by showing the dependencies among these groupings.

Since structure diagrams represent the structure of a system, they are used extensively in documenting the architecture of software systems.

The main structural diagrams are −

  • Class diagram
  • Object diagram
  • Component diagram
  • Deployment diagram

 

Class Diagram

Class diagrams are the most common diagrams used in UML. Class diagram consists of classes, interfaces, associations, and collaboration. Class diagrams basically represent the object-oriented view of a system, which is static in nature.

Active class is used in a class diagram to represent the concurrency of the system.

Class diagram represents the object orientation of a system. Hence, it is generally used for development purpose. This is the most widely used diagram at the time of system construction.

 

Object Diagram

Object diagrams can be described as an instance of class diagram. Thus, these diagrams are more close to real-life scenarios where we implement a system.

Object diagrams are a set of objects and their relationship is just like class diagrams. They also represent the static view of the system.

The usage of object diagrams is similar to class diagrams but they are used to build prototype of a system from a practical perspective.

 

Component Diagram

Component diagrams represent a set of components and their relationships. These components consist of classes, interfaces, or collaborations. Component diagrams represent the implementation view of a system.

During the design phase, software artifacts (classes, interfaces, etc.) of a system are arranged in different groups depending upon their relationship. Now, these groups are known as components.

Finally, it can be said component diagrams are used to visualize the implementation.

 

Deployment Diagram

Deployment diagrams are a set of nodes and their relationships. These nodes are physical entities where the components are deployed.

Deployment diagrams are used for visualizing the deployment view of a system. This is generally used by the deployment team.