Polymetric Views are a powerful visualization technique designed to support the analysis of object-oriented software systems. Described by Michele Lanza and Radu Marinescu in their book Object-Oriented Metrics in Practice, this approach helps developers and software architects quickly identify design anomalies and gain insights into the structure and quality of their codebase.
What Are Polymetric Views?
A Polymetric View represents software artifacts—such as classes, packages, or modules—as graphical elements whose visual properties (e.g., size, shape, position, color) are mapped to various software metrics. This allows multiple dimensions of data to be encoded in a single, compact visualization.
For example:
-
The height of a class box might represent the number of methods.
-
The width might indicate the number of attributes.
-
The color could reflect code complexity or coupling.
-
The position may be determined by package structure or inheritance.
Why Use Polymetric Views?
Polymetric Views provide a fast and intuitive way to:
-
Detect God Classes, high coupling, or low cohesion.
-
Understand package and class dependencies.
-
Explore inheritance hierarchies visually.
-
Identify potential refactoring candidates.
By transforming raw metrics into visual representations, Polymetric Views help shift your perspective from line-by-line code to system-wide design quality.