Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Suggestions for current jQuery template solution?

I'm looking for a reliable jQuery templating engine.

I've been developing with jquery.tmpl.js, even though I knew it was abandoned. I've been able to achieve what I wanted with it but have some slight doubts about its cross-browser reliability.

For one thing, IE7 seems to be flagged up as a problem area, and I now don't want to go much further until I feel more confident that it can eventually be incorporated into a production solution.

There's healthy discussion on this StackOverflow question about templating, though sadly this is now out-dated.

The github repository for jquery.tmpl.js says that it's been moved to jQueryUI, but the jQueryUI site makes no mention of templating.

So does anyone have any good experience with templating in jQuery and/or can point me towards a reliable solution?

like image 657
awj Avatar asked Nov 01 '11 21:11

awj


2 Answers

JsRender is the replacement for jQuery Templates. jQuery Templates are no longer in development ... both jQuery and Boris Moore (driving force behind them) moved on to JsRender.

However, you can use jQuery templates because as of today, they are more stable than JsRender is. JsRender and JsViews is quickly coming and together they will do what jQuery templates does now. JsRender is has some advantages already over jQuery templates especially in terms of performance (its string based rendering engine does that).

You can find several examples by Boris Moore here: http://borismoore.github.com/jsrender/demos/step-by-step/index.html

like image 152
John Papa Avatar answered Nov 15 '22 18:11

John Papa


Use JsRender - http://borismoore.github.com/jsrender/demos/step-by-step/index.html

like image 35
Jamie R Rytlewski Avatar answered Nov 15 '22 17:11

Jamie R Rytlewski