More on Store Objects

Let’s recap what we know about stores so far. A store object handles the details of interfacing with an external source. The complicated request logic required to interact with these sources becomes the responsibility of the store so that the controller can focus on the flow of the application. We’ve really seen two types of stores: synchronous and asynchronous. BNRItemStore and BNRImageStore were examples of synchronous stores: their work could be finished immediately, and they could return a value from a request right away.

CLLocationManager and BNRFeedStore are examples of asynchronous stores: their work takes awhile to finish. With asynchronous stores, you have to supply callbacks for the controller to receive a response. ...

Get iOS Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.