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
Oxlintはいいぞ
yug1224
5
1.3k
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
180
生成AIを使ったコードレビューで定性的に品質カバー
chiilog
1
240
Fragmented Architectures
denyspoltorak
0
150
Vibe codingでおすすめの言語と開発手法
uyuki234
0
220
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
180
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
400
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
220
CSC307 Lecture 02
javiergs
PRO
1
770
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
450
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
190
AIエージェントのキホンから学ぶ「エージェンティックコーディング」実践入門
masahiro_nishimi
4
310
Featured
See All Featured
A Tale of Four Properties
chriscoyier
162
24k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2k
Unsuck your backbone
ammeep
671
58k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
270
The SEO identity crisis: Don't let AI make you average
varn
0
64
Product Roadmaps are Hard
iamctodd
PRO
55
12k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
110
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
97
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1.1k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.9k
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