I created objects that are interfaces to the web service. One typical object would be a "TaskService". When the client uses one of these objects, it calls one of the service methods (for example, "GetTasks"), and the service will be deleted asynchronously to call the remote web service, and send the received data back through the delegate.
Currently, to use one of these services you need to create it with [[TaskService alloc] init], but I decided that it makes sense to make each service a single object.
Are you customary to see single objects containing references to delegates? My main design problem is that each object, when it requires the use of a particular service, will have to set itself up as a delegate before calling the service, which does not seem to me completely correct ... What if another object were to act as delegate between you, you set yourself up as a delegate and call the service?
Thank you very much in advance!
Regards, Nick
source
share