Re: SharedEditingContext Write Locks?
Re: SharedEditingContext Write Locks?
- Subject: Re: SharedEditingContext Write Locks?
- From: Chuck Hill <email@hidden>
- Date: Wed, 16 Nov 2005 20:27:14 -0800
I think Ben was pretty clear on this:
The crux of the issue here is that EOSharedEditingContext uses
implementation inheritance from EOEditingContext instead of
composition.
Someone got lazy and inherited from EOEditingContext. Bad OO but
less effort. This is inheritance for behavior not type inheritance a
la the Liskov Substitution Principle. EOSharedEditingContext is more
of an EOObjectStore than an EOEditingContext.
Chuck
On Nov 16, 2005, at 8:17 PM, Ian Joyner wrote:
On 17/11/2005, at 10:45 AM, Ben Trumbull wrote:
K.
Here's the secret:
EOSharedEditingContexts are NOT EOEditingContexts.
That's a great secret because the EOSharedEditingContext doc says:
Class EOSharedEditingContext
java.lang.Object
<inherit.gif>
com.webobjects.eocontrol.EOObjectStore
<inherit.gif>
com.webobjects.eocontrol.EOEditingContext
<inherit.gif>
com.webobjects.eocontrol.EOSharedEditingContext
public class EOSharedEditingContext extends EOEditingContext
so EOSharedEditingContext inherits from EOEditingContext and
therefore 'is a' EOSharedEditingContext.
I have not had a great deal of luck trying to share read-only
entities in a shared context, so perhaps what you are saying is
right. If you can't use a shared editing context anywhere you might
have an editing context then this design is wrong. If
EOSharedEditingContext cannot fulfill the contracts of
EOEditingContext (ie do at least as much as and more than) then
inheritance should not be used. If they share some behaviour but
not all, that behaviour should be in a common parent class
(something languages without multiple inheritance make difficult to
reap the full benefits of factorizing common behaviours into small
classes).
Anyone care to explain?
Thanks
Ian
<inherit.gif>
<inherit.gif>
<inherit.gif>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net
This email sent to email@hidden
--
Coming in 2006 - an introduction to web applications using WebObjects
and Xcode http://www.global-village.net/wointro
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems. http://www.global-village.net/products/practical_webobjects
_______________________________________________
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