![]() | ![]() |
|||||
| ||||||
Object Oriented Design (OOD) has two types of diagrams, static and dynamic. Static diagrams are represented as Class diagrams, while Dynamic diagrams are represented as State, Sequence and/or Collaboration diagrams. This article will not go into the differences between the Sequence and Collaboration diagrams, but will use the Collaboration diagram as the Dynamic diagram representative.
It seems to be that designers with a heavy database background tend to always describe systems using Collaboration diagrams. At the same time some designers with an Object Oriented (OO) background tend to describe systems using Class diagrams.
During the OOD process one should alternate back and forth between the Static (Class) and Dynamic (Collaboration) diagrams. This is necessary because they validate one another. Problems occur when designers stick with one type of diagram throughout their design. Consider figure 1 for example. It is a Collaboration diagram that shows the relationship between the Odometer, TireRotator and OilChanger. This diagram is necessary in the design to demonstrate that the Odometer does indeed communicate with the other two objects.
![]() |
| Figure 1 |
However the designer should also be concerned about the associations and dependencies. OO programming languages provide the means to do dependency management. The Class diagram is where dependencies are obvious. The Collaboration diagram reveals nothing of the possible underlying class design, which is why figure 2 is required to complete the description of the design.
![]() |
| Figure 2 |
Here we see that the Odometer is not dependent upon either the TireRotator or the OilChanger. This design takes advantage of a form of the Observer Pattern from "Design Patterns", Gamma, Addison-Wesley 1999. The class diagram shows the dependencies and allows for the verification of dependency management.
| Contact Us | Copyright © 2007 Roffers Engineering, Inc. All Rights Reserved. |