Need help in design Pattern

May 25 2006 1:23 PM

 

Can somebody help me in deciding the best pattern I should use for following scenario?

Here is my scenario.

XYZ is a company with different members. XYZ sign up with different providers.

Each provider needs different information from members. Some of which is common to all providers like first name, last name.

On member enrollment screen, first member will select provider and depend on that provider I'm creating controls dynamically (normally input boxes). This is working fine.

I created member object with all possible information provider needs (object properties in my case). On submit button I’m assigning values from dynamically created controls to member object. My problem is, member object has so many properties and depend on selected provider some properties get values and other properties will be empty. And then I send that object back to DAL layer and eventually to database.

This technique is working fine. But over the period of time there will be new providers who need different information which is not currently in member object, so member object will keep growing.

Now is there any design pattern or technique to solve this issue. I believe there should be since this common real time scenario.

Can somebody give me a link or hint about the best approach I should use?