Re: DbEntity Comments

From: Dirk Olmes (dir..anthippe.ping.de)
Date: Wed Jan 31 2007 - 10:45:59 EST

  • Next message: Dirk Olmes: "Re: DbEntity Comments"

    Andrus Adamchik wrote:
    > Hi Dirk,
    >
    > I also had performance concerns. So maybe store all that bulky optional
    > metadata (be it just comments or some arbitrary key value pairs) in a
    > separate properties file sitting next to the project descriptor
    > (cayenne.properties?). Each property name will be prefixed with a
    > location of the property-owning node in the project tree.

    Sounds like a good idea: if the final app does not load the metadata,
    the runtime won't be polluted.

    The approach I chose then was to build a separate app, though I'd rather
    go for modeler support just because it's more convenient to use just one
    app.

    > E.g.:
    >
    > map:mymap1.dbentity:myentity1.abc.comment = ABC...
    > map:mymap2.objentity:myentity2.abc.comment = XYZ...
    >
    > ... or something. Properties can be loaded lazily on first access and
    > CayenneModeler would take care of building the proper keys.
    >
    > Is this similar to what you've done?

    Roughly. I use Maps internally but did not use Properties objects but
    serialized java objects using the XMLEncoder/XMLDecoder because that was
    the simplest thing then. What about special characters, HTML markup etc.
    in the values? Does that cause trouble when writing Properties instances
    to disk?

    Another feature of my app was the possibilty to generate HTML
    documentation of the comments that were entered. I have fairly simple
    veolcity templates in place but that is just a matter of hacking the
    templates.

    I just see that I even have a demo online, check the last line of
    http://xanthippe.dyndns.org/CayenneDoc/ for a WebStart demo of the project.

    -dirk

    -- 
    A: Maybe because some people are too annoyed by top-posting.
    Q: Why do I not get an answer to my question(s)?
    A: Because it messes up the order in which people normally read text.
    Q: Why is top-posting such a bad thing?
    



    This archive was generated by hypermail 2.0.0 : Wed Jan 31 2007 - 10:56:19 EST