On 2003-09-25 03:02:54 +0200 Andrus Adamchik <andru..bjectstyle.org> wrote:
> The more I think about it, the more I am convinced that we need a separate
> delegate interface for DataContext. DataContextDelegate is a good start
> :-)...
I like that name.
> Current OperationObserver already combines too many things from different
> areas of Cayenne. Besides the main flow of query execution relies on
> particular implementations of Observer, so it is not good for custom
> delegation. Another alternative - using DataContext events - (that we
> discussed with Dirk and Holger) is not satisfactory to me either (though some
> would probably disagree with me on that :
> http://objectstyle.org/cayenne/lists/cayenne-devel/2003/09/0005.html ).
Err, could you please explain why? When inventing the whole DataContext event machinery at least I had a large number of uses in mind, including events that were to be consumed internally by cayenne. Since you mentioned multi-threaded dispatch before: do you intend the DataContext events to act as a bridge to user code only? Maybe we can refactor the DataContext events a little bit more to match your requirements?
Now, that I think a little bit more about the willPerformQuery use I see that this is really more a delegate in the pure EOF sense: some object that is called before a certain operation is executed and that object has the chance of vetoing/influencing the flow of control. The question that pops up now is: by which criteria do we distinguish between which method calls go into the delegate interface and which will be posted as events?
-dirk
This archive was generated by hypermail 2.0.0 : Fri Sep 26 2003 - 21:48:21 EDT