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 - Rocky Mountain Ruby 2014
Search
Jeffrey Matthias
September 25, 2014
Programming
2
68
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
58
RubyConf 2013 Futureproofing your 3rd party integrations
idlehands
1
84
Other Decks in Programming
See All in Programming
MetricKitで予期せぬ終了を検知する話 / Detect unexpected termination with MetricKit
nekowen
1
190
ADRを一年運用してみた/adr_after_a_year
hanhan1978
7
2.4k
Goのエラースタックトレースの歴史と今後
sonatard
9
1.4k
Kotlin Multiplatform at Stable and Beyond (Android Makers 2024)
zsmb
0
250
Snowflakeで眠ったデータを起こそう!
estie
0
120
Git Lint
bkuhlmann
4
750
Azure OpenAI Serviceのプロンプトエンジニアリング入門
tomokusaba
3
710
⼤規模⾔語モデルの拡張(RAG)が 終わったかも知れない件について
nearme_tech
23
15k
コーンフレークから始める モデリング会話入門
ogurotakayuki
0
370
try! Swift Tokyo 2024 参加報告 / try! Swift Tokyo 2024 Report
hironytic
0
210
DMMプラットフォームがTiDB Cloudを採用した背景
pospome
8
4.1k
Scalable Customer Journey Orchestration (CJO)
lewuathe
0
320
Featured
See All Featured
Large-scale JavaScript Application Architecture
addyosmani
504
110k
Typedesign – Prime Four
hannesfritz
36
2.1k
The Cost Of JavaScript in 2023
addyosmani
16
3.9k
The Invisible Customer
myddelton
114
12k
A Tale of Four Properties
chriscoyier
151
22k
Facilitating Awesome Meetings
lara
42
5.6k
Designing Experiences People Love
moore
136
23k
Making the Leap to Tech Lead
cromwellryan
124
8.5k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
78
42k
Producing Creativity
orderedlist
PRO
337
39k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
14
1.6k
Being A Developer After 40
akosma
57
580k
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