Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

          Where: SDC is the Static Defect Count per severity.

Application Architecture

The Application Architecture gives you a roadmap and best practices to follow when building an application, so that you end up with a well-structured app. Quality Reviewer is able to create a Design Structure Matrix (DSM) and a Call Graph, by reading the source code, binaries and/or related UML diagrams.

DSM-Design Structure Matrix

An example of Quality Reviewer’s automatically generated Design Structure Matrix is shown below:

...

A Design Structure Matrix consists of a matrix to visualize Dependencies of hierarchically organized elements and a set of algorithms which can be applied on the matrix to sort the elements in order to discover layering.

A Design Structure Matrix (DSM) is made by two parts

  • A matrix to visualize dependencies

  • Algorithms which can be applied on the matrix to discover e.g. layering in the software.

The DSM consists of a matrix with the same elements in the rows and columns

  • The hierarchy of packages and elements is visible on the left.

  • The relations between the elements are shown in the cells.

In a DSM, the hierarchy can also be folded in whole or in part. The relational strengths of the collapsed cells are simply combined. As a result, the DSM will become more compact, but will still remain correct in terms of content.

In this way it is possible to display a system with thousands of elements and still keep the overview.

DSM Architectural Discovery

By applying a partitioning algorithm on the DSM, the layering of the software will be discovered by Quality Reviewer during the Static Analysys. Such an algorithm tries to reorder the DSM in such a way that as many relationships as possible come under the diagonal.

After partioning elements with many inbound relationships (providers) have shifted to the bottom, while the elements with many outgoing relationships (consumers) have shifted to the top.

Cyclic relations can be easily spotted, because the type of relations remain above the diagonal.

DSM Assist in refactoring

A DSM can be used to improve the dependency structure. One can think of:

  • Removing cyclic dependencies.

  • Improving the cohesiveness of a component by move elements to other component were the have stronger relations.

In the matrix we can move an element to another component or layer, combine it with other elements or split and then recalculate all dependencies to see if this yields a better dependency structure.

After recalculating the dependencies it can be seen that the cyclical relationship between the presentation and application layer has disappeared.

The advantages of such an impact analysis are particularly evident in improvement scenarios that take place at the architectural level and thus affect multiple components. Without the use of a DSM, such analysis are unreliable, because the intended and the actual software architecture often do not match.

DSM-Supported Languages

  • .NET: C# and vb.NET Assembly

  • JAVA, Clojure, Groovy, Kotlin JAR files

  • C/C++ Source and Header files

  • UML in Sparx System Enterprise Architect format

  • DSM Files from 3rd-party tools (for example ArgoUML)

  • DSI Model. Two DSI Model files can be compared

A DSI Model file is a way to import 3rd-party analyzer’s DSM output to Quality Reviewer.. A DSI file represent an analyzer’s output. Each code analyzer must export its DSM results to DSI file. To ensure that the Quality Reviewer can import this file, it must conform the DSI file XSD schema below:

...

Call Graph

Starting from source code, a Call Graph is automatically generated by Quality Reviewer showing how classes and functions call each other within an application:

...