- pass a request down a chain of objs until one handles the request.
- handler objs either handle or forward a request.
- an interface for creating different groups of related or dependant objects.
interface «AbstractFactory» {
public function createObjectA(): ClassA;
public function createObjectB(): ClassB;
}
- eg.
«ElementFactory»
->«DomElementFactory»
,«HtmlElementFactory»
- an interface for a construction process to create different complex objects.
interface «Builder» {
public function getComplexObject(): ClassC;
public function buildObjectA();
public function buildObjectB();
}
- add responsibility to an obj dynamically
- extend functionality of an obj
:dynamically: at run-time.