Mathieu Tozer's Dev Blog

Cocoa, the development of Words, and other software projects (including those dang assessment tasks).




Core Data Study


E-mail this post



Remember me (?)



All personal information that you provide here will be governed by the Privacy Policy of Blogger.com. More...



It's the latest thing for the model in the MCV paradigm, joining IB and bindings. Does Undo and saving to files automatically.

It provides a general-purpose data management solution developed to handle the data model needs of every kind of application, large or small.

First, we're going to look at the definition of a Core Data data model: The managed object model.


Don't hand code classes, and getter setter methods anymore, use Core Data framework to build a manages object model, a entity - relationship.


For example, an application for managing books in a library would contain a Book entity which has attributes of title and ISBN number, and relationships to other entities, such as a Person entity for the book author and a Collection entity that represents a group of books in the library. The Person entity would, in turn, have attributes of first and last names. 


The use of KVC and KVO allows managed objects to be used seamlessly with Cocoa bindings.


There is the managed object context, 

persistent store co-ordinator,

in addition to the managed object model (which is the design time representation)

The use of KVC methods allows Cocoa bindings to easily display and operate on the data contained by managed objects. In fact, it is possible to create many kinds of simple applications with absolutely no code at all by defining a model and then using Interface Builder to define bindings to data in the model.

To commit changes to the data model to disk, simply send a save: message to the managed object context.

For More Information


0 Responses to “Core Data Study”

Leave a Reply

      Convert to boldConvert to italicConvert to link

 


+RSS | dev blog | Portfolio

About me

My status

Previous posts

  • my del.icio.us
  • my flickr