say teh properties of P are m = username n = userid o = List of HR actions No, sometimes I I want to just build a report involving Ps and only need username and userid. Other times I may need one instance of P that has the list of HR actions. In short, I;m wondering if I can avoid having multiple objects thate are all just variations of P. I suupos I can use some inheritance with P. Have P be the parent with teh common properties, then extend P to P1, P2, or P3 as needed adding teh other properties.
being a little new to the full blown OOP stuffs, just wondering about an approach. DK On 9/15/05, Barney Boisvert <[EMAIL PROTECTED]> wrote: > In this case, I think the 'it depends' hinges on what that ignored > field is. In any case, A.x's elements are going to have field e in > them. The question is whether both A and B are refering to the same P > entities. If so, then you should use a single P object. If they're > different entities, then you'd want P and P'. > > The way to handle P.e depends on what it is. When you say 'sometimes' > P needs an 'e' property, what do you really mean? What I'm getting at > is whether P needs an 'e' property, or if P needs a place for 'e' > extensions to hang (composition), where e is actually another object > that is composed into P. > > That make any sense? > > cheers, > barneyb > > On 9/15/05, Douglas Knudsen <[EMAIL PROTECTED]> wrote: > > Say I have object A. A has a property x. x is an Array of object P. > > P has properties m,n. Now I create a new object B that has a property > > y where y is an Array of object P. But in B's case, P needs an extra > > property e. > > > > Is it common to create two differnt P objects in this case? Or just > > create one P with properties m,n, and o when A uses P it can just > > ignore o. > > > > I know, common response is 'It depends'. I'm just looking to see if > > there is a "watch out this approach will muck things up usually" or > > "seems ok". In my case P is an object with Empoyee information. > > Sometimes it needs to have say 3 properties, other times 4. > > > > > > -- > > Douglas Knudsen > > http://www.cubicleman.com > > this is my signature, like it? > > > > > > > -- > Barney Boisvert > [EMAIL PROTECTED] > 360.319.6145 > http://www.barneyb.com/ > > Got Gmail? I have 100 invites. > > > ---------------------------------------------------------- > You are subscribed to cfcdev. To unsubscribe, send an email to > [email protected] with the words 'unsubscribe cfcdev' as the subject of the > email. > > CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting > (www.cfxhosting.com). > > CFCDev is supported by New Atlanta, makers of BlueDragon > http://www.newatlanta.com/products/bluedragon/index.cfm > > An archive of the CFCDev list is available at > www.mail-archive.com/[email protected] > > > -- Douglas Knudsen http://www.cubicleman.com this is my signature, like it? ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). CFCDev is supported by New Atlanta, makers of BlueDragon http://www.newatlanta.com/products/bluedragon/index.cfm An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
