Graphics Programs Reference
In-Depth Information
16
Core Data
When deciding between approaches to saving and loading for iOS applications, the first
question is typically “Local or remote?” If you want to save data to a remote server, this is
typically done with a web service. Web services are covered in Chapter 25 , so let's assume
that you want to store data locally. The next question is typically “Archiving or Core
Data?”
At the moment, Homepwner uses keyed archiving to save item data to the filesystem. The
biggest drawback to archiving is its all-or-nothing nature: to access anything in the archive,
you must unarchive the entire file; to save any changes, you must rewrite the entire file.
Core Data, on the other hand, can fetch a small subset of the stored objects. And if you
change any of those objects, you can update just that part of the file. This incremental
fetching, updating, deleting, and inserting can radically improve the performance of your
application when you have a lot of model objects being shuttled between the filesystem and
RAM.
Search WWH ::




Custom Search