In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-13 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "what is the UML sequence diagram". In the daily operation, I believe that many people have doubts about what the UML sequence diagram is. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "what is the UML sequence diagram?" Next, please follow the editor to study!
Brief introduction of 1.UML sequence Chart
A timing diagram (SequenceDiagram) is an interaction diagram that emphasizes the timing of messages. A timing diagram describes the interactions between classes in a class system, and it models these interactions as message exchanges. A timing diagram is a model that describes how groups of objects collaborate on certain behaviors over time.
A timing diagram is an interaction diagram that emphasizes the timing of messages. It consists of Actor, Object, Message, Lifeline and Focusofcontrol. In UML, an object is represented as a rectangle with an underscore in its name, a message is represented by a marked arrow in a timing diagram, a lifeline is represented by a dotted line, and the control focus is represented by a thin rectangle.
The time series diagram represents the interaction as a two-dimensional graph, which is vertically the time axis, and the time extends downward along the vertical line. The horizontal axis represents the meta-roles of individual objects in collaboration. The activities of meta-roles are represented by lifelines. When the object exists, the lifeline is represented by a dotted vertical line, and when the process of the object is active, the lifeline is a dual channel. Messages are represented by arrows from one object's lifeline to another, and the arrows are arranged from top to bottom in the diagram in chronological order.
two。 General criteria for designing UML sequence diagrams
◆ tries to keep messages in order from left to right
◆ layers the classifier
◆ avoids modeling object Destruction
Principles of ◆ classifier
Principles of ◆ messages
◆ creates objects directly
◆ is the parameter placeholder description type
The message implementation of the ◆ class is a static operation
The principle of ◆ return value
Do not model the return value when the return value is obvious. The return value is displayed using a dotted arrow marked with the return value, and the return value is optional.
◆ indicates the type of the return value placeholder
◆ explicitly indicates the actual value for a simple value
The use of 3.UML sequence diagrams
◆ describes the overall sequence of control flows when there are multiple short methods between different classes.
◆ shows concurrent processes and activation.
◆ shows time series that are difficult to describe in a collaboration diagram.
◆ displays general forms that involve class interaction but are independent of objects.
The dynamic model describes the behavior of the system over time, which is described by the change of the instantaneous value of the system extracted from the static view. In the performance of UML, the dynamic model is mainly to establish the interaction diagram and behavior diagram of the system.
Interaction diagrams include sequence diagrams and collaboration diagrams, while behavior diagrams include state diagrams and activity diagrams.
Time sequence diagrams (SequenceDiagram) are used to show the relationship between objects, emphasize the chronological order of messages between objects, and show the interaction between objects.
4.UML sequence diagram elements
The timing diagram includes the following elements: class roles, lifelines, activation periods, and messages
1, ClassRole
The class role represents the role played by the objects in the sequence diagram in the interaction, located at the top of the sequence diagram and the object represents the class role. Class roles generally represent actual objects
2, lifeline (Lifeline)
The lifeline represents the existence of objects in the UML sequence diagram over a period of time. There is a vertical dotted line between each object and the center of the bottom in the timing diagram, which is the lifeline of the object, and the messages between objects exist between the two dotted lines.
3, activation period (Activation)
The activation period represents the period during which objects in the sequence diagram perform an operation, and the narrow rectangle on each lifeline in the sequence diagram represents the active period. It can be understood as a pair of curly braces "{}" in the semantics of C language.
4, message (Message)
Messages are classes that define the exchange of information in interaction and collaboration, which are used to model the content of communication between entities, and information is used to transfer information between entities. Allows entities to request other services, and class roles communicate by sending and receiving information
At this point, the study of "what is the UML sequence diagram" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.