Chapter 7. Improving your application design

 

This chapter covers

  • Layering your code
  • Discovering dependencies and eliminating cycles
  • Library management for Mavenites
  • Defining your architectural rule set

The size of an active project increases commit by commit, day by day, week by week. As your software grows, it gets more complex. New classes are added, methods are improved, and new libraries are created. Gradually, the structure that was clearly delineated and pristinely designed at the start turns into a morass. The first sign of trouble you usually notice is the mess of external libraries needed in order to compile and run an application in a production-like environment, but that’s just the tip of the iceberg.

In chapter 6, we looked at complexity at a file level. In this chapter, we’ll zoom out to look at complexity at the package, module, and application levels, and discuss how to use SonarQube to keep your architecture in good modular shape. We’ll look at package and module-level dependencies and show you how to read the Dependency Structure Matrix (DSM) to find suspicious dependencies and suspicious cycles among software components. We’ll talk about why they’re bad and how you can remove them.

7.1. Layering your code

7.2. Discovering dependencies and eliminating cycles

7.3. Defining your architectural rule set

7.4. Summary

sitemap