Sep
1
2010
1
2010
Design Patterns : Adapter pattern
Motivation
Sometime a toolkit class that’s designed for reuse isn’t reusable only because its interface doesn’t match the domain-specific interface an application requires.
Intent
Convert the interface of a class into another interface client expects. Adapter lets classes work together that couldn’t otherwise because of incompatible interfaces.
Diagram

Applicability
- You want to use an existing class, and its interface does not match the one you need.
- You want to create a reusable class that cooperates with unrelated or unforeseen classes, that is, classes that don’t necessarily have compatible classes.
Related Posts
Recent Posts
- How to populate a dropdown menu from database in CodeIgniter [Workaround]
- How to Overclock Samsung Galaxy Mini Upto 800MHz
- Current and Future Relavance of Business Excellence / Improvement to Argos UK Ltd. Possible Benefits and Likely Inhabitors Exists
- What can Harm Your Online Reputation?
- Does Race Matter in the Choice of Popular Music among Youngsters?
The Tutebox
- Accounting
- Android Tips
- Apps
- Business
- C / C++
- Computers
- Database
- Design Patterns
- E-Commerce
- Economics
- Electronics
- Entertainment
- Finance
- Functional Programming
- Games
- Hardware
- Health
- HRM
- International Business
- Internet
- iOS Tips
- JAVA
- Life Style
- Linux
- M-Commerce
- Management
- Marketing
- Mathematics
- Mobile
- MS Office
- Network
- PC
- Personal Development
- Photography
- PHP
- Physics
- Places
- Programming
- Science
- Software
- Statistics
- Tweaks
- Visual Studio
- Web Hosting
- Windows

Article by




