当前位置: 首页 > 工具软件 > htmltmpl > 使用案例 >

tmpl html编码,htmltmpl templating engine

高钱青
2023-12-01

Current versions:

htmltmpl for Python

easydoc for Python

1.22

15 Dec 2001

htmltmpl for PHP

1.22

4 Jun 2004

htmltmpl for PHP - compiled

2.00

20 Feb 2007

The purpose of the templating engine is to provide web

application developers,

who need to separate the program code and the design (HTML code) of their

web application projects, with a templating tool that can

easily be used by cooperating webdesigners with no programming skills.

Templating language provided by the engine is inspired by the Perl

templating module HTML::Template.

Templates created for HTML::Template can be used with this engine.

The engine is currently available for Python and PHP.

The Python package includes easydoc, a module

that uses the templating engine to generate HTML documentation

from docstrings embedded in source files of Python modules.

The primary goal of the templating engine is to keep things simple

for a webdesigner who creates the templates. Therefore, neither

Python nor PHP code can be used in the templates.

Instead, the templating

engine provides its own simple templating language that supports

basic programming operations - loops, conditionals

and substitution of variables. These operations are controlled

from within the templates by statements that look like HTML tags

and integrate nicely with regular HTML code.

The secondary goal is good performance. High speed template

processing is a neccessity if the engine is to be used in web

applications.

I am aware that other templating solutions for Python and PHP

exist.

But none of them is similar to HTML::Template. I am fond of its

enforcement of strict separation of the code and HTML and also of

the style and syntax of its templating language.

I find it much more cleaner and more maintainable than

other solutions. Also, I need to convert some projects from

Perl to Python and PHP and I would like to reuse my old HTML::Template

templates. That's why I created the templating engine in the first place.

The engine also has an integrated support for gettext. It

makes it convenient for development of multilingual

"skinnable" web applications.

 类似资料: