PC Review


Reply
Thread Tools Rate Thread

Design Pattern help for this scenerio?.

 
 
KK
Guest
Posts: n/a
 
      13th May 2004
Design Pattern help for this scenerio?.

I need some expert advice on possible ways
to design the classes for following scenerio.

Subject domain has 3 types of identities.
Lets say <IDType1>, <IDType2>. Because
both are identities and have some
commonality we can inherit them from a
base <Identity> type.

Then there is People who owns those IDs.
Some have only 1 ID and some have both.

The problem I have having here is this.
You should be able to add <Identity>
only with a person. So, basicaly I thought
to have a register method inside <Person>
which inturn call [Add] methods in IDentites.

Also, I cannot have [Add] methods inside
the IDType1, IDType2 classes as public
because then it will allow adding identites
without adding a <Person>

Having Identities as inner classes within
<Person> will solve the above issue,
but then, to provide functionality such
as listing/searching IDType1, IDType2
will also have to be done from <Person>
which is a bit silly (I guess)

Using internal keyword may be another
solution. But I think there can be a better
way of doing this.

Any body who can help me
with some design pattern here?

Regards
KK


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Design pattern phancey@googlemail.com Microsoft C# .NET 8 30th Mar 2009 04:22 PM
Design/Pattern guidance to refector my current design for unit testing sklett Microsoft C# .NET 1 22nd Aug 2007 12:58 PM
Design Pattern help for this scenerio?. KK Microsoft Dot NET Framework 0 13th May 2004 07:07 AM
How to design this form editor record scenerio? Cheng-Liang Shen Microsoft Access 3 5th Oct 2003 01:15 AM
How to design this form edit record scenerio? Cheng-Liang Shen Microsoft Access Forms 1 4th Oct 2003 06:31 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:42 PM.