Appropriate pattern

M

Mike

Hi,

I have 4 user controls that are used in a wizard form. Since I also wanted
to re-use those controls when editing the same information that are created
with the wizard. I used a class (Facade pattern) to ease the interaction
with 4 user controls. The problem is that each of the user controls also
contain information that are used in a business object, which I cannot
access directly.

I was thinking about the Mediator pattern to get all the various properties
contained in the various user controls in a "central" place and then set up
getters to retrieve this information in the Facade class. I want to avoid
building a too complex system. What are your thoughts?

Thanks.
Mike
 
G

Gabriel Lozano-Morán

To clearly understand the problem, are you saying that the business object
needs information from the user controls or the other way around? And the
interface of this business object won't change?

Anyway my first impressions is more like a MVC like approach where the
business object is the model and the user control(s) the view(s) instead of
adding the complexitiy of a Mediator.

Gabriel Lozano-Morán
The .NET Aficionado
http://www.pointerx.net
 
M

Mike

Yes, the user controls need information from the business object and the BO
needs information from the user controls (basically, when loading data, the
UC gets data from the BO, and when saving data, teh opposite occurs).

I see what you with the MVC.

Thanks.
Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top