
|
Apache::HTML::ClassParser There are three pre-existing techniques for generating dynamic-content web pages: CGI, nonstandard HTML extensions (such as Meta-HTML), or embedded programming languages (such as PHP and ePerl). All these techniques are problematic in that they make the HTML markup tightly-coupled with the code that fills in the dynamic content. They force programmers either to be web page designers (a job they may not have the talent, tools, time, or inclination to do) or to take the HTML files generated by web page designers and hand-edit them to insert either print statements, non-standard HTML elements, or embedded language statements. (This latter consequence is tedious, error-prone, and takes too long. Furthermore, if the layout of the web page later changes, the entire hand-edit process must be repeated.) HTML Tree, when combined with the Apache::HTML::ClassParser Apache mod_perl module, decouples the HTML markup from the code what fills in the dynamic content by using standard HTML files: no print-statement-laden CGI scripts, no nonstandard HTML extensions, and no embedded statements from some programming langauge. Code is cleanly separated into a separate file. It does this by using the CLASS attributes HTML elements and associates them with functions via a class map that is just a Perl hash. The Apache API documentation gives a complete example. |