I find myself often writing complex GCD / block based methods (comparable to the code snippet shown below).
-
How would you break up this kind of method in smaller
portions? -
Would you rather GCD-enable the parsing methods in the managed
objects’ code or would you rather keep the GCD code in the view
controller? -
How can I run the NSURL request in the code below in the background
queue ([NSURLConnection sendAsynchronousRequest:requestWhen I use
queue:[NSOperationQueue mainQueue]NSOperationQueue, the completion handler does not get called.
currentQueue
Use a C function or a instance method to delegate certain processes (such as saving to the XML file).
Definitely keep it in the object’s code. You are breaking MVC too much as it is,
Don’t use
NSURLRequest, use AFNetworking or RestKit instead.