http://www.perlmonks.org?node_id=139954


in reply to (Ovid) Re: Re: Refactor method calls or not?
in thread Refactor method calls or not?

I've had the same thoughts about this. However, to make database commits you have to know the big picture, and your data access objects don't.

One approach would be to make a set of "action" objects that are allowed to manage transactions and call the data objects, but have no web-specific code in them. This would be similar to what the Java folks call a "session facade". In Java this is done because EJB performance sucks rocks, but in this case it would simply be an organizational tool.

  • Comment on Re: (Ovid) Re: Re: Refactor method calls or not?