JavaScript Template Engine For HTML: Pure
6
Aug
Pure is an unobtrusive JavaScript template engine for HTML.
It aims to make HTML dynamic as templates can be created with only JavaScript, HTML & CSS.
Pure is fast & runs on the browser/client side. It currently supports JSON (XML to be supported soon).
This JavaScript template engine can be used as a jQuery plugin (soon Dojo, DOMAssistant, MooTools, Prototype).
Pure provides a detailed "getting started" information supported with helpful examples.
Requirements: jQuery
Compatibility: All Major Browsers
Website: http://beebole.com/pure/
Demo: http://beebole.com/pure/examples/docs/example1.html
Compatibility: All Major Browsers
Website: http://beebole.com/pure/
Demo: http://beebole.com/pure/examples/docs/example1.html
- Tags:
Javascript jQuery
- Filed under: Extras, MIT License, Tools
- 11 Comments























11 Responses for "JavaScript Template Engine For HTML: Pure"
Thank you for posting about PURE.
I hope you will like it.
If you have any question about it, looking at the examples or trying it, just visit our Google Group :
http://groups.google.com/group/Pure-Unobtrusive-Rendering-Engine
Umm… I’m confused. Isn’t it the same thing that jQuery does? Just with different function calls that you have to install in addition to jQuery?
I guess the samples I saw just didn’t stand out to me like “Oh! I need this!”
This is great. However, keep in mind this is not very search engine friendly.
@ John
It is different. jQuery is a JavaScript framework while we handle the rendering of JSON (and soon XML) in HTML using only JavaScript (and jQuery) and HTML/CSS.
The big change is that the developer will not change the HTML created by the designer anymore.
Usually, once the designer has done the HTML work, the developer adds JavaScript, template tags, … in this one.
With PURE, the HTML remains untouched and the rendering part is handled in JavaScript. In fact any portion of the HTML can become a template without being changed.
Using the display:none on the div, you can even reuse it several times through the page.
It means that at any time the designer can make changes to the HTML, even if the developer is still busy with the code. Even after the go-live of the project, the HTML (being still pure HTML), can easily be changed by the designer without the usual hassles.
@ Chad
Indeed, as the rendering is done on the client side, it isn’t a good thing for SEO. We created PURE in the development phase of a web business app for which the SEO is not relevant.
However, you can always use Rhino or Spidermonkey to have the JS on the server.
We still think the logic behind PURE is good and we will soon translate it to our Erlang back-end (as we use Erlang). But you could imagine this to be translated in any other language, Python, …
@ Yves
I guess where I’m getting at is, from my understanding, you can use selectors and the html function in jQuery to replace selected html tags, without touching the html.
I’m really interested in your library, not just trying to shoot it down, I guess I’m trying to see where it enhances the jQuery library that is already in place to change html and parse strings.
@ John
A few people started using it already since we released the code 3 days ago.
They are discussing it on the Google Group.
For example, Audun posted this example: http://bytetastic.com/pillow/
Most important, look how clean the HTML is. This is the new thing.
Good news for the server-side rendering believers and those who need SEO optimization.
Davey from Aptana just informed us that :
“PURE works unchanged out of the box with Jaxer running as serverside JS”
http://groups.google.com/group/Pure-Unobtrusive-Rendering-Engine/browse_thread/thread/e140a90c4420df18
[...] is not the first attempt to create a Javascript/HTML template engine, you can find some other solutions on the net which are in independent projects or as part of an Ajax framework. [...]
I have had a look at PURE and appreciate the fact that it attempts to be as unobtrusive as possible.
I have created a javascript repeater that is not quite as hands-off on the HTML but is designed to be easy to use without having to churn out too much javascript code.
It can be seen at: http://jsrepeater.devprog.com/
We have just released a new version of PURE :
http://beebole.com/blog/2008/09/18/major-release-for-our-javascript-template-engine/
Hi,
I was working on templating engine using same pattern of clean HTML from over a year. It’s already released and it can generate JavaScript source. JSON is also supported. One thing that (as for today) it’s not JavaScript based implementation of the engine, only in PHP. But the final template is JavaScript and that’s most important. It’s called QueryTemplates:
http://code.google.com/p/querytemplates/