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
38
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Design pattern Adapter
This is a little talk about the design pattern Adapter
Lucas Hiago de Moura Vilela
September 02, 2019
More Decks by Lucas Hiago de Moura Vilela
See All by Lucas Hiago de Moura Vilela
SQL com Arel no Rails
luchiago
0
29
Brown Bag - Aplicação mobile de vídeo-chamadas
luchiago
0
50
Gitpod
luchiago
1
70
Introduction to Scrapy
luchiago
0
43
Other Decks in Programming
See All in Programming
ソフトウェアラスタライザ
fadis
1
780
LL言語やWebフレームワークのPostgreSQL対応 〜DBの機能がユーザーに届くまで〜
kentaroutakeda
0
130
GKE アップグレード前に知っておきたい Blue/Green と PDB の関係
stkk
0
140
ソフトウェアエンジニアにとっての生成AI - 特性を知って使い倒す / generative ai for software enginner
kishida
7
2.3k
tsc.rip を支える技術 / Kyoto.なんか #8
susisu
0
4.3k
高専、大学編入、そして未踏へ〜プロダクト開発とキャリアの歩み - Technical College, University Transfer, and On to “Mitou” / My Journey in Product Development and Career
pkmiya
0
130
不幸な GC
chencmd
0
880
FDEとは、何者なのか?
masapyon1212
0
140
【デモ】Kiroで体験する仕様駆動開発|設計からコーディングまでAIと進める開発フロー
cmkudo
0
570
思考垂れ流し開発 ~音声入力 × AIエージェント × 開発ハーネスによる試行錯誤~
npostring
0
810
ハーネス設計入門 〜プロンプト、コンテキストの次〜
kinopeee
53
35k
MySQLとPostgreSQLって何が違うの?
akagami
PRO
0
160
Featured
See All Featured
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.5k
How to make the Groovebox
asonas
2
2.4k
From π to Pie charts
rasagy
0
350
GitHub's CSS Performance
jonrohan
1033
470k
For a Future-Friendly Web
brad_frost
183
10k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.7k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
410
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
430
Paper Plane
katiecoart
PRO
2
53k
The Language of Interfaces
destraynor
162
27k
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