Sequence diagram of UML modeling (focusing on the continuity and interruption of rectangular strips)

Source: Internet
Author: User

Sequence digraphs are one type of interaction graphs, and the other is a collaboration diagram, which can be converted to each other in Rose) it describes the interaction between objects in chronological order, and emphasizes the time sequence of message transmission between objects (the collaboration diagram emphasizes the interaction between objects ).

What elements are used in a sequence chart? Role instance (a specific instance of a role)
As shown in: commonuser represents an instance of the role commonuser. The role instance is mainly used to activate the use case. Next, it is the mutual call between objects to complete the use case function. Object
At the top end, a line of rectangles with Trailing dotted lines represents each object. An object has a lifecycle, and a cross sign represents the end of an object's lifecycle.
Lifeline
The tail dotted line below the object represents the lifeline of the object. It ends with a "Cross" (in actual drawing, the cross is usually omitted without painting)
Session (also called an interaction)
The long rectangle on the line of the life cycle represents a session (or interaction). You can use vs reverse engineering to generate a sequence chart and you will find that the frmlogin object on the UI Layer calls the BLL layer: when a logmanager object is called, the bars between two methods (testlogin and addworklog) are broken, not consecutive. Why? Because every round-trip call from the UI Layer to the DLL layer represents a session, the bars between two method calls are disconnected rather than consecutive
Why is the long bar under the form object on the UI Layer always uninterrupted? This is very simple, because the interaction process occurs during the event of clicking a button on the UI Layer, since it is the same event process (method), it represents the same session (interaction), of course it will not be disconnected, it will continue until the event process is clicked
Message
Messages are transmitted between objects, and messages are arranged in chronological order in the sequence diagram. Messages are divided into the following categories according to their nature. 1. simple messages are represented by an actual arrow, which is also the most common form of messages. 2. messages are returned: A virtual arrow is used to indicate 3. synchronous Message 4. Asynchronous Message 3 and 4. It is not used for the time being. It may be used later to explain why the abstract factory + reflection program is used, the time sequence diagram can be painted only at the interface layer, rather than down. When you use vs reverse engineering to generate a time sequence diagram, you will find that it is only to the interface layer and will not continue to go down (this fully proves that it is correct to draw the diagram to the interface layer) my understanding is: Because reflection is used in the factory to instantiate the classes of the Dal layer, there is no reference relationship between the factory and the Dal layer. The bll layer uses the interface layer method (the specific implementation is completed by the class method in the DLL file of the Dal layer). Therefore, the time sequence diagram is only painted on the interface layer, instead of being painted down. This is just my opinion. If you have any shortcomings, you are welcome.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.