Data Serialization: when do I use property lists instead of other options

From IPhone Dev FAQ

Jump to: navigation, search

Check out: http://developer.apple.com/documentation/Cocoa/Conceptual/Archiving/

This Property List Programming Guide states:

When to Use Property Lists Many applications require a mechanism for storing information that will be needed at a later time. For situations where you need to store small amounts of persistent data—say less than a few hundred kilobytes—property lists offer a uniform and convenient means of organizing, storing, and accessing the data.

In some situations, the property list architecture may prove insufficient. If you need a way to store large, complex graphs of objects, objects not supported by the property list architecture, or objects whose mutability settings must be retained, use archiving. See Archives and Serializations Programming Guide for Cocoa for more information.

If you are looking for a way to implement user or application preferences, Cocoa provides a class specifically for this purpose. While the user defaults system does use property lists to store information, you do not have to access these plists directly. See User Defaults Programming Topics for Cocoa and Preferences Programming Topics for Core Foundation for more information. Note that property lists should be used for data that consists primarily of strings and numbers. They are very inefficient when used with large blocks of binary data.


Also check out the Archives and Serializations Programming Guide: http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/Archiving/index.html

Personal tools