Greetings all,
Obviously I have a question. I have a set of classes in an N-tiered
environment (based on an older version of Rockford Lhotka's CSLA
architecture) and have a situation where I need to notify a parent
object that something has happened in a child object, similar to an
event.
After the parent has deserialized back to the client, I have 2 choices
(unless there is something completely different that Im not
considering), send the children objects a reference to the parent
object, or send a delegate such that these children can invoke it when
need be.
The question is - which would be better in this situation? In terms of
memory footprint, my gut tells me the footprint would be about the
same for either. Is there any other reason to choose one over the
other?
Thanks
Michael C - 04 Mar 2008 03:58 GMT
> Greetings all,
>
> Obviously I have a question.
Who would have thought? :-)
> I have a set of classes in an N-tiered
> environment (based on an older version of Rockford Lhotka's CSLA
[quoted text clipped - 12 lines]
> same for either. Is there any other reason to choose one over the
> other?
The reference to the parent has other uses, if the child needs to find other
properties of it's parent then it can.
> Thanks
Mr. Arnold - 04 Mar 2008 19:59 GMT
> Greetings all,
>
[quoted text clipped - 14 lines]
> same for either. Is there any other reason to choose one over the
> other?
I couldn't tell you one way or the other. I do know that you can email
Rockford, which is at his Web site, he will reply to you. There is also a
CSLA forum.
Inictus - 06 Mar 2008 17:25 GMT
Thanks for the responses.
As for Michael's point, there is value in having a parent reference
for other things, but I don't think I need it beyond notification that
something has happend.
I've looked in the CSLA forum, and since im using a really old (yet
heavily modified) version of the framework (the thought of upgrading
to the latest scares the heck out of me), its hard to find posts
regarding older versions.
I do have a question should I go the delegate route:
If I statically declare delegates in the classes, do I have to worry
about disposing them come garbage collection time? Or will I get a
memory leak if I do nothing.
Mr. Arnold - 07 Mar 2008 12:33 GMT
> Thanks for the responses.
>
[quoted text clipped - 12 lines]
> about disposing them come garbage collection time? Or will I get a
> memory leak if I do nothing.
I can't tell you myself. You're going to have to play. I suggest you make
contact with Rocky. I have emailed him a couple for times. He does get back
to you quickly.