11. Archiving and Unarchiving

Archiving preserves objects including any interrelationships or dependencies among the archived objects. Unarchiving re-creates the objects and relationships that were previously archived. Some common object-oriented programming languages such as Ruby, Python, Java, and C# use the term “Serialization” to describe the Archiving and Unarchiving pattern.

Cocoa includes built-in support for interprocess communication that relies on Archiving and Unarchiving to copy objects from one process to another. Objects archived by one process are unarchived in another via the NSPortCoder and NSDistributedNotificationCenter classes.

Apple’s Interface Builder application archives the objects that are configured and connected within ...

Get Cocoa Design Patterns now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.