Polski

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

Around the topic

In this group: Structural patterns