concept temporary shelter in category software development

appears as: temporary shelter
The Mikado Method

This is an excerpt from Manning's book The Mikado Method.

Gather the pieces in a temporary shelter—a class, or possibly a module—where you can get an overview of what functionality you have for the concept. From there, it’s often easier to get an overview, remove duplication, and see the patterns for repartitioning the code.

Instead of continuing down the same path or scattering code even more, try to find a couple of core ideas behind the scattered code. Examples of this can be User or Payment—something that fits the domain at hand. Choose an existing class or create a new one for these core areas—these classes will be temporary shelters for the functionality. Then try to move all related functionality to the temporary shelter. This might be ugly, but it’s a stepping stone. figure 7.11 shows what this might look like in a Mikado Graph.

Figure 7.11. Move functionality to a temporary shelter before performing a change.