Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Push style templating systems

by metaperl (Curate)
on Mar 17, 2008 at 14:27 UTC ( [id://674568]=note: print w/replies, xml ) Need Help??


in reply to Re: Push style templating systems
in thread Push style templating systems

"Push" seems like a poor name for this.
Well, what name do you think is best?
I also wouldn't lump HTML::Seamstress and XMLC in with Template::Recall and StringTemplate. As you know, the former use an approach based on the HTML/XML document structure, while Template::Recall and CGI::FastTemplate do a much simpler regex-like substitutions.
If you focus on _how_ they do their job, they are different. If you focus on the fact that they achieve what Terence Parr defined throughout his article, then Template::Recall and HTML::Seamstress are very similar.

And again, with both Recall and Seamstress, you must adhere to a certain discipline while with TT and others you can adhere if you please, but dont have to.

Replies are listed 'Best First'.
Re^3: Push style templating systems
by Rhandom (Curate) on Mar 17, 2008 at 15:02 UTC

    For me, if somebody really wants to make the artificial distinction between push and pipeline that is fine. The template world is so small and I have spent too much time quibbling about this topic in the past. I think the following two concepts frame the debate in more of the light of what it actually is about:

    Mini-language vs Variable-swapping-only - This is probably what the debate is about. Where really does the display formatting logic belong? Does it belong in the template with the rest of the display information, or does display formatting logic belong outside of the template. Without a mini-language you have to "push" the display formatting from the perl code. With a mini-language the template can "pull" data it needs.

    My chosen template system is better than that "other" template system - It is so easy to be religious about things that are trivial and insignificant, so we let ourselves be. We focus so much on an arbitrary core set of ideas, and we go so far as to treat them as absolutes, that we fail to see the merits of just about anything else. Perhaps we need a name for this system - something such as developer religio-mytopia.

    I apologize that this appears here in your node. I just find my self participating in a many lists (perl and non-perl) lately where developers argue a point as if the entire world's outcome was based upon it (only slight hyperbole here). The world of Perl Templating or even General Templating is so small but we treat it like it is the end-all-be-all. Please use what is best for you. Evangelize it even. But artificial distinctions and false absolutes don't help clear things up.

    This thread didn't start with the explicit intent of pushing Push over Pipeline, but it seems to have the implied intent, and subsequent replies have only strengthened this argument.

    Still ++ for listing the systems that fall into this particular genre.

    my @a=qw(random brilliant braindead); print $a[rand(@a)];

      Well, I for one have never felt that one system necessarily beats out another. I realize, too, that the tone of the "Reverse Callback Templating" article may come off as indicating this, but that wasn't really my intent. I adopted that sort of "selling" -- yikes, shopping network -- tone, specifically because I do want to advocate the module, and point out those features that may appeal to developers.

      However, I think it's important to point out the differences of template system behavior, simply because it helps you make a better choice.

      A blog among millions.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (1)
As of 2024-04-19 00:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found