Looking Inside Patterns

Now that you know what patterns are and what they're not, you're ready to take a look at what's inside a pattern. Every pattern contains, in one form or another, the following information:

  • The title of the pattern
  • A statement of the problem
  • The context in which the problem exists
  • The forces or trade-offs involved
  • The proven solution

images

The solution balances the forces to solve the problem in the context.

In the following section, I look at these parts of a pattern in detail, as well as some other common pattern sections. (See Chapter 8 for a discussion of the how to evaluate a pattern's usefulness.)

Title

The first thing you see when you look up a pattern is the title. A good pattern title gives you a sense of what the pattern does and how it does it, and it may even enter the architectural vocabulary (see “Architectural vocabularies,” earlier in this chapter).

Sometimes, a pattern has a few alternative titles — other names for that pattern that you may already know or (for an unpublished pattern) various titles that the author is still considering.

Problem statement

Each pattern should contain a clear statement of the problem you're solving. The problem should be specific to the context, and it should be succinct. Good patterns solve small problems instead of attempting to solve big problems like world hunger. These smaller patterns, examples of which are ...

Get Pattern-Oriented Software Architecture For Dummies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.