Kiwi Ingenuity

Thoughts from another perspective

WCSF - Sharing the Controller

While working on a Web Client Software Factory solution, I found myself in a situation where I wanted several presenters to share the same controller.

How this came about was that I had a page that deployed several User Controls that had their own presenters.  These same User Controls needed to communicate with one another, so sharing the same controller, was the solution I needed to deploy.

Mats Lycken had obviously needed to solve the same problem some months earlier and has posted a solution that certainly did the job for me.  He has published a [CreateShared] attribute which can be deployed to replace [CreateNew].

The [CreateShared] attribute enabled me to share the same Controller.  Mats has provided us with library which needs to be included in our project as well as a working example to see how to use the new attribute.

Further documentation can also be found here.  This link refers to a solution that Mats posted in the WCSF Contrib.  I also tried the Contrib solution and have to confess it left me rather confused?  My recommendation is to follow the first link above.

Thank-you Mats for a fine effort!