Discovering patterns in the architecture

You select a pattern and click Discover Architecture to find code that displays classes and interfaces that constitute the selected pattern. Reviewing the patterns in code architecture is an efficient way to gain an understanding of how an application is designed.

Before you run architectural discovery, the workspace must be loaded or a working set must be created. One reason to create a working set for this review is to minimize the code base that will be analyzed, thus decreasing the time the analysis takes. The working set could consist of either only the most relevant code or a smaller subset of the workspace.
To automatically discover a pattern in the architecture of existing code:
  1. Click Window > Show View > Other, expand Modeling, select Diagram Navigator, and click OK. The Diagram Navigator view opens.
  2. In the Diagram Navigator view under Architectural Discovery, expand one of the following categories to show the patterns in it:
    • Design Patterns
    • Object-oriented Patterns
    • Structural Patterns
    • System Patterns
  3. Select the pattern you want to detect in the code architecture.
  4. Right-click the pattern and click Discover Architecture. The processing time depends on the size of the workspace or working set. The Progress window opens to indicate the status of the architectural discovery as it searches the workspace for instances of the selected pattern in the code. When the architectural discovery finishes, the number of topic diagrams created that display classes and interfaces constituting the selected pattern appears in brackets, as illustrated here: .
Related concepts
Scope and benefits of architectural discovery
Patterns in architectural discovery

Related information

Architectural discovery patterns reference

Feedback
(C) Copyright IBM Corporation 2004, 2005. All Rights Reserved.