OT: Templating systems (was RE: [Catalyst] New default screen
for Catalyst)
Perrin Harkins
perrin at elem.com
Fri Oct 21 06:27:52 CEST 2005
John Siracusa wrote:
> Er, call me crazy, but I don't want my views doing selects either. As far
> as I'm concerned, the only think a template is allowed to do is rearrange
> the data I pass it and synthesize values based on that data. No selects, no
> db access at all. How do I enforce it? Er, code reviews, I guess :)
What, Rose::DB::Object doesn't do lazy-loading? :) I think that's the
sort of select that Bill was talking about.
We had a discussion about using callbacks vs. getting the data up front
on the TT list a while ago. The thread is here if anyone is interested:
http://template-toolkit.org/pipermail/templates/2002-April/003119.html
I'm not entirely decided about this. In theory I think it's probably
better to get the data up front, but passing Class::DBI objects to a TT
template is so easy that it's just about irresistible.
- Perrin
More information about the Catalyst
mailing list