Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re^3: The hidden charm of Template::Toolkit (and templates generally)

by exussum0 (Vicar)
on Jan 07, 2008 at 12:47 UTC ( #660815=note: print w/ replies, xml ) Need Help??

in reply to Re^2: The hidden charm of Template::Toolkit (and templates generally)
in thread The hidden charm of Template::Toolkit (and templates generally)

What do you mean by 'scaling'? A template doesn't save you from "entities affecting each other". You have a single document only in the case of trivial pages with sparse dynamic content. If you have e.g. inclusions (of other templates), reading gets equally difficult, an you have to go back to look where each bit comes from.
By scaling I mean, you start out w/ HTML (or text) and you add logic to it. Some pages will be horridly complex and things start to get messy, sure, as we go off to infinity. Point is, you start off w/ a document and start to add the logic. If there's very little, the template looks pretty much like what you started w/. Doing it as code, it starts out as something highly unreadable, and it takes diligence to make it not look like a mess.

And yes, I can include to death, but I shouldn't be using goto, i mean spaghetti code, I mean includes except as a matter of large scale convenience.

In the end, I could throw it all away and say it really doesn't matter. It's all turing complete and equivalent. You can create the same mess in any fashion. It's the starting point and the usability of the tech that a) promotes a certain type of usage and b) gives you a good starting point. For template languages it's, start off w/ large documents and then make them dynamic. It's not, take something dynamic and make it output HTML.

Same holds true for other things. SQL is equivalent by using hashsets and mutex locks to mimic the behaviour, but hell, I'll make people cry doing that. I can probably do business logic in PL/SQL or TransactSQL, but that's not very nice either.

As for tokens meaning something, I hope you are using variables in templates that mean something. I hope there's documentation, be it wireframe or graphical mockups. :)

Comment on Re^3: The hidden charm of Template::Toolkit (and templates generally)

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (10)
As of 2014-08-01 11:37 GMT
Find Nodes?
    Voting Booth?

    Who would be the most fun to work for?

    Results (8 votes), past polls