San Francisco Design Patterns - Carey, Carlson, Graser

Foundational Patterns

Class Replacement (23) Provide the means to change the behavior consistently for a provided class without changing the provided class or application logic that already uses that class.

Special Class Factory (33) Provide a way of creating a class that supports customization of how and where the instances are created.

Property Container (41) Provide a flexible means to dynamically extend an instance of a business object with attributes or relationships to other business objects.

Business Process Command (51) Provide an extensible mechanism for encapsulating a business process supported by a logical business object or subsystem that is implemented as multiple physical objects.

Behavioral Patterns

Simple Policy (61) Define a family of algorithms, encapsulate each one, and make them interchangeable. This pattern is similar to the Strategy pattern in the GoF book. It lets the algorithm vary independently from the business objects affected by it.

Chain of Responsibility-Driven Policy (75) Define a family of encapsulated domain algorithms and associated chains of responsibility to locate the correct algorithm to be used and make the family members interchangeable so that either a domain algorithm or a chain of responsibility can be configured into a business object. Encapsulated chains of responsibility search for the correct domain algorithm based on business objects involved in the processing being done by the domain algorithm.

Token-Driven Policy (91) Define a family of encapsulated domain algorithms for a behavior and make them interchangeable, establish groupings of these algorithms and configure these groupings into business objects responsible for the behavior, and control which algorithm is used, on the basis of the client (represented by token) using the behavior.

Structural Patterns

Controller (103) Provide a composite view of objects of a specific type across a hierarchical context. Users of this view are not aware of which context provides a particular object. Objects within the view may be aggregated (retrieved) from a higher-level context or provided locally at the current context. Locally defined objects either are newly introduced or override an aggregated object. The pattern also provides a way to hide objects that would otherwise be aggregated.

Key/Keyable (145) Encapsulate a set of diverse business information in such a way that the set can be used as an independent whole for processing information. These uses include mapping, combining, filtering, and caching information.

Generic Interface (179) Provide an enforceable object-oriented way of working with another subsystem without coupling this use with the particular implementation of that subsystem.

Process Patterns

Cached Aggregate (193) Provide an encapsulated way of storing, updating, and retrieving the results of an aggregation, or a derivative of the aggregation, for a set of criteria, and it does so in a manner that provides a configurable means of effectively maintaining and using a cache of aggregations that require fast access.

Keyed Attribute Retrieval (221) Provide a way of retrieving values of an attribute on the basis of a set of criteria. How the criteria are used is encapsulated in a policy to allow easy customization.

List Generation (235) Define a consistent way of generating a list from a set of input items, and working with the list and its entries. List entries are composed of one or more input items with common characteristics that are selected by policy.

Dynamic Behavioral Patterns

Extensible Item (249) Allow an object to support dynamic changes in behavior and data, simulating dynamic inheritance. The mechanisms defined by this pattern include adding, removing, or overriding supported methods and adding or removing data attributes as necessary to model a business object correctly at different stages of its existence.

Hierarchical Extensible Item (269) Provide a flexible, loosely coupled mechanism for arranging business objects in a tree structure that naturally reflects the structure and behavior of hierarchies of entities found in many business domains, and allows those entities to emulate dynamic inheritance.

Business Entity Lifecycle (285) Allow a business object to accurately model the various lifecycle paths of the business entity it represents through a decoupled and configurable state management mechanism. State and behavioral changes in the modeled business entity that occur at each stage of its lifecycle are reflected in the associated business object by runtime changes to the object's behavior and data.

Hierarchy Information (315) Provide a mechanism for capturing and defining hierarchical process structure and common lifecycle behavior for instances of a business entity that share a specific usage type.

Decoupled Processes (329) Represent applicable business processes for a given business entity in a self-contained and reusable form, allowing the processes to be arranged in arbitrary orderings for specific types and uses of the business entity.