Support Staff3 Posted by Shaun Smith on 15 Sep, 2010 05:02 PM
More than one dot (familyView.childView.dosomething()) creates structural coupling, as you hinted at, and forces the mediator to know implementation details that it shouldn't care about.
Instead, your view component should expose an api (interface) that the mediator would talk through (familyView.doSomthing()) - the view would manage the actual implementation details internally (funneling the call through to a child for example).
I may have been overthinking it, but I guess its ok for the familyView to know about the internal workings of childView, my original thought was, to exclude familyView from the communication, as it's not directly involve what the childView as too do.
I have used AS3 signals, but I haven't really seen an example or know if its possible.. using the example in my original post.
have ChildView dispatch signal that a Family Mediator can pick up, without having FamiliyMediator having direct access to the ChildView, if that makes sense.