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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
浮動小数の比較について
kishikawakatsumi
0
370
CSC307 Lecture 13
javiergs
PRO
0
310
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
1
510
API Platformを活用したPHPによる本格的なWeb API開発 / api-platform-book-intro
ttskch
1
110
朝日新聞のデジタル版を支えるGoバックエンド ー価値ある情報をいち早く確実にお届けするために
junkiishida
1
330
「やめとこ」がなくなった — 1月にZennを始めて22本書いた AI共創開発のリアル
atani14
0
340
15年目のiOSアプリを1から作り直す技術
teakun
0
580
AI巻き込み型コードレビューのススメ
nealle
2
2.5k
モジュラモノリスにおける境界をGoのinternalパッケージで守る
magavel
0
3.4k
AIプロダクト時代のQAエンジニアに求められること
imtnd
1
540
NOT A HOTEL - 建築や人と融合し、自由を創り出すソフトウェア
not_a_hokuts
2
530
CSC307 Lecture 15
javiergs
PRO
0
210
Featured
See All Featured
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
93
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.6k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
130
GraphQLの誤解/rethinking-graphql
sonatard
75
11k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Claude Code のすすめ
schroneko
67
220k
How to Talk to Developers About Accessibility
jct
2
140
The Curse of the Amulet
leimatthew05
1
9.4k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.8k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
950
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
850
30 Presentation Tips
portentint
PRO
1
250
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