Jump to the navigation menu

Don't use third-party services directly

If you need to integrate your application with a third-party service, don't integrate it directly - even if it has an SDK.

Doing so locks you into a single implementation and a single vendor.

If you write your own integration layer, it's possible to add multiple implementations, such as different payment gateways, that conform with a single interface.

If you need to switch to a different provider or add multiple options, you can without changing the existing code.

It also makes it easier to test as you can write a fake implementation and use it for testing.

- Oliver

Was this interesting?

Sign up here and get more like this delivered straight to your inbox every day.

About me

Picture of Oliver

I'm an certified Drupal Triple Expert with 18 years of experience, a Drupal core contributor, public speaker, live streamer, and host of the Beyond Blocks podcast.