<<< Facade | Index | Proxy UML >>> |
Problem to solve:
Consider an object representing expensive resource that is impossible to duplicate:
network connection
large object in memory, such as a "result set" of the database query
an open file
How could we emulate "multiple copies" of these complex and unique objects?
Solution:
A proxy class represents indirect reference to the object with concrete services.
(The underlying concrete object is often referred to as a subject.)
The proxy controls indirect access to another object, while exposing the same interface.
<<< Facade | Index | Proxy UML >>> |