- Spring 5 Design Patterns
- Dinesh Rajput
- 150字
- 2021-07-08 09:59:35
The adapter design pattern
-GoF Design Patterns: Elements of Reusable Object-Oriented Software
Adapter design patterns come under the structural design pattern, according to this design pattern two incompatible classes work together that couldn't otherwise because of incompatible interfaces. This pattern works as a bridge between two incompatible interfaces. This pattern is used when two inferences of the application are incompatible in their functionalities, but these functionalities need to be integrated as a business requirement.
There are many real-life examples where we can use the adapter pattern. Suppose you have different types of electric plugs such as cylindrical and rectangular plugs, as shown in the following figure. You can use an adapter in between to fit a rectangular plug in a cylindrical socket assuming voltage requirements are met:

- 大學計算機基礎(第二版)
- Flutter開發實戰詳解
- Objective-C Memory Management Essentials
- Learning Docker
- PHP 從入門到項目實踐(超值版)
- Django:Web Development with Python
- Spring Cloud、Nginx高并發核心編程
- Essential Angular
- PhpStorm Cookbook
- Mathematica Data Analysis
- Apache Kafka Quick Start Guide
- 從零開始學C語言
- Web前端應用開發技術
- 汽車人機交互界面整合設計
- SignalR:Real-time Application Development(Second Edition)