# Popular Design Patterns This is an excerpt from Code Complete by Steve McConnell. Table 5-1 Popular Design Patterns *Abstract Factory* Supports creation of sets of related objects by specifying the kind of set but not the kinds of each specific object. *Adapter* Converts the interface of a class to a different interface. *Bridge* Builds an interface and an implementation in such a way that either can vary without the other varying. *Composite* Consists of an object that contains additional objects of its own type so that client code can interact with the top-level object and not concern itself with all the detailed objects. *Decorator* Attaches responsibilities to an object dynamically, without creating specific subclasses for each possible configuration of responsibilities. *Facade* Provides a consistent interface to code that wouldn’t otherwise offer a consistent interface. *Factory Method* Instantiates classes derived from a specific base class without needing to keep track of the individual derived classes anywhere but the Factory Method. *Iterator* A server object that provides access to each element in a set sequentially. *Observer* Keeps multiple objects in synch with one another by making an object responsible for notifying the set of related objects about changes to any member of the set. *Singleton* Provides global access to a class that has one and only one instance. *Strategy* Defines a set of algorithms or behaviors that are dynamically interchangeable with each other. *Template Method* Defines the structure of an algorithm but leaves some of the detailed implementation to subclasses.