Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Design pattern Adapter
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Lucas Hiago de Moura Vilela
September 02, 2019
Programming
0
35
Design pattern Adapter
This is a little talk about the design pattern Adapter
Lucas Hiago de Moura Vilela
September 02, 2019
Tweet
Share
More Decks by Lucas Hiago de Moura Vilela
See All by Lucas Hiago de Moura Vilela
SQL com Arel no Rails
luchiago
0
27
Brown Bag - Aplicação mobile de vídeo-chamadas
luchiago
0
48
Gitpod
luchiago
1
70
Introduction to Scrapy
luchiago
0
36
Other Decks in Programming
See All in Programming
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
550
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
660
CSC307 Lecture 06
javiergs
PRO
0
680
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
0
930
ThorVG Viewer In VS Code
nors
0
770
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
170
開発者から情シスまで - 多様なユーザー層に届けるAPI提供戦略 / Postman API Night Okinawa 2026 Winter
tasshi
0
200
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
300
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
2.4k
CSC307 Lecture 09
javiergs
PRO
1
830
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
190
CSC307 Lecture 02
javiergs
PRO
1
770
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
How to Think Like a Performance Engineer
csswizardry
28
2.4k
Building the Perfect Custom Keyboard
takai
2
680
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
84
Navigating Team Friction
lara
192
16k
The Language of Interfaces
destraynor
162
26k
Facilitating Awesome Meetings
lara
57
6.7k
We Have a Design System, Now What?
morganepeng
54
8k
Prompt Engineering for Job Search
mfonobong
0
160
Technical Leadership for Architectural Decision Making
baasie
1
240
Transcript
Adapter Padrão de Projeto Estrutural
Padrão de Projeto Estrutural • Definição ◦ Preocupação com a
forma • De classe ◦ Utilização da herança • De objetos ◦ Descrever maneiras de compor novos objetos DASDSDSA
Adapter • Também conhecido como Wrapper • Padrão de projeto
de Classe • Motivação: reaproveitar uma classe
Objetivo • Converter interface • “Traduzir” solicitações • Permitir comunicação
entre interfaces incompatíveis
Aplicação • Utilizado quando: ◦ Se deseja utilizar uma classe
existente ◦ Criar classes reutilizáveis ◦ Para adaptar interface da classe mãe de subclasses
Diagrama UML • Client: Colabora com os objetos em conformidade
com a interface Target • Target: Define a interface do domínio específico que o cliente utiliza • Adapter: Adapta a interface Adaptee para a interface da classe Target • Adaptee: Define uma interface existente que necessita ser adaptada
Consequências • Adapter concreto e as classes e subclasses adaptadas
• Substituição de algum comportamento da classe adaptada • Complexidade
Código