Jump to content

Interface pattern

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by DO11.10 (talk | contribs) at 22:26, 8 May 2006 (Disambiguation link repair - You can help!). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In computer science, the interface pattern isn't a specific pattern amongst design patterns. It's a general method for structuring programs so that they're simpler to understand. In general, an interface is a class which provides the programmer with a simpler or more program-specific way of accessing other classes.

An interface could contain a set of objects and provide simpler, higher-level functions to the programmer (for example, the facade pattern); it could provide a cleaner or more specific way of using complicated classes (a "wrapper" class); it could be used to act as the "glue" between two different API's (the adapter pattern); and much more.

Other kinds of interface patterns are: delegation pattern, composite pattern, and bridge pattern.