Advertisement

Core Data Basics

Abstract

In earlier chapters, we’ve shown you various ways that Cocoa lets you display data in view objects, from manually getting and setting values based on the contents of model objects to having the data automatically synchronized between model and view objects using Cocoa Bindings, which eliminates the need for a lot of boring controller code. Now it’s time to learn about Core Data, a powerful framework that gives your model objects a complete set of built-in capabilities. We’ll start by telling you a bit about what Core Data is and how it fits in with the other parts of Cocoa. Then you’ll use Core Data to create a full-featured database application called MythBase, including a GUI that allows you create, search, edit, and delete entries, all without writing a single line of code (see Figure 7-1 for a shot of MythBase in action). Then we’ll explore some of the code resources that are created for you automatically when you create a Core Data project, and finally we’ll show you how to add functionality (“business logic”) to your model objects.
Figure 7-1.

The MythBase application, in all its glory

Keywords

Model Object Core Data Business Logic Model File Text Field 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Jack Nutting, David Mark and Jeff LaMarche 2010

Personalised recommendations