[Catalyst] Is Catalyst what I want?
Krzysztof Krzyżaniak
eloy at pawnhearts.eu.org
Fri Oct 27 17:19:07 GMT 2006
Jonathan Rockway <jon at jrock.us> writes:
>> TT. Mostly beacuse I have access to catalyst context here. I've tried to
>> use ClearSilver but it was too simple for me (almost every controller
>> needed additional 10-20 lines of code).
>
> Keep in mind that although ClearSilver isn't as syntactically
> expressive, it is *much* faster. There's a reason Google and Yahoo use
> ClearSilver and not TT.
>
> But, you don't need to add code to your controller to handle the
> formatting -- that should be in the view. This will give you more
> flexibility in the end. You can write maintainable, testable formatters
> in Perl as your View and let ClearSilver handle the tough bit of
> actually inserting strings into HTML.
I don't mean formatting, I mean that I cannot use in ClearSilver something
like that:
[% IF (c.user.obj.id == article.data.account_id) %]
or
<a href="[% c.uri_for('/article/') %][% article.data.id %]">
because I don't have access to context. I have to "map" all method I need
in stash.
> I like the convenience of TT myself, but I think ClearSilver + perl
> preprocessor is the Right Way To Do Things, if that matters :)
Maybe. But somehow I like to have more information than 'parse error' when
I prepare template :>
eloy
--
-------e-l-o-y----------------------------e-l-o-y- at -k-o-f-e-i-n-a-.-n-e-t------
jak to dobrze, że są oceany - bez nich byłoby jeszcze smutniej
More information about the Catalyst
mailing list