Origin: | unknown | |||||||||
Reason: | It is incovenient to access a service for a variety of reasons, e.g., the object providing the service is quite complex, or may not exist at the time the service is requested (and so it must be created). | |||||||||
Synopsis: | Access an object's services indirectly through another object, the proxy. Clients are generally unaware of the proxy's existence. | |||||||||
Example: | A hashtable is expensive to clone. Reading into a cloned hashtable gives the same results as reading into the original, until the original is modified. Cloning can be delayed until the cloned hashtable is to become different from the original hashtable. | |||||||||
Solution: |
|
|||||||||
See also: |
Bridge Decorator Delegation Facade |
|||||||||
Variations: |
|