the transaction patch didn't couple the transactions exclusively to the
web layer, with it you can use a python script or interactive
interpreter, via the api provided by the transaction manager. ie.

import transaction
# do some work

# and
transaction.commit()
# or
transaction.abort()

additionally there are more options and apis available to those who
want to use them, like transaction observers, or doing transactional
file system interactions.

integration was done on the web layer there because coming from a zope
world, where thats the norm, i'm loathe to go back to manual
transaction management, or none at all, and imho the cases where you
don't want a web request to map to a transaction are extremly rare,
only one i can think of atm is bulk loading. web requests that mutate
data logically map onto semantic actions, and those actions should
either succeed or not. pushing the burden onto the programmer is the
wrong thing for a framework todo, it gets complex exponentially as the
apps do, and the best thing a framework can do is keep it simple, by
freeing the programmer from having to think about it. unless of course
they need to, in which case the patch still allows for manual
transaction management even in a web request, ie. you can still
directly commit and abort the transaction(s) within a web request.

-kapil

Reply via email to