2010年11月7日星期日

[fw-db] Re: Nasted transactions

I already done that.

But i don't think controller should be the place where db transactions are
handled. Maybe there should be 2 layers in modeling, Db_Table_* classes, and
on top of them layer of models above, where transactions can be tracked. But
again, there can be controllers which combines multiple models methods and
there we are in trap again. Making plugin to start transaction on
preDisplatch and commits on postDispatch is not good idea :)

Regards,
Saša Stamenković


On Sat, Nov 6, 2010 at 9:39 PM, Wil Moore III [via Zend Framework Community]
<ml-node+3030338-125745325-105879@n4.nabble.com<ml-node%2B3030338-125745325-105879@n4.nabble.com>
> wrote:

> As suggested by Bill, a service layer is what you want; however, for
> testability, I would recommend that you factor this out of the controller
> and into a service object. Of course, you can start with the functionality
> in the controller then slowly move toward a service object.
> --
> Wil Moore III
>
> Why is Bottom-posting better than Top-posting:
> http://www.caliburn.nl/topposting.html
>
>
> ------------------------------
> View message @
> http://zend-framework-community.634137.n4.nabble.com/Nasted-transactions-tp3028213p3030338.html
> To unsubscribe from Nasted transactions, click here<http://zend-framework-community.634137.n4.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_code&node=3028213&code=dW1waXJza3lAZ21haWwuY29tfDMwMjgyMTN8MTU2NDkwODkwNw==>.
>
>
>

没有评论: