Six Ways to Improve Class Design for Better Software
Decomposing a system design into small classes with narrow responsibilities is essential for creating a maintainable software product. However, without guidance, it can often be difficult—especially for new software developers—to see how a large class might be broken down into smaller pieces. The problem usually isn’t knowing how to make a change, it’s knowing what change to make. Max Guernsey shares six techniques that can ease the burden of identifying smaller design elements. These include direct examination of code qualities, modeling real-world entities, responding to code smells, commonality-variability analysis, examining name-ability, and listening to feedback from your tests. Max explains there are many ways to decompose classes—some effective, many not. Leave with a “toolbelt” and new tools for breaking big, intractable classes down into many small and implementable ones.