Friday, August 20, 2010

Few template engines in Javascript to render from json to html

Fetching JSON object through ajax call, and render it to HTML is pain, we have to prepare html as a string by parsing json object and will have to assign the string to html element.

To simplify this , We can use the following JavaScript templating engines to make life easier!!

Few examples of JTemplates:


  1. http://dotmac.rationalmind.net/2010/05/rotating-content-with-jquery-jtemplates-ajax/

  2. http://encosia.com/2008/06/26/use-jquery-and-aspnet-ajax-to-build-a-client-side-repeater/

  3. http://johnnycoder.com/blog/2008/12/18/jtemplates-with-jquery-ajax-and-json/

  4. http://www.codedigest.com/Articles/jQuery/225_Creating_a_Simple_AJAX_Master-Details_View_Using_jQuery_JSON_and_jTemplates_in_ASPNet.aspx  
Among these three, I prefer JTemplate template engine. Practically using it now and found it's good and cool.

    6 comments:

    1. Sample examples of jTemplates:

      http://dotmac.rationalmind.net/2010/05/rotating-content-with-jquery-jtemplates-ajax/

      http://encosia.com/2008/06/26/use-jquery-and-aspnet-ajax-to-build-a-client-side-repeater/

      http://johnnycoder.com/blog/2008/12/18/jtemplates-with-jquery-ajax-and-json/

      http://www.codedigest.com/Articles/jQuery/225_Creating_a_Simple_AJAX_Master-Details_View_Using_jQuery_JSON_and_jTemplates_in_ASPNet.aspx

      ReplyDelete
    2. nice blog buddy, good to see friends starting blogs and sharing their experiences :) All the best with your blog.

      -Pravin Ady.

      ReplyDelete
    3. Thank you praveen. Any other suggestions??

      ReplyDelete
    4. One suggestion for now is change that heading from 'Let me try it out' to something else.

      -Pravin Ady.

      ReplyDelete
    5. Among these three, I prefer JTemplate template engine. I am using it practically and found it's good and cool.

      ReplyDelete
    6. See the following article is introducing new template called "Closure Templates" which is good in terms of performance.
      http://mostafaeweda.blogspot.com/

      ReplyDelete