0% found this document useful (0 votes)
15 views15 pages

Adapter Pattern - OODP

The Adapter Pattern, also known as a Wrapper, allows incompatible interfaces to work together by converting one interface into another that clients expect. Real-life examples include vendor classes such as Grid Control, FTP Utility, and Email Utility. A drawback of this pattern is the potential for excessive code if many methods need to be adapted.

Uploaded by

bperson534
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views15 pages

Adapter Pattern - OODP

The Adapter Pattern, also known as a Wrapper, allows incompatible interfaces to work together by converting one interface into another that clients expect. Real-life examples include vendor classes such as Grid Control, FTP Utility, and Email Utility. A drawback of this pattern is the potential for excessive code if many methods need to be adapted.

Uploaded by

bperson534
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Design Patterns

Adapter Pattern

01/26/2025 1
Adapter Pattern
 GoF Intent: “Converts the interface of a class into
another interface the clients expect. Adapter lets classes
work together that couldn’t otherwise because of
incompatible interfaces.”

 Also known as a “Wrapper”

01/26/2025 2
Real Life Examples
 Vendor Classes
 Grid Control
 FTP Utility
 Email Utility

01/26/2025 3
01/26/2025 4
Drawback
 If you have Grid control with 20 methods…you may need
to create an Adapter with 20 methods that all direct to
the grid method.

 Thus..a lot of extra code!

01/26/2025 5
01/26/2025 6
01/26/2025 7
01/26/2025 8
01/26/2025 9
01/26/2025 10
01/26/2025 11
01/26/2025 12
01/26/2025 13
01/26/2025 14
01/26/2025 15

You might also like