For the More Curious: Designing a Store Object

You have built and used a number of different store objects in this book. In this section, we will analyze these differences and give you a guide for determining how to build store objects in your own applications.

When designing a store object you must answer these questions:

  • What external source(s) will it work with?

  • Should it be a singleton?

  • How will it deliver the results of a request?

Determining external sources

When designing a store, you must first consider what the application is trying to accomplish. How many external sources will there be and of what type? This, in turn, will help you determine how many store objects an application needs.

Should applications have one-to-one correspondences ...

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.