Chapter 11. Proxy

An ordinary object does its own work in support of the public interface that it advertises. It can happen, though, that a legitimate object cannot live up to this ordinary responsibility. This may occur when an object takes a long time to load, when you need to intercept messages to the object, or when the object is running on another computer. In these cases, a proxy object can take the responsibility that a client expects and forward requests appropriately to an underlying target object. The intent of the PROXY pattern is to provide a surrogate or placeholder for another object to control access to it.

A Simple Proxy

A proxy object usually has an interface that is nearly identical to the interface of the object for which it is ...

Get Design Patterns in C# now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.