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
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
Catch Up: Go Style Guide Update
andpad
0
210
詳しくない分野でのVibe Codingで困ったことと学び/vibe-coding-in-unfamiliar-area
shibayu36
3
4.8k
iOSアプリの信頼性を向上させる取り組み/ios-app-improve-reliability
shino8rayu9
0
170
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
280
uniqueパッケージの内部実装を支えるweak pointerの話
magavel
0
970
開発生産性を上げるための生成AI活用術
starfish719
3
420
登壇は dynamic! な営みである / speech is dynamic
da1chi
0
280
私はどうやって技術力を上げたのか
yusukebe
43
18k
Signals & Resource API in Angular: 3 Effective Rules for Your Architecture @BASTA 2025 in Mainz
manfredsteyer
PRO
0
120
SpecKitでどこまでできる? コストはどれくらい?
leveragestech
0
670
dynamic!
moro
10
7.2k
overlayPreferenceValue で実現する ピュア SwiftUI な AdMob ネイティブ広告
uhucream
0
180
Featured
See All Featured
How GitHub (no longer) Works
holman
315
140k
Building an army of robots
kneath
306
46k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
970
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.1k
Raft: Consensus for Rubyists
vanstee
139
7.1k
Java REST API Framework Comparison - PWX 2021
mraible
33
8.9k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Writing Fast Ruby
sferik
629
62k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Agile that works and the tools we love
rasmusluckow
331
21k
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