Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
It's neigh impossible to separate perl and HTML completely cleanly, where the HTML designer never has to consider what is coming from perl, nor the perl programmer has to consider what he needs to provide to the designer. At some point, you have to make a concession in the HTML template that you have something coming from perl.

Now, from what I've seen, most template solutions, just like with JSP pages or the like, try to hide what's from perl in HTML comments, such that the designer can build the page without problems. There's got to be an initial session where the perl programmer and the HTML design sit down, and lay out what will go in those comments, but then they can go in their own direction, meeting again when necessary.

I read the Java literature as well, and while there's article after article on JSP and servlets and the like, each one echoes the laments you've given already; you cannot cleanly separate these. Every once in a while someone proposes yet another solution that tries to separate them, but at SOME point there's got to be a comingling of the code.

Maybe what the problem is is not that the templating tools are a problem, but that the way that large groups are designing sites are at fault. You mention that you worry that your HTML wranglers will come in at night, and wreck your template, or changes you make during the day will wreck the hard work the HTML guys have done. Maybe what is needed to have the HTML people and the perl programmers spend more time with each other during the development of pages. Maybe the HTML programmers NEED to understand that some engine is providing the data to them and how that works, and the perl programmers have to provide an API or some 'fixed' expectations of what they will be delivering to the programmers. This way, nearly any template solution will work as long as the envirnoment is working right.

As to your suggestion on an XML template solution, I point out that Template Toolkit 2 is language neutral; while the templating code doesn't merge well with HTML, it can be used to generate any text output, including XML (I believe, even, there's an XML plugin for TT2). <2>

Dr. Michael K. Neylon - || "You've left the lens cap of your mind on again, Pinky" - The Brain
"I can see my house from here!"
It's not what you know, but knowing how to find it if you don't know that's important

In reply to Re: rant on = qw(HTML::Mason Embperl Template etc) ; by Masem
in thread rant on = qw(HTML::Mason Embperl Template etc) ; by princepawn

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 the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others pondering the Monastery: (4)
    As of 2019-12-14 15:22 GMT
    Find Nodes?
      Voting Booth?

      No recent polls found