Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
71
RubyConf 2013 Futureproofing your 3rd party integrations
idlehands
1
90
Other Decks in Programming
See All in Programming
AWS CDKの推しポイントN選
akihisaikeda
1
210
全員アーキテクトで挑む、 巨大で高密度なドメインの紐解き方
agatan
8
11k
JEP 496 と JEP 497 から学ぶ耐量子計算機暗号入門 / Learning Post-Quantum Crypto Basics from JEP 496 & 497
mackey0225
2
500
社内オペレーション改善のためのTypeScript / TSKaigi Hokuriku 2025
dachi023
1
130
最新のDirectX12で使えるレイトレ周りの機能追加について
projectasura
0
310
WebRTC と Rust と8K 60fps
tnoho
1
570
Level up your Gemini CLI - D&D Style!
palladius
1
130
AI時代もSEOを頑張っている話
shirahama_x
0
190
生成AIを活用したリファクタリング実践 ~コードスメルをなくすためのアプローチ
raedion
0
150
How Software Deployment tools have changed in the past 20 years
geshan
0
19k
Agentに至る道 〜なぜLLMは自動でコードを書けるようになったのか〜
mackee
5
2.4k
251126 TestState APIってなんだっけ?Step Functionsテストどう変わる?
east_takumi
0
260
Featured
See All Featured
Building Applications with DynamoDB
mza
96
6.8k
GitHub's CSS Performance
jonrohan
1032
470k
The Cult of Friendly URLs
andyhume
79
6.7k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
1
59
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
34
2.3k
Thoughts on Productivity
jonyablonski
73
4.9k
How to train your dragon (web standard)
notwaldorf
97
6.4k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
Music & Morning Musume
bryan
46
7k
The Pragmatic Product Professional
lauravandoore
36
7k
The Language of Interfaces
destraynor
162
25k
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