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
79
2
Share
future-proofing your 3rd party integrations - Rocky Mountain Ruby 2014
The adapter pattern using gems, dtos, and communication.
Jeffrey Matthias
September 25, 2014
More Decks by Jeffrey Matthias
See All by Jeffrey Matthias
Elixirdaze - Become a Test Whisperer - what are your tests telling you?
idlehands
0
76
RubyConf 2013 Futureproofing your 3rd party integrations
idlehands
1
97
Other Decks in Programming
See All in Programming
Strategy for Finding a Problem for OSS: With Real Examples
kibitan
0
140
Linux Kernelの1文字のミスで 権限昇格ができた話
rqda
0
2.3k
Rethinking API Platform Filters
vinceamstoutz
0
11k
L’IA au service des devs : Anatomie d'un assistant de Code Review
toham
0
220
VueエンジニアがReactを触って感じた_設計の違い
koukimiura
0
160
煩雑なSkills管理をSoC(関心の分離)により解決する――関心を分離し、プロンプトを部品として育てるためのOSSを作った話 / Solving Complex Skills Management Through SoC (Separation of Concerns)
nrslib
3
780
まかせられるPM・まかせられないPM / DevTech GUILD Meetup
yusukemukoyama
0
110
RSAが破られる前に知っておきたい 耐量子計算機暗号(PQC)入門 / Intro to PQC: Preparing for the Post-RSA Era
mackey0225
3
130
PHPのバージョンアップ時にも役立ったAST(2026年版)
matsuo_atsushi
0
290
Vibe NLP for Applied NLP
inesmontani
PRO
0
130
今年もTECHSCOREブログを書き続けます!
hiraoku101
0
230
「接続」—パフォーマンスチューニングの最後の一手 〜点と点を結ぶ、その一瞬のために〜
kentaroutakeda
5
2.5k
Featured
See All Featured
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
250
The browser strikes back
jonoalderson
0
930
The Cost Of JavaScript in 2023
addyosmani
55
9.8k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.9k
Claude Code のすすめ
schroneko
67
220k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.3k
Building Adaptive Systems
keathley
44
3k
Code Review Best Practice
trishagee
74
20k
The Curse of the Amulet
leimatthew05
1
11k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
690
Code Reviewing Like a Champion
maltzj
528
40k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
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