Proxy Pattern

  • Use Proxy Pattern when there is a need to interact with other external service.
  • It is used to control access of the other object by creating a proxy of that object.
  • Proxy pattern is not for implementing any business logic.
  • It just acts as a wrapper which provides the object to connect to the external service.
  • Security and validation related to external service can be easily implemented and encapsulated in a Proxy.
  • When there is a need to perform some business logic before or after making a call to external service then use Facade Pattern not Proxy.
Please share this

Leave a Reply