Re: Cayenne XML Names

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed Dec 19 2007 - 11:27:51 EST

  • Next message: Michael Gentry: "Re: Cayenne XML Names"

    Not saying yes or no just yet, but let me comment on the specific items.

    > * Have Cayenne Modeler save the XML files (cayenne.xml, etc) into a
    > Cayenne wrapper directory of your naming, such as MyModel.cayenne (it
    > would append the .cayenne, which is the wrapper signature). You could
    > also have MyOtherModel.cayenne in the same directory.

    Currently you can have multiple cayenne.xml files either in different
    packages or in the root of different jars (of course this will only
    becomes really useful once we implement CAY-943). Having multiple
    cayenne.xml in a single jar doesn't buy you much really...

    > * Have Cayenne resolve all *.cayenne wrappers at the root of the
    > CLASSPATH upon startup.

    How are you planning to do that? The only environment independent way
    that I know of in Java is "ClassLoader.getResources(String)" which
    requires an exact name, not a pattern. This would work for multiple
    cayenne.xml in the root of different jars, but won't work for
    "*.cayenne" (there are some workarounds that may potentially limit
    portability).

    > * The *.cayenne wrapper directories could be "branded" with a Cayenne
    > logo (at least on OS X, not 100% sure about other OS's).

    This would be an OSX only feature.

    > * The *.cayenne wrapper can be double-clicked to launch Cayenne
    > Modeler (again, on OS X, hopefully on other OS's too).

    This one too.

    > * It is easier to copy a model around in a GUI (drag and drop one
    > "file") instead of select multiple files.

    True, although usually you'd have .svn in your folder, so you do not
    want to copy that.

    > I can't think of any real negatives to this, either,
    > but feedback is greatly appreciated.

    The biggest negative to me is that we introduce extra complexity
    without a clear advantage. I am worried of Cayenne turning into Perl
    with multiple redundant ways to solve any given problem (note that
    usually I am the one guilty of this .... for instance now we have 3
    types of persistent objects).

    Anyways, we have to weigh potential benefits against this concern. And
    the only benefit I am seeing so far is branding on OS X which is
    probably the least of our concerns.

    Andrus



    This archive was generated by hypermail 2.0.0 : Wed Dec 19 2007 - 11:28:31 EST