Revision Notes/Design Patterns

Field Entry  -  Design Patterns

 Coreintermediate

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.

#structural#proxy#caching#access control

Field Note - Real-world Analogy

Think of it like this

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

01

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

Unlock Full Note

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.

Read Full Notes