in reply to HTML::Seamstress - the Outsider
in thread RFC - Template::Empty
Both pipeline and callback are pull-style. XMLC and Seamstress are push-style.
"Pipeline" in my essay means that the code is in charge of control flow rather than the template. In a callback style, decisions about what do next are in the template. Seamstress is pipeline.
The issue I referred to with code being tied to presentation in a DOM approach is that you have to know the structure of the DOM. For example, filling in a variable in a specific paragraph or table requires you to say exactly which paragraph or table cell to fill. You have to write code like this:
$node->children()->[0]->text( $flavor_name );
If you use ID or CLASS attributes on the HTML tags instead, you can move them around without changing your DOM calls. I don't think we disagree, since your examples all use ID or CLASS attributes, not DOM location. You probably just have a different name for what I call DOM manipulation, like maybe XPATH.
HTML_Tree is not like Seamstress or XMLC. HTML_Tree is like Petal.
I don't see how. Petal embeds a programming language in XML files. HTML_Tree and Seamstress and XMLC all use ID and CLASS attributes to specify parts of an HTML file to replace or modify without embedding loops or conditionals in the template itself. (HTML_Tree can use XPATH-like code if you choose to, and I suspect the others can too, but that would be a bad idea for most situations.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
HTML::Seamstress - a push-style templating system
by metaperl (Curate) on Feb 26, 2008 at 17:17 UTC |