I am using SOAP with wsdl2objc generated code. I have multiple view controllers who need to share the data provided by the web service. I would like to have a data model part, but I am having a hard time seeing how to handle this. Naturally the calls should be asynch. My question is, what might be the best practise? Who should be responsible for fetching data? Who should store the data? How to handle concurrency? Any thoughts would be appreciated!
UPDATE: I was considering using CoreData, but was not sure if what the benefits were when the data is frequently updated. My biggest problem is how to handle the scenario where a view controller requests data from the model, but no data is available. That means performing a slow web service call and somehow informing the view controller when the data is in. Is notification centre the way to go here? how would the flow be? should the view controllers constantly be listening for update notifications? My thoughts are, that a view controller registers as an observer, populates the view with data from the model (regardless of empty data), and automatically updates on received notifications, i.e. fetches the data from the model which now has the "newest" data available. That leave all network call out of the view controllers, allows the view controllers to access shared data. Thoughts?