I have a RESTful server and need to create the client in a Cocoa app.
I have a model called Resource. When I GET /resources, my server returns all resources in JSON.
I have a model called Client that owns many resources.
The Client has an instance method -(NSMutableArray*)resources
An NSArrayController manages the resources. The first time the above method is called, it asks the REST server for the client's resources.
My question is this: who should create the request, dispatch the request, and populate the array: the Client class or the Resource class (with something like -(NSMutableArray*)resourcesForClient:(Client*)client )? Or maybe neither, instead there being an API class that receives the model name and some filters and returns the array?