On Fri, 28 Jan 2000, Paul J. Lucas wrote:
> > but it seems like it does tie your program closely to the structure of the
> > documents.
> 
>       It does somewhat, but much less so than existing techniques:
> 
>       1. Conventional CGI (a print-statement-laden Perl script): this
>          tightly intertwines code and markup.
> 
>       2. Embedded Perl (e.g., ePerl): variables are placed at
>          specific points in the markup.
> 
>       3. Non-standard tags: placed at specific points in the markup.
>          (Another downside: DreamWeaver doesn't understand them.)

Now that I've seen your example, it seems to me that you are doing almost
exactly the same as #3.  The only difference is that you're using HTML
extensions ("CLASS=foo") that are legal in authoring tools.  Otherwise,
this is really the same effect as using HTML::Template or Template
Toolkit. 

> > Am I correct in thinking that if you want to put a piece of text pulled from
> > a database into a page you have to know exactly where it should end up in the
> > HTML parse tree?
> 
>       Yes; but you control where that is by editing the HTML file.
>       And you can reedit it and move it around again and again; and
>       you never have to touch the underlying Perl code.  See above.

This is different from XMLC, which requires the program using it to
specify which node to replace the contents of.  I think your approach is
better.

- Perrin

Reply via email to