Re: Cocoa Asynchronous API Design

2011-05-24 Thread Seth Willits
On May 24, 2011, at 11:05 AM, Tito Ciuro wrote: > I thought about adding blocks, but I would like to support older iPhones if > possible. Blocks were introduced in iOS 4, correct? Yes, they're new in iOS 4, but like Pablo said, iOS 4 runs on a 3G. (And most of us 3G users got suckered into dow

Re: Cocoa Asynchronous API Design

2011-05-24 Thread Pablo Pons Bordes
Maybe you are right, for the developer point of view maybe it doesn't simplify the use of the API, this suggestion was from the problem of use block (that if the intention was to use bloks as delegate method parameter doesn't have to much sense the use of NSOperation). But from the implementati

Re: Cocoa Asynchronous API Design

2011-05-24 Thread Tito Ciuro
Hi Pablo, Why would NSOperation be a better solution than say, NSURLConnection? I can call NSURLConnection several times (performing different actions) and have each delegate be invoked appropriately while maintaining some level of concurrency. It seems that adding NSOperation would add an extr

Re: Cocoa Asynchronous API Design

2011-05-24 Thread Pablo Pons Bordes
What about use NSOPeration? This way you could have a different NSOperation implementation depending of the item type, and use a solution like path1, and it will work at older iOS (the documentation said it is available since IOS 2.0). I think Bloks was introduced at iOS 4 but, anyway iOS 4 wor

Re: Cocoa Asynchronous API Design

2011-05-24 Thread Tito Ciuro
Hi Seth, I thought about adding blocks, but I would like to support older iPhones if possible. Blocks were introduced in iOS 4, correct? Thanks, -- Tito On May 24, 2011, at 10:30 AM, Seth Willits wrote: > On May 24, 2011, at 8:25 AM, Tito Ciuro wrote: > >> I have a question about Cocoa API d

Re: Cocoa Asynchronous API Design

2011-05-24 Thread Seth Willits
On May 24, 2011, at 8:25 AM, Tito Ciuro wrote: > I have a question about Cocoa API design. I think I can give a concrete > example to best explain what the goal is. Assume I have an Inventory service > and I need to write a client API that deals with it. Goals: > > - The API should allow me to

Cocoa Asynchronous API Design

2011-05-24 Thread Tito Ciuro
Hello, I have a question about Cocoa API design. I think I can give a concrete example to best explain what the goal is. Assume I have an Inventory service and I need to write a client API that deals with it. Goals: - The API should allow me to add, update, delete and search items - These opera