
Design Alternatives and Perspectives ◾ 233
What is the difference between a delegate and a wrapper? A delegate
is an internal data member that provides functionality. A wrapper is
an external class that isolates the client from change or streamlines
an interface. The two overlap. A wrapper could wrap up a delegate.
Differences may be slight and focus on intent. A delegate serves to pro-
vide utility. A wrapper serves to redefine an interface. The interface
invariant details of a delegate class should describe core utility pro-
vided and restrictions on use. Documentation should indicate if the
application programmer has any responsibility ...