Thursday, March 05, 2009

PURE - JavaScript Template Engine

In search for a templating solution for maintenance of a static-HTML-based web site, I came across PURE. It is a rendering engine written in JavaScript, which reads JSON objects and then renders the HTML.

Basically, any HTML can be used as a template. Class names and object IDs are used as template keys. Then, they can be manipulated as preferred and rendered into another HTML output. This, then, can be used as a new template and so on. Worth having a look.

I still don't know how to utilize it in the real world but it is a nice chewing gum for the brain. :)

PURE - JavaScript Template Engine


Yves Hiernaux said...

Hi Alen,

It's Yves from BeeBole. In real life, we use it to build our web application BeeBole. First, the idea was to render JSON as fast as possible on the GUI side, secondly the idea was also to keep the HTML untouched.

It means a lot of time gained when developing since the HTML is always reusable and without the usual backend calls code which makes it uneasy to reuse.

You can see another example here:

Just click on the button and you will see the feed being rendered thanks to PURE.

-=|MisterY|=- said...

Hi Yves,

Thanks a lot for the comment. I will try a small test, rendering a common menu, when I find some time these days. For now, I have the link on the blog so I can come back to it at a later time.
The idea behind PURE certainly looks interesting and fits with what I'm trying to do, maintaining static-HTML web sites.
Best regards