RE: Cayenne in a framework -> Value Objects

From: Fredrik Liden (flide..ranslate.com)
Date: Fri Jul 09 2004 - 12:58:54 EDT

  • Next message: Newton, Greg P.: "RE: transaction ordering"

    Hi,

    A more general question. If two clients obtained the same DataObject
    wouldn't there be some kind of conflict? How does the DataContext handle
    these kinds of transaction issues? Or once the DataObject is generated
    is it completely independent of the DataContext?
    And what kind of work on the deserialization do I need to do on the
    DataObjects? And do I need to do that work even if the all the layers
    are executing on the same machine? Pardon my rookie questions.

    You guys rock!

    /Fredrik

    -----Original Message-----
    From: Andrus Adamchik [mailto:andru..bjectstyle.org]
    Sent: Thursday, July 08, 2004 7:04 AM
    To: cayenne-use..bjectstyle.org
    Subject: Re: Cayenne in a framework -> Value Objects

    Hi Fredrik,

    If you want to pass objects directly between the tiers in your
    application, you can do that, as DataObject and DataContext are
    serializable. The easiest way is to serialize the whole DataContext and
    pass it around. But DataObjects can be serialized individually as well
    (with little extra work on deserializaion).

    In the future we are planning a more advanced and optimized
    implementation of a DataContext working across the tiers as this is
    being requested a lot (e.g.
    http://objectstyle.org/cayenne/lists/cayenne-user/2004/07/0026.html).
    Once this is done, the need for explicit use of DTO will be eliminated
    in most apps. Such DataContext will be very useful in applications with
    rich client that have a server-side app tier, but still stay
    lightweight, continue using ORM across tiers, and stay away from EJB.

    As I've been lucky avoid the use EJB on my projects (thanks to Cayenne
    in big part!), I leave it to someone else to share their Cayenne-EJB
    experiences, but like I said, Cayenne DataObjects can be used as DTO
    directly.

    Andrus

    On Jul 7, 2004, at 8:10 PM, Fredrik Liden wrote:
    > Hi,
    >
    > I'm a new Cayenne user and I'm planning to build and application and
    > I'm wondering how Cayenne fits the overall framework.
    >
    > Can I use the classes that Cayenne generates as ValueObjects/Transfer
    > Objects objects or do I need to generate VO objects from the Cayenne
    > classes in the same way that EJB does?
    >
    > Does anyone have any advice and idea on this? I'd like the framework
    > to be as flexible as possible.
    > Thanks
    >
    > /Fredrik



    This archive was generated by hypermail 2.0.0 : Fri Jul 09 2004 - 12:51:57 EDT