Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Survey of Surveys on HTML Templating systems / Web Frameworks (Sorting out the Technology Soup)

UPDATE: I either missed Catalyst, or Catalyst wasn't out yet, when I first posted this. At this point in time, I am devoting most of my "web framework learning" energy to learning this framework. Run and check it out!

I need to choose an html templating system that plays well with Dreamweaver for the design aspects, and an open source db (mysql or postgres) for the back end.

Ideal would be a mock application (or open source real application) written with Mason or Embperl (my top choices) including a framework for managing the db, that's all ready to go, and I can just start tinkering with it to suit my purposes, rather than start something from scratch. But I wasn't able to find anything like that.

Anyway, after spending some time doing research mainly with perlmonks and google, I thought it would be helpful to others in my situation to present a survey of my findings. There is a LOT written about this, without a clear "winner" in the competing technology soup. (Though as stated above, I'm beginning to lean towards Mason/Embperl.)

UPDATE: There's a mason demo at Perl Apprenticeship Site. Unfortunately I don't think this is db enabled, but I could be wrong about that -- need to check into this more carefully. This is the "official" sample site described in the masonbook. More promisingly, there a number of mason powered apps at mastonhq.com. Bricolage uses postgres, I may be looking at that first.

A not very satisfying demo of embperl is at Talk on Apache, mod_perl, and embperl

Also, Metaperl (aka princepawn) was kind enough to provide me with a demo app of his Seamstress framework. There is no link to do this from his web page, but ask nicely and hopefully you will be in luck.

Metaperl also referred me to the "bivio" framework, which also has a demo "petshop" webshop, nicely tar.gzed. (See discussion below). However, in The Bivio Model and Algorithm for Authorization (slides available), Metaperl notes that even after intensive study bivio strained his powers of understanding... which I find kind of scary. So, I may choose to study bivio as an example of a really cool framework, but do my real work in Mason (or possibly Seamstress).


Overview

Of hisorical interest may be jonas liljegren's rant (undated, my guess is 1999 or before)
  • Back in the day, he was "Frustrated about all these template models!"
  • Of major modern templating systems, mentions only HTML::Template.
  • The more things change, the more they stay the same.

A more current major article on the topic is perrin's Choosing a templating system also at perl.com here. (Last major change Jun 5 2002, originally written Sep 21 2001. I gave both urls since the article appears to be updated occasionally, so maybe one is more current than the other.)

  • A long article that attempts to compare all major modern perl templating systems.
  • At the end it's findings are summarized as:

Application Framework
Pipeline or Callback
Parsing Method
Language
HTML::Mason Framework Callback Compiled Perl
Template Toolkit Just Templates Pipeline Compiled Mini-Language
Apache::ASP Framework Callback Compiled Perl and XSL
HTML::Embperl Framework Callback Compiled Perl
SSI Just Templates Callback Repeated Parse Mini-Language
AxKit Framework Pipeline Compiled or Cached Parse Tree Perl and XSL and Mini-Language(s)
HTML::Template Just Templates Pipeline Cached Parse Tree Mini-Language
Text::Template Just Templates Pipeline Compiled Perl

This led me to conclude I probably want to use either Mason or Embperl, as these are the two top contenders for frameworks.

Pertinent to perl newbies for getting started on web apps is How to calculate development time?. Newbie (at the time) Siddharta asks, and gets, advice for building a web application from scratch. This is mainly about estimating project time, but there is also a lot of advice on which framework to use. Good thread.

And, some Perlmonks threads that discuss the pros and cons of various templating systems without a clear consensus preference for a particular one.

What is the best tool to embed perl in HTML? (Q&A, August 2, 2000) / Best templating system? (Jun 30 2000)

  • Mason, Embperl, and Template are recommended by various monks.
  • It's stated that Embperl plays well with Dreamweaver
  • Refining the CGI process through structure and templates (Apr 16, 2001, Boo Radley)
    • Started by Boo Radley, attempting to roll his own Web/CGI framework
    • Recommended by princepawn on his home node.
    • Corion plugs HTML::FormValidator and others agree

    OO CGI Engine (Jan 2 2002)

    • Discussion of OpenInteract, CGI::Application, and HTML::Template, with positive things to say about all these.
    • dnmiller2k mentions that CGI::Application uses HTML::Template, but Swiftone counters that this is just for installation, and you can use it with Template-Toolkit if you want.
    Update: No demo for "open interact", at least none that I could find. But supposedly it's coming soon.

    Another perrin article that's worth a read is Building a Large-scale E-commerce Site with Apache and mod_perl, which recounts his adventures at now-defunct etoys.


    Princepawn/Metaperl/Merlyn Stuff


    Dreamweaver and Perl

    Jeffa wrote HTML::Template extensions for dreamweaver which enables you to "se HTML::Template tags in Dreamweaver just like they would any other object - by clicking on an icon which places the resulting HTML code in the document."

    But it's no longer being maintained.

    Two perlmonks threads about this.

    • Dreamweaver/Perl integration tools (Dec 8 2001)
      • User wants help integrating Dreamweaver Templates (a Dreamweaver feature not to be confused with perl templating) and perl (doesn't specify which perl web framework)
      • Adviced that Jeffa put together a tool that helps you manage perl from within Dreamweaver, using Dreamweaver's "Dreamweaver Template" feature
      • Tphyahoo (me) mentions MasonAndDreamweaver at the MasonHQ wiki. This seems to indicate that Mason and Dreamweaver play together okay.
    • HTML::Template and Dreamweaver MX (Nov 21 2003)
      • Newbie asks for help with Dreamweaver and HTML::Template (not specifying he wants help with Dreamweaver Templates)
      • Newbie is advised to have a look at Jeffa's tool for integration with Dreamweaver Templates (I think this advice was confused).
      • Jeffa states that he hasn't been maintaining this since 2001, and it's now out of date since there have been a lot of changes with Dreamweaver MX. "Dreamweaver is a "funky beast" says Jeffa.
      • Tphyahoo (me) mentions that Dreamweaver Templates are a special Dreamweaver feature, which aren't used on every project, and suggests Mason, linking back to the 2001 article.
    Also found CGI.pm - Dreamweaver or somesuch? (April 2001)
    • Newbie asks for help integrating perl and dreamweaver
    • Monks express general disdain for Dreamwever
    Conclusion: Dreamwever Templates and perl, maybe not such a good idea. However, Dreamwever and Mason, maybe not such a bad idea. Also What is the best tool to embed perl in HTML? stated that Embperl and Dreamweaver is ok.

    Descriptions/Tutorials on particular frameworks

    HTML::Mason module review (Feb 1 2001)
    • Overall positive review of this (at the time) new framework
    Perl.com article Using CGI Application (June 5 2001)

    I'm sure there's a lot more, so if I get comments I will try to update as appropriate.

    Other stuff

    proposal for HTML::FormValidator upgrade

    • likes html::formvalidator, but mentions some things that could be done better.
    • At end mentions that many of his concerns are addressed by data::formvalidator

    Edit by tye: Remove P tags inside TABLE


    In reply to Survey of Surveys on HTML Templating systems by tphyahoo

    Title:
    Use:  <p> text here (a paragraph) </p>
    and:  <code> code here </code>
    to format your post; it's "PerlMonks-approved HTML":



    • Are you posting in the right place? Check out Where do I post X? to know for sure.
    • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
      <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
    • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
    • Want more info? How to link or How to display code and escape characters are good places to start.
    Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Domain Nodelet?
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this?Last hourOther CB clients
    Other Users?
    Others chilling in the Monastery: (4)
    As of 2024-03-29 15:02 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found