Development Methods & Design

Adapter Pattern

English

Overview

A design pattern that inserts a converter between two incompatible interfaces so they can work together.

Details

Following the same idea as a power plug adapter, it converts the interface of an existing class or library into the shape the caller expects. Routing calls through an adapter rather than using an external library directly also limits the impact of swapping that library out in the future.

More Programming terms