[Catalyst] Catalyst performance - controller vs TT

Brandon Black blblack at gmail.com
Wed Jan 11 17:22:02 CET 2006

On 1/11/06, Will Smith <willbelair at yahoo.com> wrote:
> Hi, I have a question about the performance of Cat app. For the same
> function, like retrieve_all , should I put it in the controller or on the
> template? Which one will be faster?
> Thanks

I don't think it would make much of a material difference to
performance wherever you place it.  More to the point is cleanliness
and correctness.  Code in Views/Templates should be strictly related
to formatting and display.  Code in a controller handles core logic,
and shouldn't know or do anything specific related to formatting and
display.  Code that interacts with data sources directly goes in the
Model.  Clean lines of seperation between the M<->C<->V components is

-- Brandon

More information about the Catalyst mailing list