• 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: Editing Context Choices
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Editing Context Choices


  • Subject: Re: Editing Context Choices
  • From: mmalcolm crawford <email@hidden>
  • Date: Sun, 1 Aug 2004 15:55:24 -0700

On Aug 1, 2004, at 10:37 AM, Hunter Hillegas wrote:

I've read the documentation but even the Enterprise Objects book from Apple doesn't seem to really explain the different kinds and when they should be used.

I'm not sure why there should be so much confusion.

The session's default editing context is an instance of EOEditingContext. A shared editing context is an instance of a different class, and hence clearly... different.


An editing context represents an object "scratch pad," and your gateway to the underlying object stores. In a typical session-based application you'll need an editing context to interact with the EOF stack, manage the sessions EOs etc. Given that this is a common requirement, you have a default editing context...



Sometimes, however, you need more fine-grained control. Maybe you want the ability to make "experimental" changes to EOs which may then either be saved or discarded independently of other changes. In these cases you might create a separate editing context, either a peer editing context or a nested editing context. A separate (peer) editing context has "issues" in synchronisation and merging changes (akin to editing contexts in different sessions); a nested editing context is typically more useful since it'll help keep keep things consistent:


<http://developer.apple.com/documentation/LegacyTechnologies/ WebObjects/WebObjects_4.5/System/Documentation/Developer/WebObjects/ Topics/ProgrammingTopics.39.html>



In some applications you have a small set of immutable objects that are common to all sessions -- for example states. To prevent unnecessary duplication, it would be useful to keep a single collection of these objects, say in your Application object. One of the limitations, however, of normal editing contexts is that you cannot establish relationships between objects in different editing contexts. This makes things difficult if you want a share set of EOs...

... hence the shared editing context.

<http://developer.apple.com/documentation/WebObjects/Reference/API/com/ webobjects/eocontrol/EOSharedEditingContext.html>

mmalc
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Editing Context Choices
      • From: Hunter Hillegas <email@hidden>
References: 
 >Editing Context Choices (From: Lotsa Cabo <email@hidden>)
 >Re: Editing Context Choices (From: Hunter Hillegas <email@hidden>)

  • Prev by Date: Re: Updating / Replacing Parent Objects
  • Next by Date: Re: Editing Context Choices
  • Previous by thread: Re: Editing Context Choices
  • Next by thread: Re: Editing Context Choices
  • Index(es):
    • Date
    • Thread