You may or may not have heard of PURE, the JavaScript template engine. The good folks over at BeeBole have released PURE as an open source project under the MIT license.
In a nutshell, PURE is a lightweight library for rendering HTML. Observe (shamelessly borrowed from the PURE documentation):
1 2 3 |
function r() { $('#foo').autoRender({ "bar": "Hello, World!" }); } |
1 2 3 |
<div id="foo"> <span class="bar">What?</span> </div> |
This code, assuming someone called the r() function, would replace the text in the span tag with the ubiquitous “Hello, World!” statement. A pretty basic example, but it illustrates a pretty sweet concept: Let the client do all of the work and separate the various models: JSON, JavaScript and HTML. It does not separate the model-view as rigorously as, say, StringTemplate (and it would be nice to one day see something like StringTemplate for client-side JavaScript, but I digress), yet what it presents is clean, relatively beautiful code.
It binds with JQuery and prototype, at the moment. It appears that they’re also adding support for mootools and others, as well. It’s definitely something I’ll most likely be using in upcoming projects, and is certainly worth looking at it you spend any time developing rich, dynamic web apps.

Thank you Jason for posting about PURE.
Just don’t hesitate to pass by the discussion group to share what you will be doing.
Speak to you soon.