Design Pattern: Adapter (aka Wrapper)
This pattern pops up a ton in my work. It’s a form of decoupling, but even better is that it allows you to create more descriptive and intuitive code.
You can design the ideal interface your code speaks to. Then, you “wrap” the real interface in a class method that exposes the ideal interface.
You can think of it as an Adapter, like changing a Micro-USB port to a USB-C port. The Adapter is “wrapping” the Micro-USB and giving the ideal USB-C interface.
If you want to go deeper and see some code, check out this resource: https://refactoring.guru/design-patterns/adapter
…Or, swing by the group call tonight (link in newsletter).