RE: Cleaning up ROP

From: Kevin Menard (kmenar..ervprise.com)
Date: Thu Nov 08 2007 - 10:19:22 EST

  • Next message: Andrus Adamchik: "Re: [VOTE] Re: 3.0 M2 Release Vote"

    Having played with this a bit, I have a better handle on the problem
    now. I also have a much richer appreciation for what CDO does for me
    ;-)

    Making the client objects work on the server seems doable, but does
    require either changes to the velocity templates or the context provided
    to them. Right now, the issues I see are:

    1) Serialization -- Fields are controlled by getters/setters and as such
    should probably be marked transient, allowing a fault to resolve values
    upon deserialization.

    2) Runtime relationships -- Need to have accessor methods in superclass.
    Likely requires change to context.

    3) Reverse relationships -- Need some way of handling this in the
    superclass that doesn't produce a recursive loop.

    #1 I've addressed locally by marking the fields transient. There's
    probably a better way of handling this, but it works for now.

    #2 I've addressed locally by modifying the data map to specify all
    reverse relationships.

    #3 I haven't dealt with yet. A rough approach is to have public
    accessors that take the single target parameter and a set of private
    setters that take the target plus a Boolean that indicates whether to
    set the reverse relationship. This could be done all in the velocity
    template and would take care of the recursive call problem.

    -- 
    Kevin
    

    -----Original Message----- From: Andrus Adamchik [mailto:andru..bjectstyle.org] Sent: Wednesday, November 07, 2007 3:53 AM To: de..ayenne.apache.org Subject: Re: Cleaning up ROP

    Hi Kevin,

    CayenneDataObject approach is fundamentally different from other persistent object implementations that are all variations of POJO. So I think a different approach may work better - using current client objects on the server (instead of using current server objects on the client).

    Andrus



    This archive was generated by hypermail 2.0.0 : Thu Nov 08 2007 - 12:25:16 EST