13. Data Persistence

In the preceding chapter we added the ability for the prototype app to take photos with the device cameras. Now that photos are coming into the app, it’s time to develop a system for saving and managing them. In this chapter we’ll discuss what kind of data the app will deal with and how to manage and save it effectively. This chapter will implement the Model part of the Model-View-Controller design pattern.

The Data Model

In order to effectively build the data model, you need to have a clear idea of what kind of data you’ll be working with and how the various types of data relate to each other. For this app there are two types of data: photos and photo albums.

Photos

Since this app arranges photos in albums, the most obvious ...

Get Learning iPad Programming: A Hands-On Guide to Building iPad Apps with iOS 5 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.