ValidationFriendly interface

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Thu Feb 07 2002 - 18:53:34 EST

  • Next message: Andrus Adamchik: "Re: ValidationFriendly interface"

    Something I wanted to discuss. I disagree with
    org.objectstyle.cayenne.map.ValidationFriendly interface and its
    implementation by map classes. Here is why.

    Methods in this interface return information that is known to
    DataMapValidator already - class name of an object being validated as
    well as attribute/entity name accessible via existing API. Methods in
    ValidationFriendly clutter map classes API and are very context specific
    (context being DataMapValidator). We may generate a description right in
    each of the validator private methods and add it as an ivar to
    DataMapValidator.Message

    ... Keep public API crystal clear ...

    Sorry, this has been my mantra lately, but I think this will increase
    usability and simplify support of the product significantly. I think
    that Cayenne coding practices should be a bit different from a normal
    business application. Our API is our final product, unlike a normal case
    where functionality is judged using a "black box" approach. At least
    this is true for cayenne, access, map, query and exp packages. I guess
    GUI can use normal "black box" paradigm.

    ================
    On an unrelated note, before we have more specific licensing policies I
    suggest that this is removed from the javadoc:

    <quote>
    Description: Homemade data layer
    Copyright: Copyright (c) 2002
    Company: Logical Process Inc.
    </quote>

    Later we will need to add license text to each Java file, but I don't
    have this yet.

    Cheers

    ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
    - Andrei (a.k.a. Andrus) Adamchik
    http://objectstyle.org
    email: andrus at objectstyle dot org



    This archive was generated by hypermail 2.0.0 : Thu Feb 07 2002 - 19:04:08 EST