I'm looking to update some NodeJS code used on AWS Lambda so it can potentially use data from different sources.
As it stands, the code only supports using data from one source. I'd like the code to still work if we changed to a different source of data in the future.
What design pattern would this fall under? And are theire some good examples of how to implement something like this?
As an example, something like FlySystem https://github.com/thephpleague/flysystem where it can handle file uploading to FTP or to Google Drive, just by changing the file adapter type.
Aucun commentaire:
Enregistrer un commentaire