HTML generation vs PSP vs Templating Engines

riplin at Azonic.co.nz riplin at Azonic.co.nz
Sun Nov 20 18:43:06 EST 2005


>> Using templates means that the code can work with different templates,
>> and this should be seamless, it also means that different code can be
>> used with the templates, for example if different languages are used.

> This seems to contradict your statement that you dislike 'embedding
> code or html in each other', since the scenarios you describe still
> involve embedding presentation logic in markup. (The only templating
> systems that *completely* separate logic from markup are the DOM-style
> ones.)

Perhaps that is why I implemented my own mechanisms for templating. My
templates contain no logic at all and can be used from my Python
programs, Cobol or C equally well.

Contrarywise, my Python programs choose at runtime the required
template (depending on configuration, user request or other) and then
the same program code will output HTML, XML, EDIFACT, CSV, printed
report or other dependant entirely on the content of the template file.




More information about the Python-list mailing list