Best way to managing communication between presenters

Topics: CAB & Smart Client Software Factory
Oct 10, 2007 at 5:35 PM
Hi all,
I have 2 views/presenters that I switch between in my application. I don't want to embed the switching logic in either presenter. So the question is where should I add the workflow for switching between views?

My thought is that it should not go in the Module's ModuleController. I was thinking that I should create a WorkItem that would subscribe to events posted by the presenters. Essentially the WorkItem would act as a Controller for the presenters. The ModuleController would create this WorkItem; the WorkItem would create the Views

Thanks,
Jonathan
Oct 10, 2007 at 7:11 PM
Jonathan,

That's the way we do it. WorkItems work great as Controller classes for specific use cases.
Oct 16, 2007 at 5:24 AM
Yep, or the WorkItem could use State and/or State change events (which gives you the old object and the new as the event args, if it's useful).