Technique 2: Add New Questions
At an architectural level, the most apparent effect of correct encapsulation is the ability to change your mind. Decisions have to be made—there's no way around that. What you can control is whether the decisions you make are commitments or plans.
Figure 2 shows a typical architectural process that I'm sure will be familiar:
- Start with the problems that have to be solved.
- Next, decide which components, services, and so on will be used to solve those problems.
- Then decide which solutions will be written and which will be purchased.
- Finally, schedule work to be done.
Figure 2 A familiar process.
Early commitment is the All-Father of every Big Design Up Front ever perpetrated.
People create a Big Design Up Front because they want to get things right, from the project's beginning. They feel they have to get things right early on because they're committed to a certain implementation, dependency, or similar decision. Early commitments are often extracted due to the cost of creating and executing a Big Design Up Front. It's a vicious circle, and the breaking point is early commitment, as shown in Figure 3.
Figure 3 Make your vorpal blade go "Snicker-snack"!
Unlike commitments, plans are adaptable and changeable. A true plan is understood to be a guess, continually reviewed and revised as the plan's assumptions are determined to be invalid.
You want to tip people's behavior in the direction of making plans and deferring commitments. Do this by adding a question to your architectural process: "How do we change our minds later?"
Essentially, you change the process shown in Figure 2 to the one shown in Figure 4. This change is inexpensive to make. In what can often be days of long-range planning meetings, adding a few minutes to hedge your bets just makes sense.
Figure 4 A slight modification to a familiar process.
This shift makes encapsulation of the unknown a fundamental part of your architectural process. It also has the effect of reinforcing the importance of encapsulation within your organization, which contributes to the establishment of an encapsulation-oriented culture.