Selecting the Right Diagram

The dynamic nature of the application domain can be viewed via the four diagrams just described: the two interaction diagrams (sequence and collaboration), the state diagram, and the activity diagram. When should you use which one?

  1. Sequence diagram: Use this diagram for most dynamic modeling because it pertains to the use-case pathways. The big payback here is the creation of the operational signatures for the classes in the application.

  2. Collaboration diagram: Use this diagram when the application includes complex branching dialogs that aren't rendered well in the sequence diagram. (I rarely produce collaboration diagrams, instead opting for the more familiar and more orderly sequence diagram.) Collaboration diagrams ...

Get Developing Applications with Java™ and UML now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.