Mac OS X Developer's Guide

Chapter 23: Documents and Files

Overview

Most computer users work with files on a routine basis. Whether they are word processing documents, image files, or spreadsheets, the basic paradigm of the personal computer remains very much document-centric.

Recently the Internet and local area networks have created a new breed of user who does not focus on documents. For this user, email messages, Web sites, and databases supplant paper surrogates. Still, a lot of work (and play) depends on a user entering data, modifying it, saving it, and then opening it at another time or sending it on to someone else.

Cocoa supports a robust document model. Like the frameworks of Carbon, the document model handles much of the work for you. In any of these environments, you may never need to execute read or write statements.

This chapter provides an overview of document handling on Mac OS X and Cocoa. In particular, you will find sections on:

  • Working with document-based architectures

  • Implementing documents and views

  • Saving and restoring documents

  • Managing changed documents (using Undo and Dirty )

Document-Based Architectures

The advent of the personal computer and its widespread use in offices gave birth to the document-based architecture that is so common today. Before then, computers had worked primarily with data files located on various storage devices (mostly of a magnetic nature). By the 1970s, databases started to replace the flat files, but not much else changed. Typical batch processing on mainframes consisted of two types of operations:

  1. Reading a record from an input...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Document Management Software
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.