• 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: Core Data Abstractions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data Abstractions


  • Subject: Re: Core Data Abstractions
  • From: T Reaves <email@hidden>
  • Date: Mon, 30 May 2005 18:35:34 -0400


On May 30, 2005, at 2:02 PM, mmalcolm crawford wrote:


On May 30, 2005, at 9:00 AM, Vincent Coetzee wrote:

This is a problem that occurs often when using O/R mapping frameworks or even object databases. In the ODBMS world we have a pattern that we use to handle this, we call it the "manager pattern". We create a single object called for example a ProjectFactory or a ProjectManager, we then hide all of the code in this object and we use a series of methods to gain access to the objects we require such as
array = [ProjectFactory allProjects]
we may even have more specific methods for retrieving only the names (often required for GUIs)
arrayOfStrings = [ProjectFactory allProjectNames];



The analogue here would be to create another entity to which all the Projects are related. You then "fetch" the Projects simply by following the relationship.


Whereas this would work, it's a nasty hack just to retrieve an extent (all instances of a particular class). Wanting a class extent is a fairly common thing, and needing to create and manage collections manually to help is tedious at best.


_______________________________________________ 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: Core Data Abstractions
      • From: mmalcolm crawford <email@hidden>
References: 
 >Core Data Abstractions (From: Evan DiBiase <email@hidden>)
 >Re: Core Data Abstractions (From: Vincent Coetzee <email@hidden>)
 >Re: Core Data Abstractions (From: mmalcolm crawford <email@hidden>)

  • Prev by Date: Why is it like this?
  • Next by Date: Re: NSArrayController question...
  • Previous by thread: Re: Core Data Abstractions
  • Next by thread: Re: Core Data Abstractions
  • Index(es):
    • Date
    • Thread