Monthly Archives: September 2019

Proxy Pattern

Instead of interact with direct resource, client interacts with proxy, then proxy interacts with real resources. Reasons could be: cache, security, encapsulation(http).

A proxy has same interface as the original class. In this case, the proxy has same behavior as original class. Adaptor changes the interface. Facade enhances the interface.

In below graph:
RealSubject implements ISubject. Proxy implements ISubject. Proxy has RealSubject

proxy_pattern

https://www.geeksforgeeks.org/proxy-design-pattern/