Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
All "push" style has done is moved the "pull" into your perl layer.
Au contraire. It has guaranteed well-formed HTML. As well as the other benefits mentioned in the Seamstress docs.
Seamstress requires too much knowledge about the template.
You created the proving grounds. I met the challenge. Please point to the part of the code with "too much knowledge about the template".
TT is closest to give true separation because you can give it unblessed, raw, unformatted data.
Yes, but you give TT "blessed, cooked, formatted" HTML? You go into the HTML and put various things there. You rip apart the HTML into files.
Anything that is not passed as unblessed, raw unformatted data has violated the separation - but that doesn't make it bad - it just makes it not academic.
If the definition of the model were raw, unformatted data, yes. But it is not:
Model: The domain-specific representation of the information on which the application operates. Domain logic adds meaning to raw data (e.g., calculating if today is the user's birthday, or the totals, taxes, and shipping charges for shopping cart items).
In other words, the raw data is adopted into the model on domain-specific terms. This adoption in my case involved blessing the object into a class which would handle all operations for this domain-specific interpretation of raw data.

Note that Catalyst also backs me up. It has very high-level Model and View classes that dispatch to your Model and View classes which then manipulate the raw and unprocessed data.

I have beheld the tarball of 22.1 on with my own eyes. How can you say that there is no God in the Church of Emacs? -- David Kastrup
Enforce strict model-view separation in template engines via HTML::Seamstress The car is in the cdr, not the cdr in the car

In reply to Model-View-Controller is natural with HTML::Seamstress by metaperl
in thread RFC - Template::Empty by redhotpenguin

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others exploiting the Monastery: (7)
    As of 2018-04-19 20:18 GMT
    Find Nodes?
      Voting Booth?