In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces the concept and application of UML sequence diagrams. In daily operation, I believe that many people have doubts about the concept and application of UML sequence diagrams. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about the concept and application of UML sequence diagrams. Next, please follow the editor to study!
A brief introduction to UML sequence diagrams (Briefintroduction)
A timing diagram (SequenceDiagram) is a diagram that shows the interaction between objects that are arranged in chronological order. The sequence diagram shows the order of message interactions between the objects participating in the interaction and their objects. The modeling elements included in the timing diagram are: object (Actor), lifeline (Lifeline), control focus (Focusofcontrol), Message and so on.
2. UML sequence diagram elements (SequenceDiagramElements)
Role (Actor)
System roles can be people, and even other systems or subsystems.
Object (Object)
There are three ways to name an object: * the method includes the object name and the class name; the second method only displays the class name but not the object name, which means that he is an anonymous object; the third method shows only the object name but not the class name.
Lifeline (Lifeline)
The lifeline is represented in the sequence diagram as a dotted line extending downward from the object icon, indicating the time of existence of the object, as shown in the following figure
Control focus (FocusofControl)
The control focus is the symbol that represents the time period in the sequence diagram, during which the object will perform the corresponding operation. It is represented by a small rectangle, as shown in the following figure.
Message (Message)
Messages in UML sequence diagrams are generally divided into synchronous messages (SynchronousMessage), asynchronous messages (AsynchronousMessage) and return messages (ReturnMessage). As shown in the following figure:
◆ synchronization message = call message (SynchronousMessage)
The sender of the message passes control to the recipient of the message, then stops activity and waits for the recipient of the message to give up or return control. Used to express the meaning of synchronization.
◆ Asynchronous message (AsynchronousMessage)
The message sender transmits the signal to the recipient of the message through the message, and then continues its own activities without waiting for the recipient to return the message or control. The receiver and sender of asynchronous messages work concurrently.
◆ return message (ReturnMessage)
The return message indicates that it is returned from the procedure call
◆ self-associated message (Self-Message)
Represents a method's own call and a method within an object that calls another method.
3. Case analysis of UML sequence diagram (SequeceDiagramExampleAnalysis)
UML sequence diagram scene
To complete the course creation function, the main processes are as follows:
1. Request to add a course page, fill in the course form, and click the [create] button.
2. Add course information to the database
3. Append subject information to the course object
4. Assign teachers to the curriculum
5. Complete the function of course creation
Examples of UML sequence diagrams
Case Analysis of UML sequence Chart
1. Serial number 1.0-1.3 to complete the initialization of the page
2. Serial number 1.4-1.5 course administrator fills in the course form
3. The course administrator clicks the [Create] button and responds to the click event.
4. Serial number 1.8Service layer creation course
5. Add the course to the database and return the course number CourseId
6. Add the course topic to the database and return the topic number topicId
7. Serial number 1.13 assign a teacher to the course
8. Serial number 1.14 throws a message to the interface whether the course is successful or not.
Summary (Summary)
A UML sequence diagram (SequenceDiagram) is a diagram that shows the interaction between objects that are arranged in chronological order. The sequence diagram shows the order of message interactions between the objects participating in the interaction and their objects. The modeling elements included in the timing diagram are: object (Actor), lifeline (Lifeline), control focus (Focusofcontrol), Message and so on. * to demonstrate a sequence diagram example with the course creation function.
At this point, the study of "the concept and application of 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.