Some ideas extending Cayenne

From: Adrian Wiesmann (awiesman..omap.org)
Date: Thu Aug 09 2007 - 17:51:03 EDT

  • Next message: Michael Gentry: "Re: Enums"

    Hello all

    I am having a few ideas concerning extending Cayenne and I would like to
    hear your comments. Probably some of these ideas already would be possible
    or some were discussed before? Would they be difficult to implement? Are
    there others interested in such extensions?

    - 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.)

    - 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.

    - Implementation of Table Module design pattern: Currently DataObjects are
    a mixture between a "Data Row" and a "Table Module". The idea of a typed
    table module per DataObject is that business logic for all rows would be
    put into the table module and logic for one row would be put into the row
    (table module: fill, fillbyforeignkey, persist. data object: row
    validation).

    Above extensions would require some changes to the ObjectContext (it
    should know the loaded table modules) and on other core elements of
    Cayenne. Would that be a problem for others or result in many side
    effects?

    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?

    Thanks for your comments.

    Regards,
    Adrian



    This archive was generated by hypermail 2.0.0 : Thu Aug 09 2007 - 17:51:37 EDT