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.)


In reply to Re: HTML::Seamstress - the Outsider by perrin
in thread RFC - Template::Empty by redhotpenguin

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.