Pattern : COMMON PROBLEMS
HIGHLIGHTED
- CONTEXT : You are writing a pattern language that
provides several patterns that solve the same problem.
- PROBLEM : How do you make readers aware that they should
choose one of the alternative solutions?
- FORCES :
- A pattern is
normally considered to be a problem-solution pair. Most
pattern forms currently in use do not lend themselves to
sharing a problem section amongst several competing
patterns without taking some liberties with the form.
- Repeating the
problem in each pattern that provides a solution may
confuse readers by giving them a sense of "deja vu"
without explaining the cause for it. They may not
realize that there are several solutions to choose from
and may expend considerable energy trying to figure out
how to apply all the solutions simultaneously!
- Having the problem
repeated in each pattern that provides a solution
increase the effort required to maintain each pattern.
- The problem
section is not the only part of the pattern that would
have to be duplicated. All patterns which solve the same
problem should include the same set of forces, while the
context determines their relative priority.
- SOLUTION : When several patterns solve the same problem, make this obvious by pointing out to the reader that there are
several solutions to this problem. You can capture the common problem and forces in one place using Separate Problem Description or
Referenced Problem Description. If you choose to repeat the problem description as described in Duplicate Problem Description you should
notify the reader that you have done so.
- RATIONALE : It is very easy for readers to become confused if several patterns have similar or identical problem
descriptions unless it is pointed out to them that these patterns provide alternative solutions.