astah professional logo

Index

Back

Tutorial - [State Transition Path]

Next

Tutorial - [Inconsistency Check]

[DSM] Clear analysis on dependency relationships

Design Structure Matrix (DSM) offers clear analysis on dependency relationships Astah visualizes the dependency relationships between Classes, Interfaces, and Packages. The DSM automatically updates itself as you model. This quickly alerts you to overly specific dependencies and circular references in a concise colorcoded chart. We'll show you the basic operations of DSM with this tutorial.

    1. Start Astah Professional and create a Statemachine diagram
    2. Display DSM
    3. Disperse the Class that has too many dependencies
    4. Solve the circular reference
    5. Solve the indirect reference

1. Start Astah Professional and create a Class diagram

Download Astah Professional and install DSM Plug-in (See how to install). To create a Class Diagram, go to [Diagram] - [Class Diagram].

Astah Professional sample Statemachine Diagram

To create a Class, select [Class] in the Tool bar and then click on the diagram.
Astah Professional sample Statemachine Diagram

To create a Generalization, select [Generalization] in the tool bar and then click two Classes that you want to connect with.

Astah Professional sample Statemachine Diagram

Then draw a Class diagram like below.

Astah Professional sample Statemachine Diagram

2. Display DSM

If you have installed DSM Plug-in correctly, [DSM] tab should appear in the bottom pane just below the Diagram Editor. The colored cell is an alert that you should check up.


Astah Professional Sample Class Diagram

Each color alerts the following:

Color Cell Risks
Red Circular reference Could rise the dead lock and closed loop, degrade of the modulability
Pink Indirect circular reference Same as above
Yellow Has more than 5 dependencies Too much responsibility on one pole. Changing of this model could rise big influences in wide filed.

3. Disperse the Class that has too many dependencies

First let's take care of the cells in yellow.
Astah Professional Sample Class Diagram

You can tell that the "Service2" - No.6 has too many dependencies as it is shown in yellow. If this is out of your intention, this Class's responsibility may be too expanded. Let's add a new Class "Service 4" and then disperse the dependencies of Service 2 to it.


Astah DSM

Update the DSM, now you see that the yellow cells are gone. Astah DSM2

4. Solve the circular reference

Okay, now let's solve the circular reference.

Circular references are shown in red cells which are the Service 3 and Service 4. Circular references could cause dead lock, memory leak or degrades the modulability. The resolution varies depending on the case. In this tutorial, let's remove the Service 4's dependency from Service Class 3. Then the red cells would disappear.

Astah DSM circular referencecyclic

Astah DSM circular referencecyclic

5. Solve the indirect reference

At last, let's solve the indirect reference.

Pink cells alert the indirect references that are the Service 3, Service4 and Data 5. Indirect references could cause the same problem that we mentioned at the Circular references. So to solve this, reverse the dependency direction between Data 5 and Service 3 as it was supposed to be. Now the DSM is all in white and all the risks have been taken care of.

Astah DSM circular referencecyclic

Astah DSM circular referencecyclic

Note

Clear analysis on DSM could help finding the risks of the dependencies of models as you model.