Future-proofing Your 3rd Party Services
summary
If PayPal gets swapped for Stripe, the codebase keeps working because third‑party calls live in an adapter gem with DTOs and abstract service classes, plus an adapter interface gem shared by app and adapter so the app only uses SRID domain language. Tests run against a VCR cassette plus a test environment that cleans up IDs; cassettes have TTL on CI so breaking changes surface quickly and migration effort becomes a predictable estimate.
AI-written summary · about
chapters (11)
- 0:00Start
- 2:04Third-Party Integration
- 4:25Teapot Adapter
- 7:38Define Your Internal Vocabulary
- 10:16Data Transfer Objects
- 13:07Abstract Services
- 15:17Adapter Interface Gem
- 19:24Basic Rules
- 21:50Integration Specs
- 27:02Recap
- 29:18Cons
related talks
29mMoney Makes Your App Go Round
22mNitty Gritty Service Building
23mAbstracting a Service - A Case Study in Forward Thinking with SOA
22mRiding Rails for decades
39mDown The Rabbit Hole: An Adventure in Legacy Code
27mScaling Ruby Applications: Challenges, Solutions and Best Practices
36mWorking Compassionately with Legacy Code
41m(Re)Building a large scale payments system on Rails
