0
UML Sequence Diagrams
Finding Behavior¡  Class and object diagrams provide a static view    of the system we are modeling¡  In many cases, thi...
Sequence diagrams modelthe flow of use casescenarios¡  Show how objects interact with one another
Sequence diagramsemphasize objectsinteraction over time¡  Objects  ¡  What classes we need to write  ¡  Which actors ne...
How do I create asequence Diagram?1.  Pick a scenario that you want to model2.  Try to identify the objects that will be i...
Sequence Diagrams¡  Example Sequence Diagram (fast food order)                   :DriveThruAttdt               :FryMaker ...
Activation bars can showwhen that object is awake
Sequence Diagram withactivation lines                  :DriveThruAttdt               :FryMaker   :BurgerMaker        Order...
We can show the lifespan ofan object¡  The object names can be lowered from along    the top to indicate when they are cr...
Sequence Diagrams withlifespan added                  :DriveThruAttdt                                                    :...
Conclusion¡  UML sequence diagrams help you to envision    what will happen during the execution of a use    case¡  They...
Upcoming SlideShare
Loading in...5
×

15 uml sequence diagrams

2,345

Published on

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,345
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
105
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "15 uml sequence diagrams"

  1. 1. UML Sequence Diagrams
  2. 2. Finding Behavior¡  Class and object diagrams provide a static view of the system we are modeling¡  In many cases, this is not sufficient for us to truly understand how classes interact or how the system must respond to varied run-time states¡  Therefore, UML introduces 4 types of dynamic diagrams: Sequence diagrams, Collaboration diagrams, State diagrams and Activity diagrams, collectively known as Behavioral diagrams
  3. 3. Sequence diagrams modelthe flow of use casescenarios¡  Show how objects interact with one another
  4. 4. Sequence diagramsemphasize objectsinteraction over time¡  Objects ¡  What classes we need to write ¡  Which actors need to be involved ¡  What responsibilities need to be written¡  Interaction ¡  Coupling ¡  Shows where we can reduce coupling by moving responsibilities¡  Over time ¡  The order of events ¡  Exposes where efficiency can be gained by synchronous operations
  5. 5. How do I create asequence Diagram?1.  Pick a scenario that you want to model2.  Try to identify the objects that will be involved in the scenario3.  Line them across the top in the approximate order that theyre (listed in the order that they are used for the scenario)4.  Draw dotted lines down indicating lifelines5.  Identify the first event (triggering event)6.  Draw a horizontal arrow from the object that sends a message to the object that receives it7.  identify the next event and the objects involved8.  Redo steps 6 and 7 until the diagram is complete
  6. 6. Sequence Diagrams¡  Example Sequence Diagram (fast food order) :DriveThruAttdt :FryMaker :BurgerMaker Order Value Meal Place Fry Order Place Burger Order :Customer Fill Drink Assemble Order
  7. 7. Activation bars can showwhen that object is awake
  8. 8. Sequence Diagram withactivation lines :DriveThruAttdt :FryMaker :BurgerMaker Order Value Meal Place Fry Order Place Burger Order :Customer Fill Drink Assemble Order
  9. 9. We can show the lifespan ofan object¡  The object names can be lowered from along the top to indicate when they are created during the sequence¡  We can put an X on the lifeline to show when an object is no longer needed
  10. 10. Sequence Diagrams withlifespan added :DriveThruAttdt :FryMaker Order Value Meal Place Fry Order :BurgerMaker Place Burger Order :Customer Fill Drink X X Assemble Order X
  11. 11. Conclusion¡  UML sequence diagrams help you to envision what will happen during the execution of a use case¡  They are great to help developers and business analysts get to a common understanding
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×