Compiled JavaScript Templating

It actually isn’t often useful since it is usually better to generate content on the server side.

Compiled JavaScript Templating

Using a find-and-replace template system is often very useful. In Prototype JS, there is a built in class called Template. But for larger html blocks that need basic template logic and formatting functions, compiling the template is fast and robust.

I’ve got my old version of CompiledTemplate online in a Pastie. It’s got the source and a simple example. I need to finish my new version and do some benchmarking.

It actually isn’t often useful since it is usually better to generate content on the server side.