Closed. This question is . This question is opinion-based . It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 4 years ago. Improve this question

I am looking for an answer to this question in the context of the VIPER Architectural pattern -

If you have an application that talks to both a web api and a database how many dataManagers should you have one, two or three?

Case

a) dataManager

b) APIDataManager and LocalDataManager

c) dataManager , APIDataManager and LocalDataManager

Where in

a) The interactor talks to a single dataManager that talks to any services you may have (remote or local).

b) The interactor knows the difference between local and remote information - and calls either the APIDataManager or the LocalDataManager , which talk to remote and local services respectively.

c) The interactor only talks to a general dataManager , the general dataManager then talks to the APIDataManager and LocalDataManager

EDIT

There may be no definitive solution. But any input would be greatly appreciated.