Displaying Modules from UI - Best Practice/thoughts

May 28, 2008 at 6:03 AM
I'm looking for some guidance/opinions from people regarding the best way to handle a situation where I want to be able to have multiple instances of a module running within a UI.

I am wiring up button on a toolbar to call the logic that will Show the main view of the module in a central region (rather than doing this in the Module.Initialize() method). There are 2 ways I can see to get text on to my buttons,

1. The Module itself can interact with an interface level Service to add the button to the toolbar (very similar to they way UIExtension sites work in CAB/SCSF) OR
2. I can add something a string to the IModule interface so that the shell can interrogate the module for it's "display name" to go on the button.

I think both have their merits and I was wondering what the consensus was on which way is "better".

Anyone care to share their thoughts on this?

Cheers

Justin