• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ADC Core Data article
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ADC Core Data article


  • Subject: Re: ADC Core Data article
  • From: Paul Szego <email@hidden>
  • Date: Wed, 6 Apr 2005 18:22:17 +1200


On 06/04/2005, at 2:48 PM, Will Mason wrote:

On the other hand, if you don't need all these services and just aim
for persistence, CoreData aren't what you need: just use an
NSArchiver,
and you get the support for any NSObject :))

No, you don't. An object can be archived (sent to/read from an NSCoder) only if it adopts the NSCoding protocol.

A similar approach for CoreData would be better. Having a base class that implements this for free is a good thing, as long as that's not the only way to do it. Hopefully you wont be forced to extend a specific base class - that's just bad design.


As for hibernate - I think the point is that it doesn't force you to extend a base class. The fact that it achieves persistence by mapping to a relational schema is irrelevant.

Many other frameworks face the same problem - and there's usually two approaches. The first, and most restrictive, is to force you to extend a specific base class with a bunch of behaviour built in. Another is to define the responsibilities of a class that wants to "play ball" (e.g. in Java via an interface, in ObjC via a protocol) and let it decide how to best achieve those. The latter approach doesn't preclude providing a base or mixin class. The former approach is often too restrictive to be useful, especially when you want to make use of the framework for existing code.

Guess we'll just have to wait and see.

Paul.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: ADC Core Data article
      • From: Ondra Cada <email@hidden>
    • Re: ADC Core Data article
      • From: アンドレ(Andre) <email@hidden>
    • Re: ADC Core Data article
      • From: mmalcolm crawford <email@hidden>
References: 
 >Re: ADC Core Data article (From: Will Mason <email@hidden>)

  • Prev by Date: Re: ADC Core Data article
  • Next by Date: Odd problem using NSCoding
  • Previous by thread: Re: ADC Core Data article
  • Next by thread: Re: ADC Core Data article
  • Index(es):
    • Date
    • Thread