Skip navigation.
 
mlRe: core data design pattern with different model transformations?
FROM : Bill Coleman
DATE : Sun Aug 13 02:04:12 2006

On Aug 8, 2006, at 5:44 AM, joe OneNinetyTwo wrote:
>  I'd like to use Core Data, but I'm confused a bit
> about the design approach.    My model has a large
> data array (scientific data) that is processed in my
> code.  There are many different ways to process the
> data, so I have designed different model objects to
> manipulate the model data array in different ways.
> It wouldn't be that different from an image processing
> software with a variety of image filter methods.


I'm new to Cocoa, too, but I would say that if your data are the 
same, you are just processing it in different ways, then you don't 
need different model objects.

> In Xcode, it's clear how to add attributes and
> relationships for the data model, but how would one
> incorporation a variety of data transformation methods
> (objects that act on the data model)?


Why don't you define an protocol which defines some methods used to 
process the data, then you can implement several different classes 
which implement that protocol and thus do different sorts of processing.

The core data model classes would be input to this protocol. (likely 
you'd just pass an NSArray of data model instances in)

Did that help?


Bill Coleman, AA4LR, PP-ASEL        Mail: <email_removed>
Quote: "Boot, you transistorized tormentor! Boot!"
            -- Archibald Asparagus, VeggieTales

Related mailsAuthorDate
mlcore data design pattern with different model transformations? joe OneNinetyTwo Aug 8, 11:44
mlRe: core data design pattern with different model transformations? Bill Coleman Aug 13, 02:04