Friday, 7 August 2015

The Proxy Pattern

The Proxy Pattern

Defined

The Proxy Pattern provides a surrogate or placeholder for another object to control access to it.

Diagram


Bullet Points

  • The Proxy Pattern provides a representative for another object in order to control the clients access to it. There re a number of ways it can manage that access. 
  • A Remote Proxy manages interaction between a client and a remote object.
  • A Virtual Proxy controls access to an object that is expensive to initiate.
  • A Protection Proxy control access to the methods of an object base on the caller.
  • Many other variants of the Proxy Pattern exist including catching proxies, synchronization proxies, firewall proxies, 
  • Proxy is structurally similar to Decorator, but the two differ in purpose.
  • The Decorator Pattern adds behavior to an object, while a Proxy controls access.
  • Like any wrapper, proxies will increase the Sumner of classes and objects in your design.

No comments:

Post a Comment