170 likes | 312 Views
Sequence diagram in UML. Martin Palkovik. Sequence diagram. It is a graphic representation of system operations based on chronology - a time sequence It represents the life cycle of the object for a period of time Sequence diagram is part of the object - oriented model
E N D
Sequence diagram in UML Martin Palkovik
Sequence diagram • It is a graphic representation of system operations based on chronology - a time sequence • It represents the life cycle of the object for a period of time • Sequence diagram is part of the object - oriented model • It is a dynamic view showing symbols of objects (instances of classes) and messages between them • Shows the interaction as two-dimensional graph • The vertical axis represents time, the horizontal axis shows the objects, which cooperate among themselves
Sequence diagram • Represents the behavior of objects in terms of interactions • Complement class diagram, which represents the static structure of the system • Sequence diagram for the designer is important because it clarifies the role of objects in time sequence, based on events
Sequence diagram units • Actor - characterized by an external user who is interacting with the system • In the sequence diagram has the actor lifeline, representing the length of his life • It is not possible to separate the actor and his lifeline • If the user causes interaction, is often represented as the most left or most right object in the sequence diagram, because he is external to the system
Sequence diagram units Object - an instance of class In sequence diagram object has lifeline(Dashed vertical line under the symbol object) Time progresses downward line Lifeline object represents a period during which the object exists. It is not possible to separate the object and lifeline. If the object is created and abolished in the same time period depicted in the diagram, the lifeline begins and ends on the corresponding point.
Sequence diagram units Message - the communication between objects The report contains: • Sender, recipient and action • Sender is an object or actor, that send the message • Recipient of an object or an actor, who receives the report • Action is triggered to transfer information • The message is displayed as a full horizontal arrow from lifeline of one object or actor to lifeline of another object or actor. The arrow is named as the message title.
Sequence diagram units • Message shares the same concept in Collaboration in the Sequence diagram • It`s able to transfer between different types of diagrams • When composing a message, we can also choose to create an element activation, to show the process flow • Activation represents the period during which an object performs an activity
Exists only as a graphic symbol • It is a thin rectangle, its upper edge is associated with initialization, the bottom edge of the end
Recursivemessage • message, sent by the object itself • The sender and receiver are the same object Recursivemessagewithactivation
If we want to do as easily readable diagram we draw the Return arrow, which displays the time, when the action returned to the sender • It is clear to return, resulting in a return value for the source
Links: • http://www.developer.com/article.php/3080941 • http://stargate.cnl.tuke.sk/~ywetka/DiagramInterakcie.pdf • http://sk.wikipedia.org/wiki/Sekvenčný_diagram