Re: Possible New Feature For Entity Modeler/EOGenerator

From: David Avendasora (webobject..vendasora.com)
Date: Thu Feb 07 2008 - 14:30:46 EST

  • Next message: Thomas: "Re: Refusing direct actions"

    Hi all,

    I was able to use EOGenerator to generate "common" classes from the
    model by putting the package in the User Info dictionary and using a
    filename template in EOGenerator, but I'm still left with the problem
    that occurrences of "referenceJavaClassName" in the template will
    return a fully qualified class name for either the server or the
    client class, depending upon which check-box is checked (Java/Java
    Client) in the .eogen file.

    Having EOGenerator be able to look for a "common class name" like it
    can for "client class name" seems to be the only way to have the
    common class generated with getters and setters.

    Is this possible?

    Dave

    On Feb 6, 2008, at 9:12 AM, David Avendasora wrote:

    > Mike, other Java Client developers out there, interested bystanders,
    >
    > I've got what I think is a new feature request for Entity Modeler
    > and Velocity EOGenerator, but I want to throw the idea around here
    > first and see what other minds come up with.
    >
    > For Java Client projects, a key design concept is to have a common
    > Entity class that both the server-side and client-side classes
    > extend. Apple mentions it in the old Java Client documentation, and
    > I've talked to several others that do use this.
    >
    > The problem is that there is no way to really generate this class
    > using EOGenerator because there's no way to specify a "common"
    > Class in Entity Modeler only Server and Client classes, and
    > EOGenerator wouldn't look for it even if it was there. This means
    > that any template variable that would print the fully qualified
    > class name won't work to generate a common class package. This
    > makes it impossible to define relationships and such in the common
    > class. In theory, I could leave the defining of relationships and
    > even attributes to the server and client classes and simply use key-
    > value coding in any methods I add to the common class, but this
    > seems very limiting.
    >
    > So, here's what I'm proposing:
    >
    > - Add a "Common Class Name" to the EOModel Entity definition.
    >
    > - Add a "Common Class Attribute" flag to the EOModel Attribute and
    > Relationship definitions - maybe not this one, because if it is
    > flagged as both a Class Attribute and Client Class Attribute, then
    > you can automatically put it in the Common Class.
    >
    > - Add a "Common" checkbox (next to the Java and Java Client
    > checkboxes) to the .eogen editor that would tell EOGenerator to
    > look for the above attributes.
    > (really, these should be renamed to (Server and Client, and the
    > accompanying text changed, it doesn't make sense as is)
    >
    > Am I missing anything?
    >
    > Dave
    >
    >



    This archive was generated by hypermail 2.0.0 : Thu Feb 07 2008 - 14:31:54 EST