July 2016
Intermediate to advanced
526 pages
11h 42m
English
A proxy is an object that controls access to another object, called a subject. The proxy and the subject have an identical interface and this allows us to transparently swap one for the other; in fact, the alternative name for this pattern is surrogate. A proxy intercepts all or some of the operations that are meant to be executed on the subject, augmenting or complementing their behavior. The following figure shows a diagrammatic representation:

The preceding figure shows us how the Proxy and the Subject have the same interface, and how this is totally transparent to the client, who can use one or the other interchangeably. The Proxy forwards ...
Read now
Unlock full access