Free HTML Template Engine

If you're tired of recompiling your CGI program every time somebody wants to change the HTML, you need to check out templates. Libtemplate is an easy to use C interface that will let you use the same sort of templates used in Lazarus applications.

Using templates in PHP and C++ has spoiled me. So when I started developing applications in C, I went hunting for a templating library that I could use again. I didn't find it, so after developing in a mixture of C for my lowlevel routines and C++ for my interface, I finally broke down and wrote a templating engine in C.

This software is free to use on any web site, commercial or otherwise. You can purchase a technical support contract if you find yourself in need.

Please download the files from the archives below.


AttachmentSize
libtemplate-1.5.tar.gz18.27 KB
libtemplate-1.5.zip36.42 KB
templatizer-c++.tar.gz1.84 KB
templatizer-php.tar.gz1.59 KB
template-engine.pdf18.15 KB

How does you solution compares to

I was doing some research looking for a open-source template engine for C/C++ and I've found your site.

I would like to know how does your project compare to more public projects like: http://teng.sourceforge.net and http://www.clearsilver.net/

I wrote a little about them on my page, take a look, and please notify me about this maybe I'll include yours too.


Comparison

libtemplate is much simpler than either teng or clearsilver. Both of those are implemented as fairly sophisticated engines which provide their own framework for web applications. Teng, for instance, allows embedding display logic into templates.

libtemplate has a very simple and direct focus. It's sole purpose is to replace named element tags with values from the program. Because the result of a Parse operation is another named element, very flexible output can still be achieved without embedding text or html in the program.

I chose this option so that the templates would be extremely simple. With a minimal amount of training anyone capable of writing HTML can write a template. If more complex logic is needed in the output than what static HTML can handle, the programmer will implement it in C (or whatever language they're using). Making the templates more complex seemed like reinventing the wheel to me.

--
Clay Dowling
President
Lazarus Internet Development