Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
You still miss the bigger picture, it's not about making the generation of HTML from Perl code easier or abstract - it's about moving the HTML out of the Perl code. Trust me, this is a good thing. Also, understand that I didn't get it at first either - the whole 'seperation of presentation from logic' seemed like a complete waste of time. Remember, my first job out of school was developing in Cold Fusion. I literally had to take over the job of the UI designer, because they were too afraid to touch the site once all of their HTML had been moved into the Cold Fusion code. (you have read my tut on HTML::Template, right? ;))

I have heard you mention in the CB, why use a templating system when CSS is available. Because CSS isn't powerful enough, it only defines markup. Templating systems allow you to package up all dynamic content for a page in a convenient (well, convenient for a Perl programmer) data structure and apply it to HTML. Very similar to CSS, but instead it offers the power to control large chunks of presentation - only display this for users logged in, only display that for anonymous users. How do you think this site does what it does? ;)

You mentioned HTML::Template wouldn't be powerful enough for you most of the time. I can't agree with that, but i can agree that a templating system might be 'over-kill' most of the time. If you are working with a team of developers and a team of UI designers, then you will see the power of templating systems.

I am not saying that you should rush out and port all of your existing sites to a templating system, i am just saying please don't knock it till you have fully experienced it.


(the triplet paradiddle)

In reply to (jeffa) 3Re: Code Critique by jeffa
in thread Code Critique by JBUK

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 lurking in the Monastery: (3)
    As of 2020-08-13 02:27 GMT
    Find Nodes?
      Voting Booth?
      Which rocket would you take to Mars?

      Results (69 votes). Check out past polls.