On 6/27/07, Jonathan LaCour <[EMAIL PROTECTED]> wrote: > Okay, I am mostly with you, but then you end up with a lot of > boilerplate elsewhere wherever you start a transaction and throw it > into the manager. I think we can address this in the TurboGears pylons > template somehow and automatically start a transaction and put it into > the manager on request by request basis, and provide some way to disable > it for read-only requests. > > There have also been discussions of allowing you to turn it off for > specific HTTP methods, so you would never have a transaction for GET > unless you created it yourself, but POST, DELETE, etc. would usually > have transactions. This feels a touch too magical to me, since the > whole point of the automatic transaction-per-request in TurboGears was > to make things easy by default, and not difficult to understand. > > I wouldn't have a problem if there were two separate pieces of > middleware though: one for rolling back active transactions on > exceptions, and another for setting up when you want those transactions > to be created automatically.
It sounds like Pylons and TurboGears have very different paradigms about how transactions are handled. Could somebody explain them side by side, showing how the controller method interacts with the middleware under various read-only, write-commit, write-rollback scenarios? Especially taking into account the various reasons one might want to roll back. As a starting point, i tried to explain the typical Pylons usage in my previous email. Then we can see whether SAContext or something else can meet all the needs. -- Mike Orr <[EMAIL PROTECTED]> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
