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.
jeffa
L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
F--F--F--F--F--F--F--F--
(the triplet paradiddle)
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.