Divide and Conquer: Handling Complexity through Design Rule Spaces
It is normal in a complex software system that multiple design patterns are applied to accommodate different requirements, and features often overlap. The modular structures formed by design rules and modules cannot be identified easily. We define a subset of files that form a design rule hierarchy as a design rule space (DRS) . Each DRS consists of files and their direct and indirect dependents, modeling a design space formed by these files. Using DV8, the user can select a set of files of interest, and split their DRS into a separate DSM. In this way, the user can examine a complex system through the lens of DR Spaces, not having to deal with all of the complexity at once.
For example, the following DSM is derived from the source code of a small calculator program. Its design integrates multiple patterns, such as pipe and filter, composite, and visitor.
To assess if the visitor and composite patterns are applied correctly, the user can select the key interfaces of the patterns, in this case, the Node.java and Visitor.java, and click Matrix->DRH-split (as shown below):
At this point DV8 will create a new DSM that contains the selected files and their design space. In this example, the newly split DSM contains all the files the participate in the visitor and composite patterns.