I. Purpose
For a development team, the sequence diagram is very important because it is used to describe the interaction between a group of objects in the system, especially for crawlers.
The project and sequence diagram of business complexity allow us to clarify these complex processes more quickly.
Ii. Basic Elements
The UML elements in the sequence diagram are still relatively small. We need to cut a diagram first.
1: lifeline
First, we need to know that a sequence chart has a combination of dynamic and static characteristics. It uses a class chart as a static structure and an example chart as a dynamic behavior process. So we can consider the lifeline
It is a class, for example, "Customer: customer". The former is an instance of the class, the latter is the class name, and the "X" in the figure is the class destructor, that is, destruction.
Note that the "Actor" attribute in the figure is set to true, and the Lifeline will become the lifeline of the participant.
2: synchronous and asynchronous
Speaking of synchronization or Asynchronization, I think the first response may be Ajax or thread. Since the sequence diagram is an illustration of the interaction between objects, synchronization is inevitable.
Or asynchronous. In UML elements, "synchronization" has a forward and backward arrow, while "Asynchronous" is a one-way arrow.
From the above sequence diagram, we can see that the customer places an order to order. After the order is placed successfully, an asynchronous request email is sent at the same time. Since the order is asynchronous
The main process is affected.
3: Create
If you want to create other lifeline (Class Object) in the interaction segment, you need to create a message at this time. However, in actual application, there is still less to be used. After all, everything works.
Everything follows the principle.
In vs2010, there is a "reverse engineering" that supports sequence diagrams, which is quite interesting. Let's take a look at it first. I instantiated a test class in program to see how it
Whether to use create in the figure.
4: Combined fragments
Now we know that a group of objects are interacting in a sequence diagram, so there must be logic for interaction, such as if/else, for, and so on. In UML, there are such businesses as 12.
The combination of logical fragments, the same as the principle, can be used to understand some common.
By comparing the two diagrams, I think you must understand the meaning of the sequence diagram below.
Finally, with the summary above, I think you can understand this picture as well.