Adapter Pattern - OODP
Adapter Pattern - OODP
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.”
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.
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