Trade-offs of Persistence Mechanisms
At this point, you can start thinking about the tradeoffs between the common ways that iOS applications can store their data Which is best for your application? Use Table 17.1 to help you decide.
Table 17.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 ordered relationships (at the time this is being written). ... |
Get iOS Programming: The Big Nerd Ranch Guide, Second Edition 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.