Sequence Diagrams

Jump to: navigation, search


Sequence diagrams for modelling how objects interact with each other.


The dish

Sequence Diagrams



In the General Analysis phase you construct a sequence diagram for each central use case scenario in order to provide a general view of the dynamics of the system-to-be. The diagrams should only be rough sketches - they will be refined later on in the development process. The classes involved in the diagrams cover large areas of responsibility. Typically, they will be broken down to several more specialised and detailed classes in the Realisation phase.


The aim of the sequence diagrams produced in the General Analysis phase is to establish a rough idea of how the system-to-be will provide the functionality given by the use cases.

General purpose of sequence diagrams

You use Communication Diagrams and sequence diagrams for the same purpose. Both types of diagrams model how objects interact with each other, and they should both provide you with an answer to the following question: "When does Who do What with Whom?". A sequence diagram will answer this question leaving no doubt, because the rules for constructing and reading the diagram are rather strict.

A film analogy

Let us say that you were given the task of explaining what went on in "The Lord of the Rings" using UML only. A sequence diagram is the perfect tool for a precise description of a given scene - it is the equivalent of a script. You could use a class diagram to list the creatures appearing in the film and their relations. State machine charts would be perfect to model how Frodo's state of mind changes as he approaches the final encounter with Sauron.


Now let us turn to the system that should regulate the temperature in a house in accordance with the user's wishes. The following diagram shows how a temperature entered by the user could be processed.

The user enters the temperature in a web-browser and the temperature is sent to a some piece of code on the server. The temperature is checked and the database is updated if the temperature is valid.

Sequence Diagram.jpg

Used In

The sequence diagrams is widely used in the design process to illustrate the dynamics of the system, hence they are used very much in the Realisation Phase.

From here you may want to go on with Requirements Analysis.