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
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
令和最新版Android Studioで化石デバイス向けアプリを作る
arkw
0
460
Graviton と Nitro と私
maroon1st
0
140
Vibe codingでおすすめの言語と開発手法
uyuki234
0
130
perlをWebAssembly上で動かすと何が嬉しいの??? / Where does Perl-on-Wasm actually make sense?
mackee
0
200
Basic Architectures
denyspoltorak
0
130
Cell-Based Architecture
larchanjo
0
150
Canon EOS R50 V と R5 Mark II 購入でみえてきた最近のデジイチ VR180 事情、そして VR180 静止画に活路を見出すまで
karad
0
140
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
240
Jetpack XR SDKから紐解くAndroid XR開発と技術選定のヒント / about-androidxr-and-jetpack-xr-sdk
drumath2237
1
190
SwiftUIで本格音ゲー実装してみた
hypebeans
0
510
複雑なUI設計への銀の弾丸 「オブジェクト指向UIデザイン」
teamlab
PRO
2
110
Tinkerbellから学ぶ、Podで DHCPをリッスンする手法
tomokon
0
140
Featured
See All Featured
The Invisible Side of Design
smashingmag
302
51k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
286
14k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
150
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Designing Powerful Visuals for Engaging Learning
tmiket
0
190
Utilizing Notion as your number one productivity tool
mfonobong
2
190
Technical Leadership for Architectural Decision Making
baasie
0
190
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Darren the Foodie - Storyboard
khoart
PRO
0
2k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
0
260
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
29
The browser strikes back
jonoalderson
0
220
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