Generation of the initial design hypothesis
In the last post, I laid out the generate-and-test philosophy as a basis for choosing which decisions are to be made. In this post, I discuss where the initial design hypothesis comes from.
The goal in choosing an initial design hypothesis is to try to find a design as close as possible to a satisfactory design. The closer the initial design hypothesis is to the final design, the fewer iterations will be needed through the generate-next-design-hypothesis phase.
The first major decision is to decide what collateral the architect can bring to the design process. This collateral can be from existing systems, from frameworks available to the project, or from known patterns.
- Existing systems. Many systems being constructed are similar to other systems the organization has constructed. Organizations are in a particular business or have a particular mission, and their business leads to specialization. Specialization leads to the development of variations on a theme. Product lines are a codification of the idea of variations on a theme, but for now it is sufficient to observe that there likely are collections of systems that already exist that are similar to the system being constructed. It is to the design of these systems that the architect can look for an initial design hypothesis. One variant of this situation is when the architect is given the task of modifying an existing system or of integrating an existing collection of legacy systems. In the modification case, the existing system constitutes the initial design hypothesis and in the integration case, the collection of legacy systems is the initial design hypothesis.
- Frameworks. A framework is a collection of code that provides services common in particular domains. Frameworks exist in a great many domains ranging from web applications to middleware systems to decision-support systems. The design of the framework provides the initial design hypothesis.
- Patterns. A pattern is a known solution to a common set of problems. Architects could choose a pattern based on some essential element of the problem for which they are constructing the design. Choosing the essential element of the design is a critical decision when a pattern is used as the initial design hypothesis.
Of these alternatives, the one that will likely yield an initial design hypothesis closest to a satisfactory design is the design of a system similar to the one being constructed. This is because the business context and requirements for the existing system are likely similar to the business context and requirements for the new system, and many of the problems that occur have already been solved in the existing design.
A pattern solves one set of problems and is neutral with respect to others. This means that the problems not solved must be identified during the testing phase and solved during the generate-next-design-hypothesis phase. The number of problems not addressed by the existing system will be smaller than the number with a pattern. Frameworks lie between the other two alternatives in terms of desirability. They provide a set of services that may include many of the services necessary. They are, by necessity, however, general solutions for a particular domain, and the specifics of the system being designed are not being addressed.
Another option for the initial design hypothesis comes from performing an object-oriented design process. This will divide the responsibilities to make certain modifications easier, but it does not address any of the quality attribute requirements.
The choice among these alternatives is also affected by the portion of the system being designed. There may be existing systems for various portions but not for the overall structure. It may be that during the design process a portion of the system is being designed for which there are no existing systems or frameworks in which case a pattern is the appropriate place to begin.
– Len Bass, SEI