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


in reply to Re: How to organize Catalyst stash
in thread How to organize Catalyst stash

In actual practice, as we all know, sometimes you do have to give-way on this design point.   Sometimes, the cleanest way to do something is to have the object produce presentation-ready information about itself.   (If it can do so using templates, so much the better.)

What I was specifically cautioning against, is the idea of “involving a third-party.”   The problem being, not only that this third-party is wholly dependent upon both of its customers, but also that it is quite easily overlooked.

I would also say, en passant, that sometimes I have seen exactly this kind of messy dependency ... showing up in ... the templates!   “Templates are ‘code,’ too.”

There are guidelines here, and rules of thumb, but no rules.   It would be delightful if there were, but these considerations always go very deeply into “the guts of” the application design.   (And, I do intend to have made these comments in accompaniment to, not “in rebuttal to,” yours.   I understand and agree with your points.)