The Proxy pattern provides a surrogate or placeholder for another object to control access to it, often adding additional behavior like lazy loading or access control.
The Proxy implements the same interface as the real object and controls access to it, acting as a middleman.
A Virtual Proxy delays the creation of the real object until it is actually needed, saving resources and improving scalability.
The Proxy pattern adds an extra layer of indirection which can increase complexity and cause some performance overhead.
The client first sends the request, the proxy receives and optionally checks it, then forwards it to the real subject, which processes and returns the response.
