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
78
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
74
RubyConf 2013 Futureproofing your 3rd party integrations
idlehands
1
95
Other Decks in Programming
See All in Programming
Swift ConcurrencyでよりSwiftyに
yuukiw00w
0
240
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
1
510
CSC307 Lecture 11
javiergs
PRO
0
590
CSC307 Lecture 10
javiergs
PRO
1
690
Rails Girls Tokyo 18th GMO Pepabo Sponsor Talk
yutokyokutyo
0
190
Raku Raku Notion 20260128
hareyakayuruyaka
0
430
encoding/json/v2のUnmarshalはこう変わった:内部実装で見る設計改善
kurakura0916
0
300
JPUG勉強会 OSSデータベースの内部構造を理解しよう
oga5
2
230
あなたはユーザーではない #PdENight
kajitack
4
300
DSPy入門 Pythonで実現する自動プロンプト最適化 〜人手によるプロンプト調整からの卒業〜
seaturt1e
1
490
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
13
7.5k
Agent Skills Workshop - AIへの頼み方を仕組み化する
gotalab555
14
7.8k
Featured
See All Featured
Ruling the World: When Life Gets Gamed
codingconduct
0
160
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
620
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
760
The browser strikes back
jonoalderson
0
760
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
A better future with KSS
kneath
240
18k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
290
Speed Design
sergeychernyshev
33
1.6k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.1k
Tell your own story through comics
letsgokoyo
1
830
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
150
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