FYI, Text::Template is embedded Perl. HTML::Template is (intentionally) not capable of embedding Perl.

I've talked about this a bit with Rob Nagler (of Bivio) on the mod_perl list. I really don't agree that the quoted line from the JSP page constitutes business logic. It's a user interface. I also don't think there's any shame in taking the user interface as a starting point to determine the model. The UI is really important, and a UI design often ends up capturing important functionality issues that were not obvious in the abstract.

What Bivio has done is create a presentation abtraction layer. They provide some data with loose instructions on how it should be displayed, and their presentation system turns that into HTML. It puts the "HTML brain" inside of some Perl code that knows how to take instructions like "Grid" and "pad => 0" and turn them into HTML.

This is not a practical solution for the majority of web projects. The design is typically not done by the programmers, and needs to be changeable by people who are not programmers. The Bivio approach doesn't accomplish these goals. I think that one reason it worked so well for them is that they are doing sites that are not very graphically rich. Take a look at http://bivio.com, the investment site they did. It's heavy on functionality, and has a very simple design.

You might be a curmudgeon like me, who wishes more sites looked like Yahoo and worked on Lynx, but being a developer for modern on-line businesses means finding ways to accomodate sites with fairly heavy graphic design elements. Tools like templating modules have done this pretty well, and will probably fit more people's needs than an abstract layout system that generates HTML.


In reply to Re: the trend of the presentation layer driving application logic by perrin
in thread the trend of the presentation layer driving application logic by princepawn

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.