in reply to OO or just OOps ?

"data" is never really a good candidate for being "an object". What is the role this data plays in your program?

The point of OO is to take the "objects" of your problem, and represent them in your program as "Objects" with behavior and state, and to also capture similarities of object behavior in an inheritance hierarchy for code reuse.

So, no, one nested hash does not a candidate for Objects make. {grin}

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
Re: •Re: OO or just OOps ?
by guha (Priest) on Sep 23, 2002 at 14:46 UTC

    Well,
    I thought I wanted Client to be an class, with accessors for the attributes and then have several instances of them, one for each client.

    The same for orders and items

    Perhaps a class for konfiguration data instead of globals floating around

    And then to avoid redundancy the TYPE could be "class"-ifyed

    I known my post is muddy at best, but what I was trying to avoid is that the communication between objects would nessitate having to juggle several objects of different classes to perform the action.

    As an example consider selecting what media a certain client wants his confirmation, which would be found in the client instance and pertinent data would also be found in the configuration instance.

    And yeah I know, messed up design, but that was really the reason for my question

Re: •Re: OO or just OOps ?
by blm (Hermit) on Sep 23, 2002 at 18:10 UTC

    I am sorry but I don't understand the first statement. I know I am (much) less experienced then you but I thought people often encapsulate data in objects and use accessor methods to get at the data. The accessor methods provide verifcation of data structure over and above what the use of datatypes can provide.

    With all due respect,

    --blm--
      That would be "procedural programming with objects".

      You can find much better approaches out there. (Yeah, it is in Java. Take good advice where you find it.)