Re: Cayenne in a framework -> Value Objects

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Thu Jul 08 2004 - 10:04:02 EDT

  • Next message: Andrus Adamchik: "Re: Filter a to-many relationship"

    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 : Thu Jul 08 2004 - 10:04:06 EDT