This page is an excerpt from Chapter 8 of Use Case Driven Object Modeling with UML - Theory and Practice.

Once you’ve finished robustness analysis, and you’ve held a preliminary design review, it’s time to begin the detailed design effort. By this time, your use case text should be complete, correct, detailed, and explicit. In short, your use cases should be in a state where you can create a detailed design from them.

All the steps in the process so far have been preparing the use cases for the detailed design activity. Having completed robustness analysis and the PDR, you should now have discovered pretty much all of the domain classes that you’re going to need.

The two main diagram types used in detailed design are sequence diagrams (to allocate behavior to classes) and class diagrams (to record the allocated behavior and show a static overview of your design).

 

Sequence Diagrams and Detailed OOD

If you figure that preliminary design is all about discovery of classes (aka object discovery), then detailed design is, by contrast, about allocating behavior (aka behavior allocation)—that is, allocating the software functions you’ve identified into the set of classes you discovered during preliminary design.

When you draw sequence diagrams, you’re taking another sweep through the preliminary design, adding in detail.

With preliminary design, you made some informal first guesses at how the classes will interact with each other. Now it’s time to make those statements very precise, to turn them into a detailed design that works within the Technical Architecture that you’ve defined.

You use sequence diagrams to drive the detailed design. But note that we advocate drawing your sequence diagrams in a minimal, quite specific format (which we describe fully in this chapter). There’s a direct link between each use case, its robustness diagram, and the sequence diagrams. Just as you drew one robustness diagram per use case, you’ll also draw one sequence diagram per use case.

The following diagram shows the sequence diagram notation (click the diagram for a larger version):

Sequence Diagram Notation

 

DON’T TRY TO DRAW FLOWCHARTS ON SEQUENCE DIAGRAMS (FOCUS ON BEHAVIOR ALLOCATION INSTEAD)

UML 2.0 allows you to draw full-blown flowcharts on your sequence diagrams. However, even though the notation supports it, we consider the practice of drawing flowcharts on sequence diagrams to be inadvisable, because it puts emphasis on the wrong part of the problem.

In large part this is because drawing flowcharts simply misses the point of what you should be thinking about when you draw a sequence diagram. If you’re trying to drive a software design from use cases, it’s vitally important to get the allocation of operations to classes correct. This allocation of operations to classes tends to be a make-or-break design issue.

In the ICONIX Process, the primary purpose of the sequence diagram is to make this behavior allocation visible so that you get it right. If your mind is on drawing a flowchart, it’s not going to be focused on this critically important set of behavior allocation decisions.

Once you’ve finished all the sequence diagrams for the use cases you’re working on in the current release and updated your static model (class diagrams), you need to perform a Critical Design Review (CDR). The CDR forms something of a reality check for your design. We illustrate how to perform effective design reviews in our Use Case Driven book. Once the CDR is done, the implementation stage (coding and unit testing) begins.