<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" > <channel><title>Comments on: A Better JavaScript Template Engine</title> <atom:link href="http://javascriptly.com/2008/08/a-better-javascript-template-engine/feed/" rel="self" type="application/rss+xml" /><link>http://javascriptly.com/2008/08/a-better-javascript-template-engine/</link> <description>JavaScript Techniques, Tricks and News</description> <lastBuildDate>Sun, 31 Jan 2010 15:08:20 +0000</lastBuildDate> <generator>http://wordpress.org/?v=2.9.1</generator> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>By: Yves (BeeBole)</title><link>http://javascriptly.com/2008/08/a-better-javascript-template-engine/comment-page-1/#comment-39</link> <dc:creator>Yves (BeeBole)</dc:creator> <pubDate>Thu, 18 Sep 2008 13:15:08 +0000</pubDate> <guid isPermaLink="false">http://javascriptly.com/?p=28#comment-39</guid> <description>(Note: I posted this on JustTalkAboutWeb as I don&#039;t know which blog you will be maintaining)Hi Jimmy,We have just released a new version of PURE, including new features such as :Auto-rendering: a new PURE method takes your HTML and your JSON data and merges them automatically. The class attribute is used to map the HTML and the data.Recursive Template CallThe changes are quite important.We took back your example and changed it to fit with the new release.The code source can be seen below and as you will see, it is really easier :http://friendpaste.com/FSBbhtb5I have a zip file for you with the example if you contact me directly.</description> <content:encoded><![CDATA[<p>(Note: I posted this on JustTalkAboutWeb as I don&#8217;t know which blog you will be maintaining)</p><p>Hi Jimmy,</p><p>We have just released a new version of PURE, including new features such as :</p><p>Auto-rendering: a new PURE method takes your HTML and your JSON data and merges them automatically. The class attribute is used to map the HTML and the data.</p><p>Recursive Template Call</p><p>The changes are quite important.</p><p>We took back your example and changed it to fit with the new release.</p><p>The code source can be seen below and as you will see, it is really easier :</p><p><a href="http://friendpaste.com/FSBbhtb5" rel="nofollow">http://friendpaste.com/FSBbhtb5</a></p><p>I have a zip file for you with the example if you contact me directly.</p> ]]></content:encoded> </item> <item><title>By: Rizqi Ahmad</title><link>http://javascriptly.com/2008/08/a-better-javascript-template-engine/comment-page-1/#comment-34</link> <dc:creator>Rizqi Ahmad</dc:creator> <pubDate>Tue, 16 Sep 2008 17:03:53 +0000</pubDate> <guid isPermaLink="false">http://javascriptly.com/?p=28#comment-34</guid> <description>Thanks for the hint! It is actually caused by IE not handling document correctly. So I moved the script to $(document).ready.I am actually don&#039;t call chain.js a templating engine, it is rather a data binding service.by the way you&#039;re asking about more advanced example, so I created it here: http://code.riiv.net/demos/tree/best regard, Rizqi</description> <content:encoded><![CDATA[<p>Thanks for the hint! It is actually caused by IE not handling document correctly. So I moved the script to $(document).ready.</p><p>I am actually don&#8217;t call chain.js a templating engine, it is rather a data binding service.</p><p>by the way you&#8217;re asking about more advanced example, so I created it here:<br /> <a href="http://code.riiv.net/demos/tree/" rel="nofollow">http://code.riiv.net/demos/tree/</a></p><p>best regard, Rizqi</p> ]]></content:encoded> </item> <item><title>By: Shawn</title><link>http://javascriptly.com/2008/08/a-better-javascript-template-engine/comment-page-1/#comment-32</link> <dc:creator>Shawn</dc:creator> <pubDate>Mon, 15 Sep 2008 21:10:20 +0000</pubDate> <guid isPermaLink="false">http://javascriptly.com/?p=28#comment-32</guid> <description>@Jimmy: Thanks for having a look at the jsRepeater libraryI understand the initial dislike for ${} tags in the HTML. They are after all not HTML. However, they do serve the function of being easier to use. An alternation tag %{odd:even} replaces in a few characters what would normally take many lines of javascript to accomplish.I built this library in order to make it easy to use. Changing layout in HTML is much easier than changing it in javascript. If there is anything I can offer in their defence it would be that ${} markup is declarative in the same way that  is declarative whereas javascript if functional.@Risqi - Thanks as well for having a look at the jsRepeater library. I had a look at the library you mentioned and appreciate the similarities although I did baulk at explicit &#039;for&#039; loops in HTML markup. I think of HTML as being declerative whereas a &#039;for&#039; loop in HTML did seem to be a bit of a mix of metaphors.You mentioned that your project, while being eay to use in the beginning, suffered from scaleability issues. Do you have any examples of these, prehaps a particular example in which templates using innerHTML could not rise to the challenge? I would appreciate it if you could post it so that we could all benefit from the lessons you learned. (I tried to open the demos at http://github.com/raid-ox/interaction.js/wikis/demos but IE7 died on all the example pages with the error &#039;Operation Aborted&#039;, damn IE!, unfortunately we can&#039;t ignore it).Keep up the good work!</description> <content:encoded><![CDATA[<p>@Jimmy: Thanks for having a look at the jsRepeater library</p><p>I understand the initial dislike for ${} tags in the HTML. They are after all not HTML. However, they do serve the function of being easier to use. An alternation tag %{odd:even} replaces in a few characters what would normally take many lines of javascript to accomplish.</p><p>I built this library in order to make it easy to use. Changing layout in HTML is much easier than changing it in javascript. If there is anything I can offer in their defence it would be that ${} markup is declarative in the same way that  is declarative whereas javascript if functional.</p><p>@Risqi &#8211; Thanks as well for having a look at the jsRepeater library. I had a look at the library you mentioned and appreciate the similarities although I did baulk at explicit &#8216;for&#8217; loops in HTML markup. I think of HTML as being declerative whereas a &#8216;for&#8217; loop in HTML did seem to be a bit of a mix of metaphors.</p><p>You mentioned that your project, while being eay to use in the beginning, suffered from scaleability issues. Do you have any examples of these, prehaps a particular example in which templates using innerHTML could not rise to the challenge? I would appreciate it if you could post it so that we could all benefit from the lessons you learned. (I tried to open the demos at <a href="http://github.com/raid-ox/interaction.js/wikis/demos" rel="nofollow">http://github.com/raid-ox/interaction.js/wikis/demos</a> but IE7 died on all the example pages with the error &#8216;Operation Aborted&#8217;, damn IE!, unfortunately we can&#8217;t ignore it).</p><p>Keep up the good work!</p> ]]></content:encoded> </item> <item><title>By: Shawn</title><link>http://javascriptly.com/2008/08/a-better-javascript-template-engine/comment-page-1/#comment-3</link> <dc:creator>Shawn</dc:creator> <pubDate>Wed, 27 Aug 2008 20:57:38 +0000</pubDate> <guid isPermaLink="false">http://javascriptly.com/?p=28#comment-3</guid> <description>Javascript Templates are very topical because, thanks to AJAX, we find ourselves with lots of JavaScript objects that somehow have to make it into the markup.I have also been looking around for templating solutions. I want to have to write as little javascript as possible and wanted a solution where all the heavy lifting is done in the HTML. Let&#039;s face it, it&#039;s easier to change HTML than to write javascript to create HTML.None of the templates I have found do all the things I wanted e.g. more than one alternating template, nested templates, specifying which part of the object you want to bind to, and importantly; being able to bind recursively without having to specify a subtemplate for each level down.So I wrote one. I have made it available as an opensource jquery plugin.Perhaps you might find it useful as well. http://jsrepeater.devprog.com/</description> <content:encoded><![CDATA[<p>Javascript Templates are very topical because, thanks to AJAX, we find ourselves with lots of JavaScript objects that somehow have to make it into the markup.</p><p>I have also been looking around for templating solutions. I want to have to write as little javascript as possible and wanted a solution where all the heavy lifting is done in the HTML. Let&#8217;s face it, it&#8217;s easier to change HTML than to write javascript to create HTML.</p><p>None of the templates I have found do all the things I wanted e.g. more than one alternating template, nested templates, specifying which part of the object you want to bind to, and importantly; being able to bind recursively without having to specify a subtemplate for each level down.</p><p>So I wrote one. I have made it available as an opensource jquery plugin.</p><p>Perhaps you might find it useful as well.<br /> <a href="http://jsrepeater.devprog.com/" rel="nofollow">http://jsrepeater.devprog.com/</a></p> ]]></content:encoded> </item> <item><title>By: Rizqi Ahmad</title><link>http://javascriptly.com/2008/08/a-better-javascript-template-engine/comment-page-1/#comment-4</link> <dc:creator>Rizqi Ahmad</dc:creator> <pubDate>Wed, 27 Aug 2008 20:57:38 +0000</pubDate> <guid isPermaLink="false">http://javascriptly.com/?p=28#comment-4</guid> <description>Thanks for the post!but I think, there are still some missunderstanding about the way chain.js should be used ;). If I release the v0.2, would you please update this article? (Only if you want).@Shawn This is not about templating, but about managing data efficiently and more importantly scaling! You can write a simple code first, and extending it as it is required. For example, chain.js is so extensible that you can extend it to provide useful interaction service as can be seen here: http://github.com/raid-ox/interaction.js/wikis/demosActually I wrote similar library two years ago, called zparse: http://code.riiv.net/zparse/ . But using string based templating and innerHTML, makes your code too limited, not enough flexibility.Of course jsrepeater is very efficient and easy, but as your code grow and grow, jsrepeater can&#039;t provide the flexibility that is required.</description> <content:encoded><![CDATA[<p>Thanks for the post!</p><p>but I think, there are still some missunderstanding about the way chain.js should be used <img src='http://javascriptly.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> . If I release the v0.2, would you please update this article? (Only if you want).</p><p>@Shawn<br /> This is not about templating, but about managing data efficiently and more importantly scaling! You can write a simple code first, and extending it as it is required. For example, chain.js is so extensible that you can extend it to provide useful interaction service as can be seen here: <a href="http://github.com/raid-ox/interaction.js/wikis/demos" rel="nofollow">http://github.com/raid-ox/interaction.js/wikis/demos</a></p><p>Actually I wrote similar library two years ago, called zparse: <a href="http://code.riiv.net/zparse/" rel="nofollow">http://code.riiv.net/zparse/</a> . But using string based templating and innerHTML, makes your code too limited, not enough flexibility.</p><p>Of course jsrepeater is very efficient and easy, but as your code grow and grow, jsrepeater can&#8217;t provide the flexibility that is required.</p> ]]></content:encoded> </item> <item><title>By: Jimmy</title><link>http://javascriptly.com/2008/08/a-better-javascript-template-engine/comment-page-1/#comment-5</link> <dc:creator>Jimmy</dc:creator> <pubDate>Wed, 27 Aug 2008 20:57:38 +0000</pubDate> <guid isPermaLink="false">http://javascriptly.com/?p=28#comment-5</guid> <description>@Shawn: Being able to bind recursively looks useful though I don&#039;t really like template tags in HTML -- just disable JavaScript in your browser and you&#039;ll see ${...} tags left on the page.</description> <content:encoded><![CDATA[<p>@Shawn: Being able to bind recursively looks useful though I don&#8217;t really like template tags in HTML &#8212; just disable JavaScript in your browser and you&#8217;ll see ${&#8230;} tags left on the page.</p> ]]></content:encoded> </item> <item><title>By: Giles Smith</title><link>http://javascriptly.com/2008/08/a-better-javascript-template-engine/comment-page-1/#comment-2</link> <dc:creator>Giles Smith</dc:creator> <pubDate>Wed, 27 Aug 2008 09:23:03 +0000</pubDate> <guid isPermaLink="false">http://javascriptly.com/?p=28#comment-2</guid> <description>Excellent post, I have been meaning to learn more about JQuery, here is a good place to start!</description> <content:encoded><![CDATA[<p>Excellent post, I have been meaning to learn more about JQuery, here is a good place to start!</p> ]]></content:encoded> </item> </channel> </rss>
<!-- This site's performance optimized by W3 Total Cache. Dramatically improve the speed and reliability of your blog!

Learn more about our WordPress Plugins: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (user agent is rejected)
Database Caching 3/13 queries in 0.047 seconds using disk

Served from: quangvhg.virtual.vps-host.net @ 2010-03-19 15:27:11 -->