Re: Velocity Generator & FetchSpecs Bindings

From: David Avendasora (webobject..vendasora.com)
Date: Tue Mar 04 2008 - 17:08:52 EST

  • Next message: Mike Schrag: "Re: java.lang.NoClassDefFoundError: JDBCPlugIn"

    On Mar 4, 2008, at 3:45 PM, Mike Schrag wrote:

    >> Now, if I could add
    >>
    >> "_commonClassPropertyNames" = (list, of, common, attributes)
    >>
    >> and a
    >>
    >> "_commonClassName" = "com.bestmaid.bakeryManagement.common.part.Part"
    > So I'm with you on commonClassName, but I'm not sure why you would
    > need commonClassPropertyNames. Aren't all properties on both server
    > and client? If we added a common class name to the entity, and
    > setup the EOModelRenderContext to only return the common class name
    > (which would be the superclass of the client and server classes),
    > then your relationships would all point to the correct class (or
    > rather their superclass, which should always work). But maybe I'm
    > not following the common class property issue ...
    >
    > ms

    There are often times where the client will not have a property or
    relationship or maybe even a class that is on the server-side. If the
    user doesn't need to see it, you wouldn't put it out on the client.
    That way you don't accidentally pull a bunch of data across the client
    link you don't need to, the other reason is that you want to minimize
    the amount of business-logic code on the client side that is available
    to decompile.

    In reality, the client class properties/relationships are the least-
    common-denominators, so if the common class only has the client-side
    attributes in it that would be the same effect as having declared
    "common" attributes and relationships.

    The real trick is that if the attributes/relationships are in the
    common class, they shouldn't automatically end up in the server/
    _entity.java or client/_entity.java generated classes. So _if_ there
    is a common class, the server- and client-side _entity.java template
    files should only generate stuff that isn't in the common. For client-
    side that means the _entity.java file will be pretty-much empty.

    This is ending up more complicated than I first thought about. It
    would be great if EOGenerator could handle it, but it doesn't sound
    like something that can be churned out in a weekend.

    Especially not when there's all sorts of classpath stuff pending... :)

    Dave



    This archive was generated by hypermail 2.0.0 : Tue Mar 04 2008 - 17:10:08 EST