CloudCoders / Design-Patterns

Project for learning and discuss about design patterns
16 stars 1 forks source link

Proxy design pattern #31

Closed Cotel closed 7 years ago

Cotel commented 7 years ago

This one is for me 😈

Cotel commented 7 years ago

Taken from my document:

  1. Virtual Proxy, In place of a complex or heavy object, a skeleton representation may be advantageous in some cases. When an underlying image is huge in size, it may be represented using a virtual proxy object, loading the real object on demand.
  2. Remote Proxy, In distributed object communication, a local object represents a remote object (one that belongs to a different address space). The local object is a proxy for the remote object, and method invocation on the local object results in remote method invocation on the remote object. An example would be an ATM implementation, where the ATM might hold proxy objects for bank information that exists in the remote server.
  3. Protection Proxy, A protection proxy might be used to control access to a resource based on access rights.
  4. Un Proxy inteligente, que añade lógica adicional a los accesos del objeto envuelto, como contar las veces que ha sido accedido, comprobar que el objeto no está protegido contra escritura, etc.