Re: Modifying projects in Java

From: Mikaël Cluseau (mikae..sinc.dyndns.org)
Date: Sun Jul 15 2007 - 18:22:11 EDT

  • Next message: Joe Baldwin: "ConfigurationException"

    Hi Andrus, and thanks for your answer.

    Le samedi 14 juillet 2007 à 22:13 +0300, Andrus Adamchik a écrit :
    > To work around a bad decision made a long time ago to use Cayenne
    > runtime objects (DataDomain, DataNode) as CayenneModeler model beans,
    > modeler often uses inner subclasses to suppress various runtime
    > behavior aspects.

    This design decision is something I liked, and is one of the reasons
    that made me choose Cayenne: it allows for coded-style project
    transformation, which is very interesting when it come to batch
    processing. I'm using it to convert client's conventions to an coherent
    objet model, instead of mapping tables one by one using the modeler (you
    guessed it, I'm not a GUI person ;-)).

    I think that the only problem with the current design is that it is
    reversed: you extends run-time objects to modeler objets (ie
    Configuration vs ProjectConfiguration). I *feel* it would be much better
    to use a descriptive model suitable for the modeler and *then* to extend
    the run-time model to it, using a kind of "meta-model" interface:

    // Loads the (meta-)model
    Configuration config = new Configuration("cayenne.xml");
    // Build a run-time model
    RuntimeConfiguration rtc = config.instanciate();
    // Get back the (meta-)model
    assert config == rtc.getMetaModel();

    I'm very tight on my deadlines theses days but I would be happy to help
    you get rid of this "pain" (you seem to call it this way ;-)) in a month
    or two.

    -- 
    Mikaël Cluseau <mc.isi.n..mail.com>
    ISI.NC
    



    This archive was generated by hypermail 2.0.0 : Sun Jul 15 2007 - 18:22:51 EDT