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
Lucas Hiago de Moura Vilela
September 02, 2019
Programming
0
34
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
26
Brown Bag - Aplicação mobile de vídeo-chamadas
luchiago
0
46
Gitpod
luchiago
1
68
Introduction to Scrapy
luchiago
0
34
Other Decks in Programming
See All in Programming
開発組織の戦略的な役割と 設計スキル向上の効果
masuda220
PRO
10
1.9k
Amazon ECS Managed Instances が リリースされた!キャッチアップしよう!! / Let's catch up Amazon ECS Managed Instances
cocoeyes02
0
110
実践Claude Code:20の失敗から学ぶAIペアプログラミング
takedatakashi
18
9.1k
Claude Agent SDK を使ってみよう
hyshu
0
1.4k
pnpm に provenance のダウングレード を検出する PR を出してみた
ryo_manba
1
170
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
600
SwiftDataを使って10万件のデータを読み書きする
akidon0000
0
250
Blazing Fast UI Development with Compose Hot Reload (Bangladesh KUG, October 2025)
zsmb
2
420
GC25 Recap: The Code You Reviewed is Not the Code You Built / #newt_gophercon_tour
mazrean
0
130
ボトムアップの生成AI活用を推進する社内AIエージェント開発
aku11i
0
970
Introducing RemoteCompose: break your UI out of the app sandbox.
camaelon
2
130
スマホから Youtube Shortsを見られないようにする
lemolatoon
27
34k
Featured
See All Featured
Large-scale JavaScript Application Architecture
addyosmani
514
110k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
54k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.7k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.5k
Git: the NoSQL Database
bkeepers
PRO
431
66k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
Rails Girls Zürich Keynote
gr2m
95
14k
The Language of Interfaces
destraynor
162
25k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
KATA
mclloyd
PRO
32
15k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
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