I want to come up with a experimental design in a POC to see how it would work. The main idea is to have "engines" interfaces which are responsible for certain core parts of the app. For example, a cloud engine interface would define what is needed for the app to interact with web services. Then a concrete implementation would be one with Parse or any other third-party library. Another example is a data engine interface which will define how to persist data in the device. A concrete implementation would use CoreData.
Now to the question: these engines need to interact with each other. For example, I would like to make cloud engine to pass over to data engine whatever objects it pulled from the web.
Where should I put that sort of logic? Should I put it in a singleton? Is there any better approach?
Aucun commentaire:
Enregistrer un commentaire