Revision Notes/Design Patterns
Field Entry - Design Patterns
Proxy Pattern
Provides a substitute or placeholder for another object to control access to it, add caching, or add logging without changing the real object.
Read the full Design Patterns guide → · Or jump to the cheat sheet →
Field Note - Real-world Analogy
“Like a celebrity's manager. When someone wants to book the celebrity, they go through the manager (proxy). The manager checks if the client can afford it, checks the schedule, and handles all communication. The celebrity (real object) only deals with the actual performance.”
Field Observations - Key Topics Covered
A Proxy sits in front of a real object and intercepts all calls to it. From the outside, the proxy looks identical to the real object (it implements the same interface). But before or after delegating to the real object, it can do extra things.
4 more observations inside
Sign in to read every key point in full
Ready to go deeper?
Open the complete revision note.
Sign in to read every field observation in full, including a runnable code example and side-by-side comparisons with related patterns.
See Also in Design Patterns