View - Presenter coupling

Topics: Web Client Software Factory
Nov 20, 2006 at 9:16 PM
As I'm going through the reference implementation, I noticed that there's a two-way dependency between the presenters and the view. My question is that why is the dependency two-way? Looks like that the not only the presenters have intimate knowledge of the view, the views themselves also has knowledge of the presenters.

Other MVP implementations I've seen decouples the view by having presenters observing events raised by view. Is there a reason why WCSF didn't take this approach? complexity? performance? anything?

Thanks.
Nov 21, 2006 at 4:45 AM
Good question!

Purely a stylistic choice, based upon some early feedback. In fact, the first few drops of the reference implementation use the exact model you mention, with the presenter subscribing to events. We'll be adding a recipe to the guidance package that creates views with presenters. If you decide you prefer to communicate with events, you will be able to modify the guidance package to produce that style of interface.

Cheers,
Tim