GOF | Mnemonic | Analogy | Hot Spot |
Abs Factory | platform independence for a family of products | auto body parts stamping press | host "platform" |
Builder | parse a complex representa., create one of several targets | assembling fast food kids' meals | creation of an aggregate's elements |
Factory Meth | virtual creation through inheritance | injection molding form | subclass of object that is created |
Prototype | virtual creation through delegation | biological cell division | class of object that is created |
Singleton | guardian of the single instance | the office of the President | the sole instance of a class |
| |||
Adapter | wrap a legacy component | 1/2" to 1/4" socket adapter | interface of an object |
Bridge | decouple interface and implementation | light switch on blueprint | implementation of an object |
Composite | recursive composition | arithmetic expression | structure of an aggregate's elements |
Decorator | add skins to the onion | Christmas tree, layered courier | responsibilities of an object |
Facade | simple front-end to a complicated subsystem | telephone sales operator | interface of a subsystem |
Flyweight | use sharing to optimize lots of "little" objects | the telephone system | storage cost of objects |
Proxy | use a surrogate to control access | a check or bank draft | location and/or access of an object |
| |||
Chain of Responsibility | single processing pipe, many possible handlers | vending machine coin slot | selection of a request's receiver |
Command | encapsulate a request as an object | meal order at a restaurant | when and how a request is realized |
Interpreter | map a domain grammar to a hier to solve domain problems | musician reading music | grammar and interp of a language |
Iterator | decouple traversal of an aggregate object | secr accessing her file system | traversal of an aggregate's elements |
Mediator | provide an intermediary to decouple many peers | airport control tower | interaction between peer objects |
Memento | checkpoint/rollback an object's internal state | vendor source code in escrow | externalization of an object's internal state |
Observer | decouple dependent "views" from the independent subject | auctioneer and bidders | dependent view(s) of an independent object |
State | object's behavior morphs as its state changes | vending machine state machine | states of an object |
Strategy | plug-compatible algorithms | getting to the airport | choice of algorithm |
Template Meth | constant algorithm, replaceable steps | tract home builder's options | steps of an algorithm |
Visitor | decouple operations on an aggregate object | the subway and an all-day pass | operations on an aggregate's elements |