❔ Idea for better approach for below problem?
Earlier: Local File System
New Requirement: Integrate Azure storage system (Make configurable b/w File and Azure)
My Idea:
Create an Interface acting as an abstraction for client (Using factory method)
Based on config either Azure or File will be used. Client code won't know.
Client just ask for StorageObject and call Create/Download/Delete methods.
So,
Problem:
I see a 3rd party library being used in some existing methods in the application
3rdPartyConvert&UploadMethod(string/stream filepath)
I guess the above method will successfully upload file given right path(local file path).
But how to do this with my Abstract methods(MyStorageInterface) for the client?
Should I let the 3rdParty upload method do its work and then upload via
my method(for file system, replace/ignore and for cloud upload it)?
Maybe Create an overload of the method (Making such change in each of such methods)? <br>
Any other perhaps, better ideas?
1 Reply
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.