Adapter

An adapter is an ApplicationFunctionalityComponent that provides additional functionality for some other component, using the interface of the other component.

Adapters can be used to provide application functionality and for presentation functions. Figure 1 shows two adapter examples in a UML class diagram. At the bottom of the figure is a content component class, Document with an associated interface, DocumentInterface. The document interface provides DOM access to document contents.

The DocumentAsHTML adapter provides an HTML source editing interface on behalf of documents. In his case, the adapter is used to provide application functionality.

The ContentWebPublishing adapter provides a web publishing interface for any kind of content. Note that it doesn't adapt DocumentInterface directly, but adapts the more general Content interface that DocumentInterface specializes.

Figure 1: Adapter examples



( 96 subscribers )