Thursday, January 31, 2008

Cheetah - The Python-Powered Template Engine

http://cheetahtemplate.org/index.html

When we are doing web application development, one of the most tedious thing for developers is to modify the page layout to reach users' satisfaction. This kind of modification is most likely time-consuming and error prompt. A minor change in the HTML code requires time for communication with users (or designers), actually programming task, testing, and sometimes recompilation and deployment. Even though you seem to be able to make the change to match with users' expectation, sometimes, the change may introduce another bug and raise extra effort.

It would be good to have the web application layout totally managed by users (or designers), which programmers can concentrate on developing the back-end logic. Therefore, the community comes up with a solution by making use of template engine. The basic idea is that the template engine provide help to generate HTML code with templates, and leaving business logic separated from the display logic.

Since the two logics are separated, users and programmers can now work at the same time on different aspect of the system. This would lower the communication overhead and error rate as each party is now assign with their most familiar area of work. Besides, since templates can be saved in files, instead of compiled in code, the deployment would be much more easier.

The above link is a template engine written in Python, which maybe useful for our course project. If you are interested, you may also search for template engine in other languages, e.g. PHP, .Net, Java, and etc.

No comments: