Re: Some ideas extending Cayenne

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Sun Aug 12 2007 - 09:08:44 EDT

  • Next message: Andrus Adamchik: "New Cayenne PMC member - Aristedes Maniatis"

    Hi Adrian,

    On Aug 9, 2007, at 5:51 PM, Adrian Wiesmann wrote:
    > - Typed Keys: Primary keys are generated for all DataObjects and it
    > would
    > be possible to use typed keys while programming. (The fill method
    > in the
    > table module extension below could be called with a typed key
    > lowering the
    > possibility of coding/conversion errors.)

    What is a typed key? Is it a custom Java class used for PK? If so,
    you sort of can do that by mapping a meaningful PK and using an
    ExtendedType to map a custom class for PK.

    > - Implementation of Table Data Gateway design pattern: The process
    > to load
    > and persist data is managed in a typed gateway class so that it
    > would be
    > possible to rewrite or add "elements" of a query (think about
    > filling a
    > logical unmapped field on a DataObject with a subquery). I know I
    > could do
    > something like this with callbacks. But with callbacks I can't
    > extend the
    > query for a performant loading of records.

    There are two more extension points in Cayenne 3.0 that may help you
    to do that - custom queries and ObjectContext decorators (so you may
    intercept certain queries/operation and rewrite them to your liking).
    So essentially it should be possible to build what you are describing
    as a complimentary module to Cayenne first, and then see if it is
    worth integrating it in the core.

    > And: I am currently thinking about completely remodeling DataViews.
    > One
    > of the ideas I have is that the UI could be built from an XML
    > definition
    > which is transformed into an object tree. That object tree could be
    > used
    > by a renderer to generate a Swing interface, an xsl-fo tree (for PDF
    > generation) or HTML (for webapps). Have you ever thought about
    > something
    > like this?

    Many people did (I even started a project called JStaple that never
    took off). Not sure if anybody succeeded in building something usable
    though.

    Andrus



    This archive was generated by hypermail 2.0.0 : Sun Aug 12 2007 - 09:09:00 EDT