Jump to content

Interface pattern

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Cbraga (talk | contribs) at 02:19, 16 May 2004. 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 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 "glue" between two different API's (the adapter pattern), and more.

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