Jump to content

Interface pattern

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 64.229.201.111 (talk) at 19:01, 8 December 2003. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

The "interface pattern" is a very general pattern. The idea is that an "interface" is a class which provides simpler functionality to another class or group of classes.

An interface could contain a bunch of objects and provide simpler, higher-level functions to programmer (for example, the facade pattern), it could provide a cleaner or more specific way of using complicated classes (a wrapper), it could be used to act as "glue" between two different API's (the adapter pattern), and more! (Other kinds of interface patterns are: delegation, composite, and bridge).

In general, the purpose of the interface pattern is to make life easier for the programmer by simplifying things.