Why Do We Need PBE?
As with most types of reusable assets, the more generic the asset, the lower the return that each reuse will provide. Many books since the original GoF book have provided guidance on these first 23 patterns. These books have mapped the patterns to numerous languages, detailed the designs of the patterns, and used the patterns to detail how to perform object-oriented development. In addition, many more patterns have been created and shared. A search of the web or a bookstore will lead you to numerous results that list patterns and pattern-related documents. For instance, the Handbook of Software Architecture website15 has cataloged 2,000 patterns so far. So if we have all of these patterns available to us, you might leap to the conclusion that our problems in delivering software have been alleviated. Unfortunately, that is not the situation; the answer is not as simple as just saying, "Use patterns."
As patterns have been available for use in software development for quite some time now, one would expect that there would be a very high adoption rate and that we would have already reached a very high level of maturity in using them successfully. Unfortunately, we have run into a number of issues in using patterns. In practice, we see that
- There is little methodology that actually shows how to use and leverage multiple patterns within a solution. This leads to random and nonstrategic use of patterns.
- Most of the patterns that people use are the GoF patterns.
- In cases where other patterns are used, they are often used in isolation rather than being woven together as part of a larger solution.
- There is little skill in identifying and formalizing patterns that are unique within an organization. In addition, there is little focus on such patterns.
- If patterns are used, they are used only for forward-engineering a solution.
- Abstraction is put to limited use.
- There is concern that restricting the creativity of the developers within the organization will diminish job satisfaction.
- The patterns used are often invented elsewhere. 16
Would the application of a systematic, disciplined, and quantifiable approach to pattern use solve some of the issues that have limited their success to date?
The Importance of Creativity, Constraints, Rules, and Assumptions
Popular business literature stresses the importance of creativity, and we expect and value it in new team members. However, unmanaged and unfocused creativity can be detrimental to a project. We need to channel and focus the creativity of the team; we want creativity with purpose, creativity that helps us to reach our goals.
We use platform decisions, architectural styles, architectural patterns, and so forth as mechanisms for narrowing the solution space in a collaboratively disciplined way. To support both the production and consumption of patterns, we seek to leverage constraints, rules, and assumptions. To ensure that we are all on the same page, let's take a quick look at the definitions associated with these terms:
- Creativity: "Characterized by originality and expressiveness; imaginative" 17
- Constraint: "The state of being restricted or confined within prescribed bounds" 18
- Rule: "A principle or regulation governing conduct, action, procedure, arrangement, etc." 19
- Assumption: "A statement that is assumed to be true and from which a conclusion can be drawn" 20
In addition to using patterns to focus the creativity of the team, we also want to support the consumption of the patterns. Where's the value in cases where a Pattern User is unable to use a pattern? To help support consumption we provide constraints and rules. Constraints and rules ensure that the pattern is used correctly. In the case of a pattern implementation, the assumptions that are found within the pattern help to reduce the amount of information the user of the pattern needs to provide.
When we turn our focus to the building of patterns, we similarly need to look for ways to manage our creativity. We can use patterns to guide us in identifying, documenting, and building patterns. In addition, we need to leverage the creativity of the team to identify, document, and build the patterns that our organization needs.