开发者

John Resigs Micro Templating vs JQuery Templates or others?

开发者 https://www.devze.com 2023-03-31 23:18 出处:网络
I\'ve been using John resigs neat micro templating javascript on a开发者_StackOverflow project I\'m working on. The project pulls down a JSOn object and spits out a table with a bunch of input fields

I've been using John resigs neat micro templating javascript on a开发者_StackOverflow project I'm working on. The project pulls down a JSOn object and spits out a table with a bunch of input fields like so:

John Resigs Micro Templating vs JQuery Templates or others?

This works ok, however in IE it's slow and locks up the browser for a bit. Works great in Chrome though.

I've looked around the net, and have found a few articles on various templating engines, but they are all getting a bit old now, Jquery templates is a bit new, so I'm wondering, has anyone noticed any performance differences between those and resigs engine? Is it worth me swapping? Or should I give up on JS based templating and just generate server side..?


IE, especially the older versions, is slow. If you are noticing a delay then I guess you are dealing with hundreds of objects. I don't think it likely that there is a big enough performance difference between the various templating libraries to provide a solution. Having said that, jquery templates do allow you to compile your templates, which may help.

I don't know about the relative performance but underscore.js also has a simple templating feature if you don't need anything complicated.

0

精彩评论

暂无评论...
验证码 换一张
取 消