RegionBehaviour and concept of shared hosting control

Nov 29, 2008 at 1:32 AM
Edited Dec 2, 2008 at 12:14 PM

If you have a “hosting control” and multiple modules that share the region/hosting control, and you need to have only one module or its collection of module views  active at the time how would you proceed?

In past with smart client factories, I ran into the challenge of requirements between marketing departments visual standards and legacy interfaces.  I ended up to separating the views into multiple modules and regions, which control dependencies between the views I merge by controller. This separation did not make a sense in UI logic, but it was compliant with the requirements that were important in solution acceptance.

Anyhow, based on the inspiration of RegionActiveAwereBehaviour I was wondering what would be the best way to address above issue without over coding the controller, and would it be worth to extend a  RegionBehaviours concept a bit more to cover cases like this.

For background see Erwin van der Valk's blog of RegionBehaviours at

Also I was wondering if SyncRegionContextWithHostBehaviour is intent to cover this, and if so any explanation when and how to use this behaviour would be highly appreciated.

Any thoughts?

Late Saturday Note: after some deep look of test cases and current code in CD6 I realized that probably only way onward would be to create an adapter like TabControlRegionAdapter, but adapt between the modules and regions or create something like ModuleRegionsAdapter. 

To simplify the initial question, consider following requirements:

  • Solution contains several modules.
  • Each module contains an x-number of views that are mapped to available shell regions.
  • When view of module x0 is become active, corresponding region views of module should be activated and presenter should be notified for futher action. 


Just for my own sanity, am I right way on this or is there more straightforward or out-of-box solution when you want to simply the controller logic and number of interactions between controller/view/presenter?



Late Sunday Update:
I think the problem here is that, Region is conceptually proposed to be highest grouping of views. Maybe I did not understand the adapter mapping and behavior concept correctly but if highest point is Region.  This will increase the complexity of controller(s) when regions are shared by multiple modules. Why would I share the regions?

Consider following, if you requirements of visual compositions or regions are proposed by different interests groups of your client. For example, you visual compositions are proposed by marketing or advertisement company of current established visual standard of public corporate outlook, whereas your modules and views are often build on business or interfacing requirements of business domains, services and existing legacy interfaces.

I made a one conceptual diagram in order to see with couple of modules how the complexity increases in module transitions. I believe this can be simplify if there would be a Group which region can be added, and group can have a behavior like currently proposed on Regions and views hierarchy.

I could not add this diagram here directly so the link to this JPG diagram is in below URL.

This has been a long monolog so far, any thoughts here would be great.