On Fri, 14 Jun 2002 10:34:47 +0100 (BST)
Mark Fowler <[EMAIL PROTECTED]> wrote:

: On Fri, 14 Jun 2002, Nigel Hamilton wrote:
: 
: >     Generally I try to minimise the layers/tiers/abstraction between
: > the front-end and the database - for me OO/SQL abstraction is something
: > akin to 'GOTO considered harmful'.
:
: The advantage of this is that we get better reuse in out of our SQL when
: we need the same function called from many places, and we can reuse the
: same SQL on similar tables/databases for different runs.  Another
: advantage is that should we ever want to change the database all our SQL
: is in a few modules and we can make sure that we change all our SQL.

Another useful thing is that you can implement some cache mechanism
there, in one place, and this is transparent to clients who just keep on
calling, say, $category_factory->read_category_tree(), no matter whether
the tree is actually fetched from the database or from shared memory.

-- fxn

Reply via email to