← Back to design patterns mapstructural
🛡️
Design Pattern
Proxy
Use a stand-in object to control access to the real object.
Visual Diagram
Client -> Proxy checks auth/cache/rate -> Real service
When To Use
- ->Caching expensive service calls
- ->Checking authorization before access
- ->Lazy loading heavy objects
- ->Rate limiting external calls
Used in: JavaScript Proxy, ORM lazy loading, caching proxy
proxy.js
Live Editor
Loading...
Output
Run code to see output...