Structural patterns
Proxy
Stands in for the real object and controls access to it: lazy loading, caching, permissions.
Article
Proxy – a stand-in that controls access to the real object
Proxy has the same interface as the real object and stands in front of it, deciding when – and whether – to pass a call on. An invoice archive example with access control and a lazy connection in C#, TypeScript, Java, Go and Python.
Related articles
- Decorator – adding behaviour layer by layer
Decorator wraps an object in another object with the same interface and adds behaviour before or after the call. An example of caching, retries and logging for an exchange rate provider in C#,…
Challenges
- Exchange-rate caching proxy medium
- LRU cache medium
Around the topic
- Proxy article · web · Refactoring.Guru
- Proxy vs Adapter vs Facade Pattern | Code Walks 012 video · youtube · Christopher Okhravi
- Facade vs Proxy vs Adapter Design Patterns article · devto · Mohamed Mayallo
- Design Patterns: Elements of Reusable Object-Oriented Software book · openlibrary · Erich Gamma, John Vlissides, Richard Helm, Ralph Johnson
- 10 Design Patterns Explained in 10 Minutes video · youtube · Fireship
- Pełnomocnik / Proxy article · web · Refactoring.Guru