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
73
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
67
RubyConf 2013 Futureproofing your 3rd party integrations
idlehands
1
87
Other Decks in Programming
See All in Programming
動作確認やテストで漏れがちな観点3選
starfish719
5
900
Azure AI Foundryのご紹介
qt_luigi
1
260
非ブラウザランタイムとWeb標準 / Non-Browser Runtimes and Web Standards
petamoriken
0
450
自動で //nolint を挿入する取り組み / Gopher's Gathering
utgwkk
1
170
WebDriver BiDiとは何なのか
yotahada3
1
110
個人アプリを2年ぶりにアプデしたから褒めて / I just updated my personal app, praise me!
lovee
0
310
ErdMap: Thinking about a map for Rails applications
makicamel
1
1.2k
Запуск 1С:УХ в крупном энтерпрайзе: мечта и реальность ПМа
lamodatech
0
1k
月刊 競技プログラミングをお仕事に役立てるには
terryu16
1
1.3k
富山発の個人開発サービスで日本中の学校の業務を改善した話
krpk1900
3
320
ESLintプラグインを使用してCDKのセオリーを適用する
yamanashi_ren01
2
380
チームの立て直し施策をGoogleの 『効果的なチーム』と見比べてみた
maroon8021
0
310
Featured
See All Featured
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
Optimizing for Happiness
mojombo
376
70k
Designing for Performance
lara
604
68k
Building Better People: How to give real-time feedback that sticks.
wjessup
366
19k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.4k
A designer walks into a library…
pauljervisheath
205
24k
The Cost Of JavaScript in 2023
addyosmani
47
7.3k
VelocityConf: Rendering Performance Case Studies
addyosmani
327
24k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
3k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
192
16k
The Cult of Friendly URLs
andyhume
78
6.2k
Practical Orchestrator
shlominoach
186
10k
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