Trade-offs of Persistence Mechanisms

At this point, you can start thinking about the trade-offs between the common ways that iOS applications can store their data. Which is best for your application? Use Table 23.1 to help you decide.

Table 23.1  Data storage pros and cons

Technique Pros Cons
Archiving Allows ordered relationships (arrays, not sets). Easy to deal with versioning. Reads all the objects in (no faulting). No incremental updates.
Web Service Makes it easy to share data with other devices and applications. Requires a server and a connection to the Internet.
Core Data Lazy fetches by default. Incremental updates. Versioning is awkward (but can certainly be done using an NSModelMapping). No real ordering within an entity, although to-many relationships can be ordered.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset