A single conversation with a wise man is better than ten years of study.
~ Chinese Proverb ~

Where's your Architecture?

Chris Chedgey

When a code-base grows beyond a certain size, any original arrangement of source files (or architecture) is often lost. The developers also become lost, and start drowning in the ever-expanding sea of classes.

Usually the underlying code – the classes – are in reasonable shape. The problem is that there are too many classes to understand without any higher-level guiding structure, and physical structures (such as packages or jars) have become a tangled mess.

The good news is that it is generally perfectly feasible to organize existing classes into a modular hierarchy with minimal impact on the implemented code. This is far less expensive than starting over, and more likely to succeed! A code-base with a clearly communicated, cogent architecture is much more valuable than a Big Ball of Mud, and developers will love the result.

The process of architecture discovery/development requires the use of “code-first” modeling tools such as Structure101, Lattix, SonarGraph, etc., which parse the as-is code and capture the containment and dependency structures. This model can be manipulated to organize classes into a new containment hierarchy by reusing useful aspects of the existing physical structures, and/or assembling together cohesive clusters of classes from the bottom-up.

Once a measurably well-structured containment model is in place, the allowable visibility and dependencies between groups of classes can be defined, and the code refactored as needed to make it conform. The alignment of the physical structures can follow once the implementation-level code already conforms to the target architecture.

More talks