Advantages of the Proxy pattern

As we've seen how the Proxy pattern works in the real world, let's browse through the advantages of the Proxy pattern:

  • Proxies can help improve the performance of the application by caching heavy objects or, typically, the frequently accessed objects
  • Proxies also authorize the access to RealSubject; thus, this pattern helps in delegation only if the permissions are right
  • Remote proxies also facilitate interaction with remote servers that can work as network connections and database connections and can be used to monitor systems

Get Python: Master the Art of Design Patterns now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.