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
future-proofing your 3rd party integrations - R...
Search
Jeffrey Matthias
September 25, 2014
Programming
2
76
future-proofing your 3rd party integrations - Rocky Mountain Ruby 2014
The adapter pattern using gems, dtos, and communication.
Jeffrey Matthias
September 25, 2014
Tweet
Share
More Decks by Jeffrey Matthias
See All by Jeffrey Matthias
Elixirdaze - Become a Test Whisperer - what are your tests telling you?
idlehands
0
70
RubyConf 2013 Futureproofing your 3rd party integrations
idlehands
1
90
Other Decks in Programming
See All in Programming
フロントエンド開発に役立つクライアントプログラム共通のノウハウ / Universal client-side programming best practices for frontend development
nrslib
7
3.9k
あなたの知らない「動画広告」の世界 - iOSDC Japan 2025
ukitaka
0
400
AI Coding Meetup #3 - 導入セッション / ai-coding-meetup-3
izumin5210
0
610
CSC509 Lecture 02
javiergs
PRO
0
410
CSC509 Lecture 03
javiergs
PRO
0
330
dynamic!
moro
9
6.7k
iOSアプリの信頼性を向上させる取り組み/ios-app-improve-reliability
shino8rayu9
0
150
Playwrightはどのようにクロスブラウザをサポートしているのか
yotahada3
7
2.3k
エンジニアとして高みを目指す、 利益を生み出す設計の考え方 / design-for-profit
minodriven
23
12k
CSC509 Lecture 04
javiergs
PRO
0
300
uniqueパッケージの内部実装を支えるweak pointerの話
magavel
0
920
ИИ-Агенты в каждый дом – Алексей Порядин, PythoNN
sobolevn
0
150
Featured
See All Featured
The Cult of Friendly URLs
andyhume
79
6.6k
Why Our Code Smells
bkeepers
PRO
339
57k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
19
1.2k
4 Signs Your Business is Dying
shpigford
185
22k
Into the Great Unknown - MozCon
thekraken
40
2.1k
Typedesign – Prime Four
hannesfritz
42
2.8k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
960
How to train your dragon (web standard)
notwaldorf
96
6.3k
The Cost Of JavaScript in 2023
addyosmani
53
9k
Designing for humans not robots
tammielis
254
25k
How to Think Like a Performance Engineer
csswizardry
27
2k
Transcript
future-proofing your 3rd party integrations a collection of practices Jeffrey
Matthias @idlehands
goals • keep 3rd party logic out of our code
• make 3rd party behavior predictable • make 3rd party replaceable
Insert 50 ft view here.
it’s just a gem
None
None
None
Clearly define internal vocabulary.
• package vs ‘product rate plan’ • add_on vs ‘product
rate plan’ • coupon vs ‘product rate plan charge’
• PackageService handles ‘product rate plan’ • AddOnService handles ‘product
rate plan’ • CouponService handles ‘product rate plan charge’
forced separation • Data Transfer Objects (DTOs) • Abstract Services
None
None
None
None
uptyped
testing is good • never assume data exists in your
3rd party • use a sandbox if one is available
• Integration tests can use this, too!
stubbing the 3rd party • create a fake service •
use VCR
None
always never forget • cassettes must be delete-able • make
sure you set up everything you need • CI: kill your cassettes. A lot.
recap • define your vocabulary • create an adapter interface
gem(DTOs and abstract services) • create an adapter gem (and add uptyped) • create a test environment • use VCR • delete your cassettes!!! A lot!!!!!
future-proofing your 3rd party integrations a collection of practices Jeffrey
Matthias @idlehands