Summary
The latest version of JetBrains' IntelliJ IDEA includes a new dependency analysis tool that presents a structured matrix of dependencies in a large Java codebase. Maria Khalusova introduces this tool in a recent article.
Advertisement
Many problems in a software project result from a system's complexity, and one measure of complexity is the degree to which system components depend on one another, according a recent article by Maria Khalusova, Dependency Analysis with DSM. The article's focus is a dependency analysis tool included in the IntelliJ IDEA Java IDE that helps create a visual overview of a project's dependencies.
The visual technique used in IntelliJ for representing project dependencies is a dependency structure martix, or DSM:
[DSM] a method for exploring dependencies between program parts (modules, classes, etc.), and provides a compact matrix representation of a project. It helps you visualize the dependencies between the parts of a project and highlights the information flow within a project.
Khalusova's article includes several visual examples of what a DSM martix looks like, and how it can be used to quickly spot overly complex dependencies in a large Java codebase, such as the following:
The various highlights in this diagram are explained in the article. This sort of rapid overview draws attention to possible risks in a codebase:
While exploring dependencies you may find that some part of your project deserves more attention and should be discovered in detail while the rest of the project is not of interest at the moment. In such case, you can limit the scope of your DSM to the selected rows, or dependencies...
What do you think of the dependency matrix used in IntelliJ as a way to visualize software complexity? What dependency analysis tools do you use in your Java projects?