Re: I am missing Expression architecture

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed Oct 01 2003 - 11:05:22 EDT

  • Next message: Giulio Cesare Solaroli: "Re: I am missing Expression architecture"

    Hi Giulio Cesare,

    I am writing an extended answer to your earlier e-mail that included
    the discussion of Expressions. I'll send it out later today (still
    trying to figure out a few things myself). Here is a snip from that
    e-mail about the expressions...The design is indeed different from that
    of EOF:

    "Expression class simply defines semantics of the expression, and
    doesn't contain any processing logic. ExpressionFactory hides all the
    wiring and allows to create expressions using simple method names
    following the "common logic". All the new methods can be defined under
    ExpressionFactory. So I guess subclassing an expression won't buy us
    much."

    All processing logic is external to Expressions. Such design allowed to
    avoid the explosion of subclasses, and also separate expressions from
    such things like SQL generation, etc. ..Though I guess this makes it
    harder to extend the algorithms used in conjunction with expressions.

    > Where is the logic to use the expression to filter objects in memory?

    Expression.eval() that delegates evaluation to EvalExpression class.
    This feature is still not complete for all expression kinds.

    > Where is the logic to create the SQL statement from an expression
    > object? (Andrus has suggested me to look into QueryTranslator and
    > QualifierTranslator)

    Yes, this is the place. But as far as adding EXISTS support, etc., I
    was still figuring out the best way.

    More info coming...

    Andrus



    This archive was generated by hypermail 2.0.0 : Wed Oct 01 2003 - 11:04:52 EDT