CAB Events vs. regular events

Topics: CAB & Smart Client Software Factory
Mar 15, 2007 at 5:03 PM
We are building an MDI application using CAB. We have a situation where multiple instances of a smart part are active in a single Work Item. An example would be where two grids are visible at the same time and the data in each relates to the current value of seperate instances of a common smart part. In this case when either of the common smartpart changes, say a list box selection and the relevant smartpart emits an event using CAB eventing, both the grids receive it and cannot distinguish if it was the smart part related to them.

We haven't put the two grids in seperate work items because that would lead to a fair bit of duplication in the processes behind the scenes. My question is, is it best to implement regular events to get around this rather than use the CAB eventing framework, or is there a better way. Any advice would be appreciated.
Mar 21, 2007 at 3:56 PM
Edited Mar 21, 2007 at 4:03 PM
If you are creating both coupled smartparts together and from the same place (i.e. a command in a workitem, or a plain method), maybe it could be wiser (and more performant all the same) to use regular events in that case. One of the mayor benefits of the Event Broker is decoupling concerns, but the way I understand your problem, those parts are already tied together and will remain to be so, and it would add a lot of complexity if you try to separate them a little.

Let me know if this helps,
Julián Domínguez
http://staff.southworks.net/blogs/jdominguez