More Patterns (cont.)

Pattern Name Description Example
Proxy A service needs to be made more versatile without affecting the service provider or client A proxy class sends client requests to a server object on a different computer
Singleton All clients need access to a single shared object of a class A random number singleton gives all clients access to the same generator
State A separate object is used for each state. State-dependent code is distributed over the various state classes An image editor has different drawing states. Each state is handled by a separate tool object
Visitor A structure with a fixed set of element classes needs an extensible set of operations An XML visitor visits a tree of XML elements, applying arbitrary operations to each node

prev |top |next