Initial questions, thoughts & suggestions

From: Holger Hoffstätte (holge..izards.de)
Date: Mon Sep 02 2002 - 10:17:25 EDT

  • Next message: Andrus: "Re: Initial questions, thoughts & suggestions"

    Hello Andrus,

    I recently spent some time checking out Cayenne and really, really like
    it. As an EOF/WO user since day 1 (actually 0.9 ;) I've always been
    watching the 'competition', but honestly didn't find anything worthwile,
    neither commercially (except TopLink) nor in the open-source world. Since
    Cayenne is conceptually very close to EOF I had little trouble coming up
    with a working example that 'just worked' - very nice. It's good to see
    that large result sets are taken care of properly, and I also like the
    quality of the source code, especially considering it's still alpha!

    I do have a couple of questions and suggestions, in no particular order:

    - the main reason for the strong separation between DbEntity and ObjEntity
    that I could think of is the possibility to plug in alternative
    storage/persistence mechanisms later (OODB, JDO, Smalltalk-like image
    snapshot etc.) by means of different DbEntities - right?

    - am I right that there is currently no validation suport (as in
    validateXForY) or did I just overlook something in the APIs?

    - Strings are evil! I beg you to please, PLEASE! change the APIs that take
    Strings as arguments to only use classes or proper Db/ObjEntities
    whereever possible. For example:

      -- DataContext.lookupEntity(String) -> lookupEntityForClass(Class) is
    IMHO much cleaner and does not clutter up your program with hard-coded
    mapping names.

      -- DataContext.registerNewObject(DataObject, String) ->
    registerNewObject(DataObject) - why not get the ObjEntity from the
    DataMap? If the DataObject's class is not registered there, it won't make
    sense anyway (AFAIU).

    I realize some Strings are unavoidable, e.g. In Entity with named
    attributes and relationships, but I really feel these should be kept to a
    minimum and out of application code at all costs.

    - ordered relationships! You might have read some of my thoughts on this
    on wo-dev/wo-talk; although some people think data ordering is strictly a
    'view' responsibility, I still feel many kinds of data are inherently
    ordered in some way. It would be very cool to have automatically ordered
    server- and client side to-many relationships! These should ideally be
    configurable in the mapping (DbEntity/DbRelationship) with the
    corresponding effect (maintained ordering on insertion) on the Obj side
    of things. I have this working in EOF and it's _great_, although
    admittedly only half-baked since it doesn't take to-many array
    modifications into account. With pluggable relationship classes/array
    subclasses this should be a no-brainer in Cayenne.

    - similarly, model-specified (but user-overridable) relationship
    prefetching would be helpful. Why should my application hard-code prefetch
    hint logic? I feel this is really the modeler's responsibility and gives a
    nice, centralized way to improve fault behaviour especially when
    optimizing/tuning.

    - I miss some delegates; OperationObserver does some things, but pluggable
    observers for 'events' like with EOF are IMHO essential. I think
    notifications are a double-edged sword because of the inherent problem of
    ordered message delivery. Any thoughts, ideas on this?

    - how can I help?

    Holger



    This archive was generated by hypermail 2.0.0 : Mon Sep 02 2002 - 10:17:43 EDT