13. Data Persistence

In the preceding chapter we added the capability 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 which 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

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

Photos

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

Get Learning iPad Programming: A Hands-On Guide to Building iPad Apps, Second Edition 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.