A common aspect of modern web applications is the need to communicate with other web applications in what is usually referred to as “API integrations”. For example, consider Stripe. Stripe is a payment processor service that handles the complicated parts of accepting payments. If your app is being extended to have a checkout experience for customers, you might integrate with Stripe to accomplish that.
That said, the “how” of implementing API integrations is more of an art than a science. Typically, each team or developer has their own style for integrations, and what follows is my approach, which is largely based on the idea of bounded contexts from Chapter 14 of Domain-Driven Design.
My typical design for an API integration consists of the following parts:
- Defining how such a service will be utilized in your application’s domain.
- Wrapping the service API, in its domain.
- Tying the two together with an adapter module.
continue reading on j3rn.com
⚠️ This post links to an external website. ⚠️
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.