12.07.2015 Views

DEV475 Mastering Object-Oriented Analysis and Design with UML ...

DEV475 Mastering Object-Oriented Analysis and Design with UML ...

DEV475 Mastering Object-Oriented Analysis and Design with UML ...

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Module 6 - Use-Case <strong>Analysis</strong>Collaboration Diagrams vs. Sequence DiagramsCollaboration Diagrams vs. Sequence Diagrams• CollaborationDiagrams• Show relationships inaddition to interactions• Better for visualizingpatterns of collaboration• Better for visualizing allof the effects on a givenobject• Easier to use forbrainstorming sessions• Sequence Diagrams• Show the explicitsequence of messages• Better for visualizingoverall flow• Better for real-timespecifications <strong>and</strong> forcomplex scenarios<strong>Mastering</strong> <strong>Object</strong> <strong>Oriented</strong> <strong>Analysis</strong> <strong>and</strong> <strong>Design</strong> <strong>with</strong> <strong>UML</strong>Copyright © 2003 Rational Software, all rights reserved 35Sequence diagrams <strong>and</strong> Collaboration diagrams express similar information, but showit in different ways.Collaboration diagrams emphasize the structural collaboration of a society of objects<strong>and</strong> provide a clearer picture of the patterns of relationships <strong>and</strong> control that existamongst the objects participating in a use case. Collaboration diagrams show morestructural information (that is, the relationships among objects). Collaborationdiagrams are better for underst<strong>and</strong>ing all the effects on a given object <strong>and</strong> forprocedural design.Sequence diagrams show the explicit sequence of messages <strong>and</strong> are better for realtimespecifications <strong>and</strong> for complex scenarios. A Sequence diagram includeschronological sequences, but does not include object relationships. Sequencenumbers are often omitted in Sequence diagrams, in which the physical location ofthe arrow shows the relative sequence. On Sequence diagrams, the time dimension iseasier to read, operations <strong>and</strong> parameters are easier to present, <strong>and</strong> a larger numberof objects are easier to manage than in Collaboration diagrams.Both Sequence <strong>and</strong> Collaboration diagrams allow you to capture semantics of theuse-case flow of events; they help identify objects, classes, interactions, <strong>and</strong>responsibilities; <strong>and</strong> they help validate the architecture.6 - 35

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!