• 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
EOF and the Observer Pattern
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

EOF and the Observer Pattern


  • Subject: EOF and the Observer Pattern
  • From: David Avendasora <email@hidden>
  • Date: Thu, 30 Oct 2008 05:44:35 -0400

Hi all,

I have several places in my application where a large number of EOs exist in the DB that are directly dependent upon other EOs. If the depended-upon EOs change, then all the dependent EOs may need to be updated.

This seems to me like the perfect use of the Observer Pattern.

For example. If a Part's BOM is updated the nutrition information for that Part may need to be updated as well. Calculating the current nutrition information is too expensive to do it everywhere it is needed so it is saved in the database. I also maintain historical nutritional information as well and that shouldn't be updated, only the current information should be.

What I'd like to do is to have the "current" Nutrition object observe the Part object. If the Part object is updated in a significant way, then the Nutrition object will get notified to update itself.

What I'm trying to figure out is how to persist this information. I don't think I want to model the relationship, do I?

I looked at EOObserving but I think that's more about catching changes between two objects already in memory.

How would I model EOEnterpriseObject <<->> EOEnterpriseObject anyway? Using EOIDs?

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


  • Follow-Ups:
    • Re: EOF and the Observer Pattern
      • From: Chuck Hill <email@hidden>
    • Re: EOF and the Observer Pattern
      • From: Andrew Lindesay <email@hidden>
  • Prev by Date: awake() called twice on page refresh
  • Next by Date: Spell Check with WebObjects
  • Previous by thread: Re: awake() called twice on page refresh
  • Next by thread: Re: EOF and the Observer Pattern
  • Index(es):
    • Date
    • Thread