sequence diagram in uml martin palkovik. sequence diagram it is a graphic representation of system...

15
Sequence diagram in UML Martin Palkovik

Upload: april-stanley

Post on 04-Jan-2016

218 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Sequence diagram in UML Martin Palkovik. Sequence diagram  It is a graphic representation of system operations based on chronology - a time sequence

Sequence diagram in UML

Martin Palkovik

Page 2: Sequence diagram in UML Martin Palkovik. Sequence diagram  It is a graphic representation of system operations based on chronology - a time sequence

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

Page 3: Sequence diagram in UML Martin Palkovik. Sequence diagram  It is a graphic representation of system operations based on chronology - a time sequence
Page 4: Sequence diagram in UML Martin Palkovik. Sequence diagram  It is a graphic representation of system operations based on chronology - a time sequence

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

Page 5: Sequence diagram in UML Martin Palkovik. Sequence diagram  It is a graphic representation of system operations based on chronology - a time sequence

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

Page 6: Sequence diagram in UML Martin Palkovik. Sequence diagram  It is a graphic representation of system operations based on chronology - a time sequence
Page 7: Sequence diagram in UML Martin Palkovik. Sequence diagram  It is a graphic representation of system operations based on chronology - a time sequence

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.

Page 8: Sequence diagram in UML Martin Palkovik. Sequence diagram  It is a graphic representation of system operations based on chronology - a time sequence
Page 9: Sequence diagram in UML Martin Palkovik. Sequence diagram  It is a graphic representation of system operations based on chronology - a time sequence

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.

Page 10: Sequence diagram in UML Martin Palkovik. Sequence diagram  It is a graphic representation of system operations based on chronology - a time sequence

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

Page 11: Sequence diagram in UML Martin Palkovik. Sequence diagram  It is a graphic representation of system operations based on chronology - a time sequence

Exists only as a graphic symbol It is a thin rectangle, its upper edge is associated with initialization, the

bottom edge of the end

Page 12: Sequence diagram in UML Martin Palkovik. Sequence diagram  It is a graphic representation of system operations based on chronology - a time sequence

Recursive message message, sent by the

object itself The sender and receiver

are the same object

Recursive message with activation

Page 13: Sequence diagram in UML Martin Palkovik. Sequence diagram  It is a graphic representation of system operations based on chronology - a time sequence

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

Page 14: Sequence diagram in UML Martin Palkovik. Sequence diagram  It is a graphic representation of system operations based on chronology - a time sequence

Links:

http://www.developer.com/article.php/3080941 http://stargate.cnl.tuke.sk/~ywetka/

DiagramInterakcie.pdf http://sk.wikipedia.org/wiki/Sekvenčný_diagram

Page 15: Sequence diagram in UML Martin Palkovik. Sequence diagram  It is a graphic representation of system operations based on chronology - a time sequence

Thank you