[Catalyst] Catalyst::Model::CDBI

Andreas Marienborg omega at palle.net
Thu Oct 6 16:39:51 CEST 2005

On 6. okt. 2005, at 16.13, Jesper Krogh wrote:

> Hi everyone.
Hello :)

> Another question:
> Allmost everyone seems to talk about Template::Toolkit and not about
> Mason. When I'm not familiar with either of them, is the one more
> preferrable to use than the other?

I was an avid mason-fan for several years, but I started using TT  
when moving to catalyst for personal projects (Mason is still all the  
way at work, almost).

I must say I favour TT in several ways, and then again mason in  
others. Recent developments in Catalyst have made the points for  
mason even more neglicable(miss-spelled, I'm sure..).

The first selling point for TT for me, is the transparent handeling  
of hashes, arrays and objects. It does not distinguish between hashes  
and objects (in particular, this is handy), and as such it is very  
easy to "quickly" create a hash, and write the template, and then  
later replace that hash with an object. Another sellingpoint for me,  
has been the fact that there is no perl in the templates. None at all.

The sellingpoints of mason has much to do with implicit template  
inheritance, which is "harder" to achieve in an as flexible way with  
TT/Catalyst. (I have never used mason with catalyst, so that part I  
cannot comment extensivly on). What I'm talking about is of course  
autohandlers, which you place in a directory, and then "wraps" each  
template below it automaticly, without the need to do anything. In TT/ 
Cat this is achivable by using WRAPPER or POST/PRE_PROCESS, but not  
to the same flexibility, and not with the same powers of overriding  
within a template (to my knowledge atleast). The most profound of  
theese needs have been removed with the addidion of auto-actions in  
catalyst of course.

the lack I see in both is the syntax, which I belive petal and it's  
ancestors have a better approach, making it part of the xhtml- 
structure, and as such making dummies etc much easier to create, and  
also to use existing tools. Had I chosen again, and hat petal been  
more "complete", I might have chosen petal, but for now I'm sticking  
with TT.

hope that helps atleast a little to clear up why I chose the way I  

good luck with your choice :)


More information about the Catalyst mailing list