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.)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||