Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: The history of a templating engine

by graff (Chancellor)
on Sep 12, 2006 at 02:14 UTC ( #572439=note: print w/ replies, xml ) Need Help??


in reply to The history of a templating engine

Wow, that turned out to be a very engaging read -- thanks.

I think my strongest reaction involved this point, and all the places you went as you pursued it:

A template is just a program, but you quote the code, not the output.

Well, not exactly. Based on the established wisdom of separating data/content from code, a template is a way of representing the content in a manner that is compatible with, yet still separable from, the code. A lot of stuff is needed in the code that really just does not belong in the template, just as there's a lot of stuff in a template that does not belong in code.

Your various gyrations in templating syntax, to support a dizzying assortment of coding constructs within the template data, all end up (from the sound of it) as an elaborate way to obfuscate the displayable content of the template files. But if it cooks for you, hey, who am I to knock it? ("++" in any case)

I realize you've only given a very cursory description of some of the details, but I had to wonder what the documentation must be like for such a system, and how long it would take someone besides you to grok it.


Comment on Re: The history of a templating engine
Re^2: The history of a templating engine
by ysth (Canon) on Sep 12, 2006 at 04:38 UTC
    I had to wonder what the documentation must be like for such a system
    Isn't this Basset::Template?
Re^2: The history of a templating engine
by jimt (Chaplain) on Sep 12, 2006 at 11:21 UTC

    I'll agree with your statements about separation of display from other things and stuff being in templates not in controllers and vice versa. I simply meant that conceptually, reversing the quotes is an easy way to make it work.

    And yes, as another reply commented, this is about Basset::Template, which is pretty extensively documented (I think), and actually a pretty simple system, despite all the gyrations I've rattled off here. So it should be easy for other people to pick up, if you were curious and wanted to look at the docs. But, again, the only one using it is me, so I don't know how easy it is to understand in the real world.

    It's the old line about how in theory, things are the same in theory and in practice, in practice they aren't.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (13)
As of 2014-07-22 12:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (112 votes), past polls