Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to understand UML diagram

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article is about how to understand the UML diagram, the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.

Learn UML diagrams with you. Here we mainly introduce UML structure diagrams and UML behavior diagrams. Let's take a look at the detailed introduction of UML diagrams.

UML diagram

Again, there are five most important complementary views for visualization, elaboration, construction, and documentation of software architecture: use case view (usecaseview), design view (designview), process view (processview), implementation view (implementationview), and implementation view (deploymentview). Each view includes structural modeling (modeling static things) and behavioral modeling (modeling dynamic things).

Nine diagrams are included in UML, which are described in Chapter 2. These nine kinds of diagrams can be divided into two categories, one is used for structural modeling, called structural diagram, and the other is used for behavioral modeling, called behavioral graph.

① structure diagram

There are four kinds of structural drawings, which are:

⑴ Class Diagram (classdiagram)

The class diagram shows a set of classes, interfaces, collaborations, and the relationships between them. Class diagrams can be used to illustrate the static design view of the system. A class diagram containing active classes can be used to illustrate a static process view of the system.

⑵ object Graph (objectdiagram)

The object graph in the UML diagram shows a set of objects and their relationships. An object diagram is a data structure and static snapshot of an instance of something found in a class diagram. Object diagrams can also be used to illustrate static design views and static process views of a system, but it is viewed from a realistic or prototype perspective (because it is an instance of a class).

⑶ component diagram (componentdiagram)

The component diagram in the UML diagram shows a set of components and their relationships. Component diagrams can be used to illustrate the static implementation view of the system.

⑷ implementation Diagram (deploymentdiagram)

The implementation diagram in the UML diagram shows a set of nodes and their relationships. The implementation diagram can be used to illustrate a static implementation view of the system.

There are also some common variants of these four diagrams, such as the subsystem diagram is actually a class diagram.

② behavior diagram

There are five kinds of behavior diagrams, which are:

⑴ use case Diagram (usecasediagram)

Use case diagrams in UML diagrams are used to organize the behavior of the system, describing a set of use cases and participants and their relationships. Use case diagrams are used to describe the static use case view of the system.

⑵ sequence Diagram (sequencediagram) and collaboration Diagram (collaborationdiagram)

Sequence diagrams and collaboration diagrams in UML diagrams are semantically equivalent and can be transformed into each other. Sequence diagrams and collaboration diagrams are collectively called interaction diagrams (interactiondiagram). They show a set of objects and messages sent and received by this set of objects. Sequence diagrams emphasize the timing of messages, and collaboration diagrams emphasize the structure and organization of the objects that send messages.

⑶ State Diagram (statechartdiagram) and activity Diagram (activitydiagram)

In UML diagrams, state diagrams and activity diagrams are semantically equivalent, and they can be transformed into each other. A state diagram shows a state machine consisting of states, transitions, events, and activities, which emphasizes the behavior of an object in the order of events, which is usually used to model the behavior of interfaces, classes, or collaborations. The activity diagram shows the flow of the system from activity to activity, which emphasizes the control flow between objects. Activity diagrams are usually used to model the function of the system.

For a system, the five views mentioned above are not necessary and can be tailored or supplemented according to the needs of the system.

The above is how to understand the UML diagram, the editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report