Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
Github Copilotのチャット履歴ビューワーを作りました~WPF、dotnet10もあるよ~ #clrh111
katsuyuzu
0
110
配送計画の均等化機能を提供する取り組みについて(⽩⾦鉱業 Meetup Vol.21@六本⽊(数理最適化編))
izu_nori
0
150
sbt 2
xuwei_k
0
290
ViewファーストなRailsアプリ開発のたのしさ
sugiwe
0
460
AIコーディングエージェント(Manus)
kondai24
0
180
まだ間に合う!Claude Code元年をふりかえる
nogu66
5
820
UIデザインに役立つ 2025年の最新CSS / The Latest CSS for UI Design 2025
clockmaker
18
7.4k
非同期処理の迷宮を抜ける: 初学者がつまづく構造的な原因
pd1xx
1
710
【CA.ai #3】Google ADKを活用したAI Agent開発と運用知見
harappa80
0
310
S3 VectorsとStrands Agentsを利用したAgentic RAGシステムの構築
tosuri13
6
310
Cell-Based Architecture
larchanjo
0
120
Giselleで作るAI QAアシスタント 〜 Pull Requestレビューに継続的QAを
codenote
0
170
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.8k
Git: the NoSQL Database
bkeepers
PRO
432
66k
Into the Great Unknown - MozCon
thekraken
40
2.2k
We Have a Design System, Now What?
morganepeng
54
7.9k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.3k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.3k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
RailsConf 2023
tenderlove
30
1.3k
Visualization
eitanlees
150
16k
GitHub's CSS Performance
jonrohan
1032
470k
Faster Mobile Websites
deanohume
310
31k
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