Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
future-proofing your 3rd party integrations - R...
Search
Jeffrey Matthias
September 25, 2014
Programming
87
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
88
RubyConf 2013 Futureproofing your 3rd party integrations
idlehands
1
110
Other Decks in Programming
See All in Programming
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
150
thread_parallel_with_free-threaded_Python_and_NumPy.pdf
riku_sakamoto
0
340
一人だけ、Kiroが静止する日
hideg
0
120
cdk deploy JawsSonic #MARATHONしながらAWSリソースをデプロイしてみよう
akihisaikeda
2
140
『寄り添うラジオ』をAIで作る 体験価値から逆算した、会話しないUXと品質設計
theoriatec2024
3
180
新卒PdEのリアル
ryu1013
1
500
Building an Out-of-Order CPU
latte72
1
790
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
170
Vibes Containers 〜AIで変わるコンテナ設計と運用〜
tkikuc
3
550
マイコン向けの軽量Ruby「PicoRuby」で各種デバイスを制御するネイティブアプリの実現手法
bash0c7
0
420
AI活用は、個人から組織へ|マルチプレイヤーエージェントハーネス「QM」の社内活用事例 / AI use is moving from individuals to orgs
rkaga
1
120
AI に Inclusive UI を書かせよう — Design Rules Skill で Compose UI を作り直す
theoriatec2024
1
500
Featured
See All Featured
Writing Fast Ruby
sferik
630
63k
Speed Design
sergeychernyshev
33
2.1k
Prompt Engineering for Job Search
mfonobong
0
450
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
240
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
470
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
700
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
280
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.4k
Optimizing for Happiness
mojombo
378
71k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8k
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