I'm currently working on windows form application that needs to operate both offline and online. The idea is that when the device running the application has an internet connection it will fetch from a web service to get its data, however when there is no connection it fetches from a local data source in the form of JSON in the local file system.
I would preferably like to use the Service and Manager design pattern (3-tier). However I am unsure which to give the responsibility to of deciding on the data source to use. Should the managers have access to two different services and each service looks at a different source and understands how to interact with each, or should the services be aware of how to interact with both data sources?
Aucun commentaire:
Enregistrer un commentaire