Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^4: Model-View-Controller: Template Toolkit vs. XSLT

by perrin (Chancellor)
on Oct 15, 2004 at 17:24 UTC ( [id://399584]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Model-View-Controller: Template Toolkit vs. XSLT
in thread Model-View-Controller: Template Toolkit vs. XSLT

Snails are still slow, even when you compare them to slugs.

I don't agree with this. Speed is relative, and snails are only slow if you have something else much faster to compare them to, like a jet engine. Embperl and Apache::ASP are arguably significantly faster, but not a lot faster. Raw print statements are a lot faster, but sacrifice most of the functionality that leads people to a templating system in the first place.

Regarding the code for handling tables in a template, this is what plugins are for: you write the tricky part in Perl, and the template author still gets to control things like how many columns there are. A good HTML coder should be able to deal with simple loops and conditionals. I used the table plugin and date plugin successfully for this kind of thing.

Of course you could also write a module for this and use it from Mason or Apache::ASP, but I find that people don't usually do that when it's so easy to put the perl code right in the template.

Not every HTML coder in the world can handle templating. I've had nothing but success with TT, but I can imagine some people just won't get it. The key things that I did that helped were to provide documentation of the data being passed in (as oppposed to handing them sample templates to pretty up) and to give them a simple template tester that allowed them to type in test data (in the format that the real app would send) and run it through a TT template. This let them experiment easily.

  • Comment on Re^4: Model-View-Controller: Template Toolkit vs. XSLT

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://399584]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-04-18 00:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found