You are on page 1of 4

Adapter Pattern

Saturday, August 10, 2019 11:42 PM

.The output of one system may not confirm to the expected input of another system.

.Adapter Design Pattern facilitates the communication between two existing systems by
providing a compatible interface.

Client: It requires third party library

Adaptee: is a class in third party or in external systems to be used by the client

Adapter: Sits between Client & Adaptee and confirms to what is expected by the Adaptee

Target Interface: Interface which Adaptee implements and receives request from Client

-> Client sends the request to adapter using the Target Interface .
-> Adapter translates the message that Adaptee will understand.

New Section 13 Page 1


Class Diagram for the request between client and Adaptee

Step 1: Design the Target Interface

Step 2: Implement the target Interface

New Section 13 Page 2


Step 3: Send the request from client to adapter using Target Interface

Step 4: Instantiate the Web Adapter, Web Service, Web Client

New Section 13 Page 3


The Adaptee is hidden from Client by wrapping up with adapter Class

Adapter is meant to :

The pattern is to bridge the gap between two incompatible systems , can use
systems and integrate external sources into them.

New Section 13 Page 4

You might also like