mardi 18 février 2020

Design pattern or approach recommended for working with 2 external API clients

Due to the lack of functionality on API A our team is planning to move to API B in about 6 months, due to contract we are required to continue operations using the first api, but we also need to start implementing the second option, as you can imagine the code right now is coupled to the first API and since API B has the same functionality as API A plus some additional that need to be implemente. Taking into account that the provider could change to API C (decided by the manager maybe) what is the best approach to tackle this issue.

We we trying to start by using Factory design pattern to handle multiple api clients that support the same functionality. but how does the system picks use api a, b, or c?

Any help or tip is appreciated, we are using python 3+.

Aucun commentaire:

Enregistrer un commentaire