<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3627888979577168137</id><updated>2026-01-14T19:09:13.919-08:00</updated><category term="jQuery"/><category term="jQueryTemplates"/><category term="ajax"/><category term="JsRender"/><category term="JsViews"/><category term="life"/><category term="me"/><title type='text'>Dancing with Data</title><subtitle type='html'>Boris Moore&#39;s Blog: JavaScript, jQuery, dynamic browser apps, data...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.borismoore.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3627888979577168137/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://www.borismoore.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Boris Moore</name><uri>http://www.blogger.com/profile/17923416771395046921</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifritkTk81h2x0ZoT94F26hl67nnGg2D77YpdsHhkON627UBPredZm7VKmtJA42tSIx9eoMBwOE3fJkT3LeficQih5eGiuumKCdZZyzjWLGPxUkHxTCHpdcSwLQclpLA/s113/assets.github.com%252Fimages%252Fgravatars%252Fgravatar-140.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>10</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3627888979577168137.post-6810997513254768644</id><published>2013-06-11T00:07:00.001-07:00</published><updated>2022-04-04T11:29:55.433-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="JsRender"/><category scheme="http://www.blogger.com/atom/ns#" term="JsViews"/><title type='text'>Welcome to jsviews.com - the documentation and download site for JsViews, JsRender and JsObservable</title><content type='html'>&lt;div style=&quot;margin: 0in;&quot;&gt;
&lt;div style=&quot;margin: 0in;&quot;&gt;
&lt;div style=&quot;margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11pt;&quot;&gt;This blog brings two pieces of news:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in;&quot;&gt;
&lt;div style=&quot;font-family: Calibri; font-size: 11pt;&quot;&gt;
&lt;b style=&quot;font-size: 11pt;&quot;&gt;The jsviews.com website&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Calibri; font-size: 11pt;&quot;&gt;
&lt;span style=&quot;font-size: 11pt;&quot;&gt;The first is in the title: There is a now a new &lt;a href=&quot;http://jsviews.com/&quot;&gt;jsviews.com&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&amp;nbsp;website,&lt;span style=&quot;font-size: 11pt;&quot;&gt;&amp;nbsp;which provides &lt;/span&gt;&lt;a href=&quot;http://jsviews.com/#jsrapi&quot; style=&quot;font-size: 11pt;&quot; target=&quot;_blank&quot;&gt;documentation&lt;/a&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;, &lt;/span&gt;&lt;a href=&quot;http://jsviews.com/#samples&quot; style=&quot;font-size: 11pt;&quot; target=&quot;_blank&quot;&gt;samples&lt;/a&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;, &lt;/span&gt;&lt;a href=&quot;http://jsviews.com/#download&quot; style=&quot;font-size: 11pt;&quot; target=&quot;_blank&quot;&gt;downloads&lt;/a&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;, and more, for &lt;a href=&quot;http://jsviews.com/#jsviews&quot; target=&quot;_blank&quot;&gt;JsViews&lt;/a&gt;, &lt;a href=&quot;http://jsviews.com/#jsrender&quot; target=&quot;_blank&quot;&gt;JsRender&lt;/a&gt; and &lt;a href=&quot;http://jsviews.com/#jsobservable&quot; target=&quot;_blank&quot;&gt;JsObservable&lt;/a&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Calibri; font-size: 11pt;&quot;&gt;
&lt;span style=&quot;font-size: 11pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b style=&quot;font-family: Calibri; font-size: 11pt;&quot;&gt;JsRender is now officially beta&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: Calibri; font-size: 11pt;&quot;&gt;
&lt;span style=&quot;font-size: 11pt;&quot;&gt;And the second is that the&amp;nbsp;&lt;a href=&quot;https://github.com/BorisMoore/jsrender/&quot; target=&quot;_blank&quot;&gt;JsRender bits&lt;/a&gt;&amp;nbsp;(which have been &quot;beta candidate&quot; for a while) have today moved to being officially labelled &quot;beta&quot;. &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Calibri; font-size: 11pt;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Calibri; font-size: 11pt;&quot;&gt;
&lt;b&gt;The context&lt;/b&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;In fact both &lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://jsviews.com/#jsrender&quot; style=&quot;font-family: Calibri; font-size: 11pt;&quot; target=&quot;_blank&quot;&gt;JsRender&lt;/a&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;&amp;nbsp;and &lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://jsviews.com/#jsviews&quot; style=&quot;font-family: Calibri; font-size: 11pt;&quot; target=&quot;_blank&quot;&gt;JsViews&lt;/a&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt; have effectively been at beta quality for some time. The plan of course is to move to V1.0 as soon as is appropriate, and in fact the current code is already very close to the&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;targeted&lt;/span&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;&amp;nbsp;V1.0 version, in that the code quality is high, and the feature coverage very complete.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;So what has been missing? Well the the most important missing piece was full API documentation, and the decision was not to label a library as being an official beta release until that API documentation for that library was available.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Calibri; font-size: 11pt;&quot;&gt;But to achieve that meant not only writing the documentation content, but also providing the website to view and navigate through that documentation. And also the plan was to provide integrated live working samples completely within the flow of the documentation - and that too needed to be designed and implemented.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11pt;&quot;&gt;So &lt;a href=&quot;http://jsviews.com/&quot;&gt;jsviews.com&lt;/a&gt; is that website, and it is in fact itself an example of a single-page app built entirely using JsViews and JsRender, illustrating the power of those libraries for creating dynamic interactive single-page apps. If you are interested, you can see the code for the site &lt;a href=&quot;https://github.com/BorisMoore/jsviews.com&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;. (It actually includes a hidden feature which allows it to switch into editable mode, with wiki-style content creation, so it is more sophisticated than may meet the eye in normal read-only mode).&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11pt;&quot;&gt;&lt;b&gt;JsRender now has detailed (and interactive) API documentation&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11pt;&quot;&gt;Here it is: &lt;a href=&quot;http://jsviews.com/#jsrapi&quot;&gt;jsviews.com/#jsrapi&lt;/a&gt;. More topics will be added in the coming period (along with. later on, tutorials, and &quot;deep-dive&quot; topics). But already the topics give complete coverage of the primary scenarios of JsRender.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11pt;&quot;&gt;&lt;b&gt;And JsViews?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11pt;&quot;&gt;JsViews API documentation will be next, and as soon as it is ready, the official beta for JsViews will be declared. (So in fact the JsViews beta version will probably be almost identical to current &lt;a href=&quot;https://github.com/BorisMoore/jsviews&quot; target=&quot;_blank&quot;&gt;JsViews bits&lt;/a&gt;).&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11pt;&quot;&gt;&lt;b&gt;JsRender and JsViews V1.0&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;Version V1.0 should follow not too long after, since the number of &lt;a href=&quot;https://github.com/BorisMoore/jsviews/issues?direction=desc&amp;amp;labels=Planned+for+V1&amp;amp;page=1&amp;amp;sort=created&amp;amp;state=open&quot; target=&quot;_blank&quot;&gt;triaged issues&lt;/a&gt;&amp;nbsp;currently planned to be addressed for V1.0 is small - and could even be reduced slightly if necessary. V1.1 planned features have also already been largely determined - and V1.1 is not intended to be major release in terms of new features. &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11pt;&quot;&gt;&lt;b&gt;Integrated samples within the documentation:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11pt;&quot;&gt;Now, just to give a flavor of the features of the new documentation, here is an example of a sample - taken from the end of this &lt;a href=&quot;http://www.jsviews.com/#tmplrender&quot; target=&quot;_blank&quot;&gt;documentation topic&lt;/a&gt;:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjji7M9Jhvu-33dNCyEcmfmdSGJ_wCnsls3z3RxdU2IPTSpUziVIdyNh4WdVH8WTc8OL1iCI2iJB9htSv2q8mbxkBKYp8xgI_oj5HR9bwNxz3RLspSlNWLrJI4OfuVSf0TSp1jx61LuhxA/s1600/samplewithindocs.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: left;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;614&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjji7M9Jhvu-33dNCyEcmfmdSGJ_wCnsls3z3RxdU2IPTSpUziVIdyNh4WdVH8WTc8OL1iCI2iJB9htSv2q8mbxkBKYp8xgI_oj5HR9bwNxz3RLspSlNWLrJI4OfuVSf0TSp1jx61LuhxA/s640/samplewithindocs.png&quot; title=&quot;&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11pt&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11pt;&quot;&gt;The sample is live. You can click on &lt;i&gt;&lt;b&gt;Try it&lt;/b&gt;&lt;/i&gt;&amp;nbsp;and change anything you want: - the template, the data, or the code. For example if you change each of the places I have circled in red -&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNTkiZrwFD3lbjniByU-WjKKde-OizD3i7s767lE8-HGoE6svuDZxWb7RMS2lxgNtVHwBlvwdbBw1X5Rj8CS3bbndub643kkDpm-tGdWhd71wQVkqYcB0S3P5opTz9biob3_6KzO53NdI/s1600/tryit.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: left;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;465&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNTkiZrwFD3lbjniByU-WjKKde-OizD3i7s767lE8-HGoE6svuDZxWb7RMS2lxgNtVHwBlvwdbBw1X5Rj8CS3bbndub643kkDpm-tGdWhd71wQVkqYcB0S3P5opTz9biob3_6KzO53NdI/s640/tryit.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11pt;&quot;&gt;- and then hit&amp;nbsp;&lt;b style=&quot;font-style: italic;&quot;&gt;Run Code&lt;/b&gt;, you will get something like this:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2zd9mszkCvPP2T1T5pLHmZp0vgFGWVlAowjUHS9uLeW6AqyR1TsTrAn22pZe3RXIOX80y5-Pv5Y6QcupinAfDMa0fByaTs-hSLvIT4ccBVVbB_pF__PYLWmnN-dj27RUaHmAjuppEEOg/s1600/changed.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: left;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;466&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2zd9mszkCvPP2T1T5pLHmZp0vgFGWVlAowjUHS9uLeW6AqyR1TsTrAn22pZe3RXIOX80y5-Pv5Y6QcupinAfDMa0fByaTs-hSLvIT4ccBVVbB_pF__PYLWmnN-dj27RUaHmAjuppEEOg/s640/changed.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11pt;&quot;&gt;Now if you switch to the &lt;b&gt;&lt;i&gt;Full Code&lt;/i&gt;&lt;/b&gt; tab, you can copy the contents of that tab, and drop them into a simple HTML page.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBUzD8KnpeD8pHMvvKZBU1KI0u3Oh95OW55gyf6twP-uUkwo2owLa_88o_9XQLcvlq7gJCSwil1UOrgrSyLlRzSlE7xFw1lDbZpbo1QGzZSFfHofwf2pWdY171ku7Bh32j_QzJcxQz4qs/s1600/fullcode.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: left;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;466&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBUzD8KnpeD8pHMvvKZBU1KI0u3Oh95OW55gyf6twP-uUkwo2owLa_88o_9XQLcvlq7gJCSwil1UOrgrSyLlRzSlE7xFw1lDbZpbo1QGzZSFfHofwf2pWdY171ku7Bh32j_QzJcxQz4qs/s640/fullcode.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: right;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: Calibri; font-size: 11pt; margin: 0in;&quot;&gt;
&lt;div style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;div style=&quot;font-size: 11pt; margin: 0in;&quot;&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: 11pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: 11pt;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;
&lt;span style=&quot;font-size: 11pt;&quot;&gt;&lt;span style=&quot;font-family: Calibri; font-size: 11pt;&quot;&gt;Run the page and you have a fully working sample of your own modified version of the original - which you can continue to experiment with from there...&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: 11pt;&quot;&gt;
&lt;/span&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;
&lt;span style=&quot;font-size: 11pt;&quot;&gt;&lt;span style=&quot;font-family: Calibri; font-size: 11pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: 11pt;&quot;&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11pt;&quot;&gt;I am looking forward to completing the documentation, and hope it will help you to discover and appreciated the possibilities of JsRender and JsViews!&lt;/span&gt;&lt;/div&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.borismoore.com/feeds/6810997513254768644/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.borismoore.com/2013/06/welcome-to-jsviews.com.html#comment-form' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3627888979577168137/posts/default/6810997513254768644'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3627888979577168137/posts/default/6810997513254768644'/><link rel='alternate' type='text/html' href='http://www.borismoore.com/2013/06/welcome-to-jsviews.com.html' title='Welcome to jsviews.com - the documentation and download site for JsViews, JsRender and JsObservable'/><author><name>Boris Moore</name><uri>http://www.blogger.com/profile/17923416771395046921</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifritkTk81h2x0ZoT94F26hl67nnGg2D77YpdsHhkON627UBPredZm7VKmtJA42tSIx9eoMBwOE3fJkT3LeficQih5eGiuumKCdZZyzjWLGPxUkHxTCHpdcSwLQclpLA/s113/assets.github.com%252Fimages%252Fgravatars%252Fgravatar-140.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjji7M9Jhvu-33dNCyEcmfmdSGJ_wCnsls3z3RxdU2IPTSpUziVIdyNh4WdVH8WTc8OL1iCI2iJB9htSv2q8mbxkBKYp8xgI_oj5HR9bwNxz3RLspSlNWLrJI4OfuVSf0TSp1jx61LuhxA/s72-c/samplewithindocs.png" height="72" width="72"/><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3627888979577168137.post-1815998073923523467</id><published>2012-03-06T15:04:00.002-08:00</published><updated>2026-01-14T09:07:39.785-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ajax"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="jQueryTemplates"/><title type='text'>Approaching Beta: What&#39;s changing in JsRender and JsViews</title><content type='html'>&lt;div style=&quot;margin-bottom: 0in; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;div style=&quot;font-family: Calibri; font-size: 11pt; margin-bottom: 0in; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;div style=&quot;font-size: 11pt; margin-bottom: 0in; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b style=&quot;font-size: 11pt;&quot;&gt;Major update to &amp;nbsp;JsRender and JsViews&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;In &lt;a href=&quot;http://www.borismoore.com/2011/10/jquery-templates-and-jsviews-roadmap.html&quot; target=&quot;_blank&quot;&gt;previous posts&lt;/a&gt; and elsewhere, I had set the goal of reaching beta for JsRender at the end of February. A&lt;/span&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;&amp;nbsp;major update has just been committed to&lt;/span&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://github.com/BorisMoore&quot; style=&quot;font-size: 11pt;&quot; target=&quot;_blank&quot;&gt;GitHub&lt;/a&gt;&amp;nbsp;for both JsRender and JsViews, which is effectively a beta candidate for JsRender.&lt;br /&gt;
&lt;span style=&quot;font-size: 11pt;&quot;&gt;&lt;br /&gt;
This update brings a large number of API changes, new features, and improvements, to both JsRender and JsViews. It follows quite a period of apparent silence on GitHub (as far as commits are concerned), which left some folks with the impression that the project may have become inactive. The truth is quite the&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;opposite. JsRender and JsViews are&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;(in my view!)&lt;/span&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;alive and well and growing apace...&lt;/span&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 11pt;&quot;&gt;So why the silence? In working on the new bits, I had to address the fact that the beta API design I was aiming for would be breaking for many users. Not a big deal usually for alpha software, but in the case of JsRender and JsViews there has been quite a lot of adoption already, so I wanted to avoid causing too much pain with a series of breaking commits. I decided to work on a single breaking update intended to provide a one-step transition to a beta candidate for JsRender (or at least a candidate for a stabl&lt;/span&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;e beta API)&lt;/span&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;, and also introduce much of the future stable beta API for JsViews.&lt;/span&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 11pt;&quot;&gt;That update has taken a long time to complete, since it is a major rewrite not only of JsRender but also JsViews... The new bits for JsRender have been nearly ready for quite a while now, but the integration between JsViews and JsRender meant also moving JsViews a long way towards its future beta version. That way current users of JsViews can also port their apps to the new JsRender.&lt;/span&gt;&lt;b style=&quot;font-size: 11pt;&quot;&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;font-size: 11pt;&quot;&gt;What&#39;s changed?&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 11pt;&quot;&gt;This post provides a guide through the changes, and&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;is primarily intended to&lt;/span&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;&amp;nbsp;help existing users of JsViews or JsRender to move to the new version.&lt;/span&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 11pt;&quot;&gt;It can also be helpful to first-time adopters, but bear in mind that this is&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;still not quite the official beta, so documentation is limited. I hope to provide more documentation (or update this post) as we move to the official beta for JsRender (fairly soon) and JsViews (probably end of April or early May...). In the meantime, take a look too at all the&amp;nbsp;&lt;a href=&quot;http://borismoore.github.io/jsrender/demos/index.html&quot; target=&quot;_blank&quot;&gt;live samples&lt;/a&gt;&amp;nbsp;and the corresponding code for&amp;nbsp;&lt;a href=&quot;https://github.com/BorisMoore/jsviews/tree/master/demos&quot; target=&quot;_blank&quot;&gt;JsViews&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href=&quot;https://github.com/BorisMoore/jsrender/tree/master/demos&quot; target=&quot;_blank&quot;&gt;JsRender&lt;/a&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Calibri; font-size: 11pt; margin-bottom: 0in; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b style=&quot;font-size: 11pt;&quot;&gt;&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;JsRender: principal changes&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;b style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;{{: ...}} and {{&amp;gt; ...}} tags:&lt;/b&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;&amp;nbsp;The basic tag for outputting data values,&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;{{=some.data.path}},&lt;/i&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;&amp;nbsp;is now&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;{{:some.data.path}}&lt;/i&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;, and supports converter functions, and almost any javascript expression, as in&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;{{myConverter:someExpression}}&lt;/i&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;.&lt;br /&gt;
It is&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;font-family: Calibri; font-size: 15px; font-weight: bold;&quot;&gt;not&lt;/i&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;&amp;nbsp;HTML-encoded by default.&lt;br /&gt;
To HTML-encode, use the tag&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;{{&amp;gt;someExpression}}&lt;/i&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;b style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;Block tags and inline tags:&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;The syntax for block/inline tags is now similar to HTML element syntax in the use of the&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;i style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;&#39;/&#39;&amp;nbsp;&lt;/i&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;character:&lt;/span&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;A block tag is written&lt;/span&gt;&lt;/span&gt;&lt;i style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;&amp;nbsp;{{myBlockTag ...}} ... {{/myBlocktag}}&lt;/i&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;A non-block (self-closing, or inline) tag is written&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;i style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;{{myInlineTag/}}.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;A block tag can become an inline tag if it references a template as content:&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;&lt;br /&gt;
&lt;i&gt;{{myBlockTag ... tmpl=&quot;myNamedTemplate&quot; /}}&lt;/i&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;&lt;b&gt;{{#each}} tag is now {{for}}:&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;There was some confusion around the&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;{{each ...}}&amp;nbsp;&lt;/i&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;tag, in that the name suggested that it only worked as an iterator over an array as in&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;{{#each myArray}}...{{/each}}&lt;/i&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;. In fact it worked also against singleton data objects, and this is made more intuitive by renaming it to&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;{{for ...}}&lt;/i&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;. This means you can write&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;{{for myArray}}...{{/for}}&lt;/i&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;, but for other scenarios you might also write&lt;/span&gt;&lt;i style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;&amp;nbsp;&lt;/i&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;{{for myObject}}...{{/for}}&lt;/i&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;, which will render against &lt;i&gt;myObject&lt;/i&gt; as current data item (data context) for the nested content&lt;/span&gt;&lt;i style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;.&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;&lt;b&gt;Expressions within template tags:&amp;nbsp;&lt;/b&gt;JsRender template tags now support almost any JavaScript expression (and also allow parens, to any depth).&lt;br /&gt;
For example, you can write:&amp;nbsp;&amp;nbsp;&lt;i&gt;{{if &amp;nbsp;price &amp;gt; 3 &amp;amp;&amp;amp; price &amp;lt; (maxPrice - 10)}}Special deal{{/if}}.&lt;/i&gt;&lt;br /&gt;
However, unlike with jQuery Templates, the expressions are evaluated within a parsing and execution context which precludes accessing global variables or running any code which arbitrarily assigns or modifies data or state. Only template data properties/methods and registered helper functions/parameters can be accessed.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;b&gt;&lt;b&gt;View properties syntax:&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;To access view properties, such as parent, the syntax is now&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;font-weight: normal;&quot;&gt;#parent.&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;&lt;b&gt;&lt;b&gt;&lt;b&gt;$itemNumber is now #index:&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;There is now a zero-based index, identical to the index on view objects when using JsViews. This change is thanks to expression support which has made getting a 1-based index very easy, as in:&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;font-weight: normal;&quot;&gt;{{:#index + 1}}&lt;/i&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;.&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;&lt;b&gt;&lt;b&gt;Helper functions:&lt;/b&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;There is now a single concept of a helper function, which can be provided either via the &lt;i&gt;options&lt;/i&gt; parameter in the&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;font-weight: normal;&quot;&gt;$.render&lt;/i&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;(or the&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;font-weight: normal;&quot;&gt;$.link&lt;/i&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;method, if using JsViews), or by registering using the&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;font-weight: normal;&quot;&gt;$.views.helpers()&lt;/i&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;API call.&lt;br /&gt;
In either case, a registered&amp;nbsp;helper function&amp;nbsp;&lt;b&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;i&gt;myHelper(...)&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;will be accessed within the template using a simpler syntax than before:&amp;nbsp;&lt;i&gt;~myHelper(...)&lt;/i&gt;, rather than&amp;nbsp;&lt;i&gt;$ctx.myHelper(...).&amp;nbsp;&lt;/i&gt;&lt;br /&gt;
F&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;or example, you can write&amp;nbsp;&lt;i&gt;{{:~myFullNameHelper(firstName, lastName)}}.&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;Template parameters:&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;In addition to helper functions, template parameters can be passed in with &lt;i&gt;options&lt;/i&gt;&amp;nbsp;or registered using &lt;i&gt;$.views.helpers()&lt;/i&gt;&amp;nbsp;- and then accessed by the same template syntax as helper functions, as in&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;{{:~myParameter}}&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;&lt;b&gt;&lt;b&gt;Aliasing variables for use in nested contexts:&lt;/b&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;If you want to access the data in a parent context, you can now provide a variable (accessed like a&amp;nbsp;&lt;span style=&quot;background-color: white; color: #1f3244; line-height: 20px; text-align: left;&quot;&gt;template&lt;/span&gt;&amp;nbsp;parameter) which will be available within nested context. For example:&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;font-weight: normal;&quot;&gt;{{for lineItems ~orderTitle=orderInfo.title}}...{{:~orderTitle}}...{{/for}}&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;&lt;b&gt;Registration APIs:&lt;/b&gt;&amp;nbsp;Registering of helper functions, converter functions and custom tags each use an equivalent API pattern:&amp;nbsp;&lt;i&gt;$.&lt;b&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;views.&lt;/span&gt;&lt;/b&gt;helpers()&lt;/i&gt;,&amp;nbsp;&lt;i&gt;$.views.converters()&lt;/i&gt;,&amp;nbsp;&lt;i&gt;$.views.tags()&lt;/i&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;&lt;b&gt;Registering/compiling templates:&lt;/b&gt;&amp;nbsp;This uses a similar API,&amp;nbsp;&lt;i&gt;$.templates()&lt;/i&gt;, which also allows defining template properties and resources (below).&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;&lt;b&gt;&quot;Intellisense-friendly&quot; APIs for rendering:&lt;/b&gt; &amp;nbsp;New APIs are provided which are convenient for intellisense. For example, you can now write:&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;i style=&quot;font-size: 15px;&quot;&gt;$.render.detailsTmpl( person );&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;b&gt;Template resources and settings:&lt;/b&gt; Registering templates now supports specifying individual settings for the template, and registering resources such as helpers, converters, other templates, etc. so that they are available only in the context of the registered template, and are not exposed globally to other templates.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;b&gt;Layout templates: &lt;/b&gt;A template may have a setting: &lt;i&gt;layout: true. &lt;/i&gt;This will make it&amp;nbsp;render just once, independently of whether the data supplied is an array, &lt;i&gt;null&lt;/i&gt;, &lt;i&gt;undefined&lt;/i&gt;, &lt;i&gt;false&lt;/i&gt;, or any other data value. A &lt;i&gt;{{for}} &lt;/i&gt;tag within the template will then render against the data in the normal way.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;b style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;Debug setting:&lt;/b&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt; If a compiled template has the setting&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;debug: true,&lt;/i&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;&amp;nbsp;a &lt;i&gt;debugger; &lt;/i&gt;statement will be&amp;nbsp;inserted at the beginning of the compiled template function. This makes debugging declarative templates easier.&lt;/span&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;b style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;Unit tests:&lt;/b&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;&amp;nbsp; JsRender&amp;nbsp;now includes unit tests.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;font-family: Calibri; font-size: 11pt; margin-bottom: 0in; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b style=&quot;font-size: 11pt;&quot;&gt;JsViews: principal changes&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;&lt;b&gt;Views:&amp;nbsp;&lt;/b&gt;Previously, both JsRender and JsViews had a concept of a view hierarchy, but the two were distinct. Now a single view hierarchy is created during rendering of templates (and nested templates) and the same view hierarchy is maintained (but augmented with additional methods or properties) during data linking by JsViews.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;b style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;Declarative data binding:&amp;nbsp;&lt;/b&gt;&lt;i style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;data-from&lt;/i&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;data-getfrom&lt;/i&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;data-to&lt;/i&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;&amp;nbsp;are now consolidated into a single data binding attribute:&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;data-link&lt;/i&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;. This provides for more concise and simpler data binding declarations that support both one-way and two-way binding. See the samples for different use-cases, including binding to multiple target attributes on the same HTML element.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;&lt;b&gt;Data binding expressions:&amp;nbsp;&lt;/b&gt;Data binding expressions are evaluated according to the same contextual and parsing rules as template tag expressions. They can access exactly the same user-registered helper functions, template parameters, or converter functions that are available to template tag expressions - whether&amp;nbsp;&lt;b&gt;&lt;span style=&quot;font-family: Calibri; font-weight: normal;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;registered using&amp;nbsp;&lt;i&gt;$.views.helpers&lt;/i&gt;, or passed in with the &lt;i&gt;options &lt;/i&gt;parameter in a&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;font-weight: normal;&quot;&gt;render()&lt;/i&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;call&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;. In addition, helper functions and template parameters can be passed in with the &lt;i&gt;options&lt;/i&gt; parameter of any&lt;i&gt; link()&lt;/i&gt; call.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;&lt;b&gt;&lt;b&gt;Automatic dependency detection&lt;/b&gt;&amp;nbsp;:&amp;nbsp;&lt;/b&gt; In data binding expressions it is no longer necessary to put square brackets in paths to specify data-binding dependencies.&lt;br /&gt;
&lt;i&gt;&amp;lt;input data-getfrom=&quot;shipping.address[street]&quot; data-to=&quot; shipping.address[street]&amp;nbsp;&quot; /&amp;gt;&amp;nbsp;&lt;/i&gt;is now written:&lt;br /&gt;
&lt;i&gt;&lt;i&gt;&amp;lt;&lt;/i&gt;input data-link=&quot;shipping.address.street&quot;&amp;nbsp;/&amp;gt;&lt;/i&gt;&lt;br /&gt;
This opens the way to supporting&amp;nbsp;&lt;i&gt;[]&lt;/i&gt;&amp;nbsp;syntax for array or property accessors. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;b&gt;&quot;Intellisense-friendly&quot; APIs for linking:&lt;/b&gt;&amp;nbsp; As with JsRender, JsViews now provides new APIs which are convenient for intellisense, such as&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;: &amp;nbsp;&lt;i&gt;$.link.movieTmpl( &quot;#movieList&quot;, movies );&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;&lt;b&gt;Disabling linking when rendering a template:&lt;/b&gt; If JsViews is loaded, rendered template were previously automatically data-linked. It is now possible to set &lt;i&gt;link: false&lt;/i&gt;&amp;nbsp;on a template, or as an option in the render call, or as a tag property: &lt;i&gt;{{for link=false}}&lt;/i&gt;, to switch off data linking within a rendered template.&lt;br /&gt;
This is useful, for example, if you want to include template tags within attribute markup, and suppress JsViews HTML comment annotations that were automatically inserted for data-linking purposes.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;b style=&quot;font-family: Calibri; font-size: 11pt;&quot;&gt;Missing, or not yet available features&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0in; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;&lt;b style=&quot;font-family: Calibri;&quot;&gt;Programmatic data linking:&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;Programmatic data link APIs such as &lt;i&gt;addLink&lt;/i&gt; have been removed.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Calibri; font-size: 15px;&quot;&gt;(They will probably return in modified form for JsViews beta)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;&lt;b style=&quot;font-family: Calibri;&quot;&gt;Unit tests:&lt;/b&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&amp;nbsp; JsViews is not so close to beta as JsRender, and does not yet include unit tests. They will be added before it reaches beta.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Calibri; font-size: 11pt; margin-bottom: 0in; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;div style=&quot;font-size: 11pt; margin-bottom: 0in; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;b&gt;Performance and code size&lt;/b&gt;&lt;br /&gt;
In spite of the many new features, total minified code size for JsViews plus JsRender is similar to the previous update, and performance is slightly better. A performance test page is provided&lt;span style=&quot;font-size: 11pt;&quot;&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-size: 11pt;&quot;&gt;Specific examples of porting to the current design&lt;/b&gt;&lt;br /&gt;
The samples available at &lt;a href=&quot;https://github.com/BorisMoore/jsrender/tree/master/demos&quot; target=&quot;_blank&quot;&gt;github.com/BorisMoore/jsrender&lt;/a&gt;&amp;nbsp;(live &lt;a href=&quot;http://borismoore.github.com/jsrender/demos/index.html&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;) and at &lt;a href=&quot;https://github.com/BorisMoore/jsviews/tree/master/demos&quot; target=&quot;_blank&quot;&gt;github.com/BorisMoore/jsviews&lt;/a&gt;&amp;nbsp;(live &lt;a href=&quot;http://borismoore.github.com/jsviews/demos/index.html&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;) have been changed where necessary to work with current API calls and declarative syntax. In some cases there are new features available which would have provided a more elegant approach to the scenario shown, but the samples have generally been changed in a minimalistic way, to illustrate how to port to the new version. (More samples showing new features will be added at a later point, along with other documentation).&lt;b style=&quot;font-size: 11pt;&quot;&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;font-size: 11pt;&quot;&gt;And from here?&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 11pt; margin-bottom: 0in; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;div style=&quot;font-size: 11pt; margin-bottom: 0in; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;The plan is to wait for some feedback or bug reports on this new update, before deciding whether to label this version of JsRender as the official beta. Once it has become beta, I hope to progressively add additional documentation&lt;span style=&quot;font-size: 11pt;&quot;&gt;.&lt;/span&gt;&lt;b style=&quot;font-size: 11pt;&quot;&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 11pt;&quot;&gt;In the meantime I will continue to work on moving JsViews towards beta. This may still take a while, since there are some significant changes and improvements in the pipeline. My hope is that it will be available late April or early May...&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.borismoore.com/feeds/1815998073923523467/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.borismoore.com/2012/03/approaching-beta-whats-changing-in_06.html#comment-form' title='219 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3627888979577168137/posts/default/1815998073923523467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3627888979577168137/posts/default/1815998073923523467'/><link rel='alternate' type='text/html' href='http://www.borismoore.com/2012/03/approaching-beta-whats-changing-in_06.html' title='Approaching Beta: What&#39;s changing in JsRender and JsViews'/><author><name>Boris Moore</name><uri>http://www.blogger.com/profile/17923416771395046921</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifritkTk81h2x0ZoT94F26hl67nnGg2D77YpdsHhkON627UBPredZm7VKmtJA42tSIx9eoMBwOE3fJkT3LeficQih5eGiuumKCdZZyzjWLGPxUkHxTCHpdcSwLQclpLA/s113/assets.github.com%252Fimages%252Fgravatars%252Fgravatar-140.png'/></author><thr:total>219</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3627888979577168137.post-4390082775510320361</id><published>2011-10-12T18:10:00.003-07:00</published><updated>2022-04-04T11:34:27.835-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ajax"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="jQueryTemplates"/><title type='text'>jQuery Templates and JsViews: The Roadmap</title><content type='html'>&lt;div style=&quot;border: 1px solid #999; padding: 5px;&quot;&gt;&lt;i&gt;Update: &lt;/i&gt;JsRender is now close to beta, and JsViews has many new features which also bring it closer to beta.&lt;br/&gt;See &lt;a href=&quot;http://www.borismoore.com/2012/03/approaching-beta-whats-changing-in_06.html&quot;&gt;Approaching Beta: What&#39;s changing in JsRender and JsViews&lt;/a&gt; for details on the latest changes.&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: Calibri; font-size: 11pt; margin-bottom: 0in; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;div style=&quot;font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Calibri; font-size: 11pt; margin-bottom: 0in; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: small;&quot;&gt;&lt;b&gt;From jQuery Templates to JsViews&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Calibri; font-size: 11pt; font-weight: bold; margin-bottom: 0in; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;This post provides some details and some context on the relationship between jQuery Templates, JsRender and JsViews, and provides information about the current roadmap.&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Calibri; font-size: 11.0pt; margin: 0in;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: Calibri; font-size: 11pt; font-weight: bold; margin-bottom: 0in; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: small;&quot;&gt;History of jQuery Templates&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Calibri; font-size: 11pt; margin-bottom: 0in; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;/div&gt;jQuery Templates started out in March 2010, and went through a series of steps:&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0in; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;ul style=&quot;font-family: Calibri; font-size: 11pt;&quot;&gt;&lt;li&gt;March 2010:&amp;nbsp;John Resig posted &lt;a href=&quot;https://github.com/jquery/jquery-tmpl/commit/73168f499e80ddcc172cd1389e0be66cfd00b25a&quot;&gt;a prototype&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;from May 2010 onwards:&amp;nbsp;I worked on a fork of John&#39;s prototype (as did many others)&lt;/li&gt;
&lt;li&gt;October 2010:&amp;nbsp;My fork was pulled into the jQuery Templates repo, and it was decided to make this a &lt;a href=&quot;http://www.borismoore.com/2010/10/jquery-templates-is-now-official-jquery.html&quot;&gt;jQuery Official Plugin&lt;/a&gt;: &amp;nbsp;(along with the Globalization and Data Link plugins, created primarily by &lt;a href=&quot;http://weblogs.asp.net/infinitiesloop/&quot;&gt;Dave Reed&lt;/a&gt;, also at Microsoft).&amp;nbsp;&lt;/li&gt;
&lt;li&gt;October 2010 - April 2011:&amp;nbsp;I continued to iterate on the code on&amp;nbsp;&lt;a href=&quot;https://github.com/jquery/jquery-tmpl&quot;&gt;jquery/jquery-tmpl&lt;/a&gt;&amp;nbsp;- taking it to Beta1 then working towards Beta2.&lt;/li&gt;
&lt;li&gt;April 2011:&amp;nbsp;The jQuery Project decided to &lt;a href=&quot;http://blog.jquery.com/2011/04/16/official-plugins-a-change-in-the-roadmap/&quot;&gt;change the status of official plugins&lt;/a&gt;.&amp;nbsp;From that point the version of jQuery Templates at &lt;a href=&quot;https://github.com/jquery/jquery-tmpl&quot;&gt;jquery/jquery-tmpl&lt;/a&gt; was owned by the jQuery UI team. I collaborated with jQuery UI on moving templates forward.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;April 2011 onwards: jQuery UI decided to put&amp;nbsp;&amp;nbsp;&lt;a href=&quot;https://github.com/jquery/jquery-tmpl&quot;&gt;jquery/jquery-tmpl&lt;/a&gt;&amp;nbsp;&amp;nbsp;on hold - and asked me not to continue with fixes and updates under that repository. The plan was first to establish their templating requirements, and from there move on to determining what template engine they would use.&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Calibri; font-size: 11.0pt; margin: 0in;&quot;&gt;&lt;b&gt;Meanwhile: JsRender and JsViews&lt;/b&gt;&lt;br /&gt;
At the same time (April 2011) I was working on an updated approach to jQuery Templates: &lt;a href=&quot;https://github.com/BorisMoore/jsrender&quot;&gt;JsRender &lt;/a&gt;and &lt;a href=&quot;https://github.com/BorisMoore/jsviews&quot;&gt;JsViews&lt;/a&gt;.&amp;nbsp;JsRender uses pure string-based rendering without any DOM (or even jQuery) dependency, and JsViews integrates JsRender templates with data linking, to provide data-driven templated views.&amp;nbsp;&amp;nbsp;I gave a&amp;nbsp;&lt;a href=&quot;http://www.borismoore.com/2011/04/jquery-bay-area-conference-presentation.html&quot;&gt;preview&lt;/a&gt;&amp;nbsp;of this work at the April 2011 jQuery Conference.&lt;br /&gt;
&lt;br /&gt;
The jQuery UI team asked me to continue that ongoing development in my own repository rather than under the jQuery project. Meantime we collaborated on establishing design and feature requirements for templates in jQuery UI.&lt;/div&gt;&lt;div style=&quot;font-family: Calibri; font-size: 11.0pt; margin: 0in;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Calibri; font-size: 11.0pt; margin: 0in;&quot;&gt;More recently jQuery UI decided that they did not want to use the jQuery Template syntax for their future templating engine, and instead opted for a logicless syntax (or as I prefer to say, codeless - since there would still be &lt;i&gt;{{each}}&lt;/i&gt; and &lt;i&gt;{{if}}&lt;/i&gt; tags) similar to Mustache and Handlebars. This led me to develop a version of JsRender using that style of markup. The result is the JsRender template engine that I &lt;a href=&quot;http://www.borismoore.com/2011/10/jsviews-presentation-at-jquery.html&quot;&gt;showed&lt;/a&gt; at the October jQuery Conference, which is considerably faster that jQuery Templates, and remains very flexible thanks to the ease and power of creating custom tags and helpers (which include some features not found in Handlebars or Mustache - such as chaining of tags, intermixing of named and positional parameters, postfixed encoding syntax etc.)&lt;br /&gt;
&lt;br /&gt;
Personally I had mixed feelings about the new codeless syntax. One big concern was that it will require porting of existing jQuery Template apps to the new syntax, and in the case where the templates include a lot of inline JavaScript expressions, it will mean either creating new custom tags, or falling back on the &#39;opt-in&#39; &lt;i&gt;{{*... }}&lt;/i&gt; tag for inline code.&lt;br /&gt;
&lt;br /&gt;
But on the positive side, it provides better separation of presentation and behavior, and includes some other new features and improvements that provide considerable advantages, including the ease of creating custom tags, and the improved performance. So finally I am pretty excited by the new approach and what it brings...&lt;/div&gt;&lt;div style=&quot;font-family: Calibri; font-size: 11.0pt; margin: 0in;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Calibri; font-size: 11.0pt; margin: 0in;&quot;&gt;&lt;b&gt;Moving forwards with JsViews and JsRender&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Calibri; font-size: 11.0pt; margin: 0in;&quot;&gt;Currently JsViews and JsRender include &lt;a href=&quot;http://borismoore.github.com/jsviews/demos/index.html&quot;&gt;a number of samples&lt;/a&gt; which can provide the basis for using them already for front-end development. Although there is not yet any documentation as such, and there has been no publicity (until now), they are nevertheless already being used at the prototype level by some important sites (notably by Hotmail - who are about to go into production using JsViews). That said, I anticipate some changes in JsViews, so it may be better to wait a bit longer before doing too much development using the JsViews platform. JsRender on the other hand is I think getting close to a stable Beta-release API.&lt;/div&gt;&lt;div style=&quot;font-family: Calibri; font-size: 11.0pt; margin: 0in;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Calibri; font-size: 11.0pt; margin: 0in;&quot;&gt;&lt;b&gt;Templates in jQuery UI&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
As far as jQuery UI is concerned, the current expectation is that jQuery UI will use JsRender templates, or at least use JsRender as the starting point for jQuery UI templates. No&amp;nbsp; decision has been made yet on whether jQuery UI will use JsViews for data linking and binding. &lt;/div&gt;&lt;div style=&quot;font-family: Calibri; font-size: 11.0pt; margin: 0in;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Calibri; font-size: 11.0pt; margin: 0in;&quot;&gt;&lt;b&gt;Roadmap summary:&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Calibri; font-size: 11.0pt; margin: 0in;&quot;&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;&lt;a href=&quot;https://github.com/jquery/jquery-tmpl&quot;&gt;jQuery templates&lt;/a&gt;&lt;/b&gt;: Will remain at Beta1, and be superseded by JsRender templates, and JsViews.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;a href=&quot;https://github.com/BorisMoore/jsrender&quot;&gt;JsRender&lt;/a&gt;&lt;/b&gt;: Soon move to Beta – then on to V1&lt;br /&gt;
jQueryUI plan to use JsRender. (TBD whether it will migrate to jQuery project in GitHub...)&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;a href=&quot;https://github.com/BorisMoore/jsviews&quot;&gt;JsViews&lt;/a&gt;&lt;/b&gt;: Move to Beta (after JsRender) and then on to V1 …&lt;br /&gt;
May also be used by jQueryUI&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.borismoore.com/feeds/4390082775510320361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.borismoore.com/2011/10/jquery-templates-and-jsviews-roadmap.html#comment-form' title='80 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3627888979577168137/posts/default/4390082775510320361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3627888979577168137/posts/default/4390082775510320361'/><link rel='alternate' type='text/html' href='http://www.borismoore.com/2011/10/jquery-templates-and-jsviews-roadmap.html' title='jQuery Templates and JsViews: The Roadmap'/><author><name>Boris Moore</name><uri>http://www.blogger.com/profile/17923416771395046921</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifritkTk81h2x0ZoT94F26hl67nnGg2D77YpdsHhkON627UBPredZm7VKmtJA42tSIx9eoMBwOE3fJkT3LeficQih5eGiuumKCdZZyzjWLGPxUkHxTCHpdcSwLQclpLA/s113/assets.github.com%252Fimages%252Fgravatars%252Fgravatar-140.png'/></author><thr:total>80</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3627888979577168137.post-2450299268727821193</id><published>2011-10-10T15:13:00.001-07:00</published><updated>2022-04-04T10:22:15.355-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ajax"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="jQueryTemplates"/><title type='text'>JsViews presentation at jQuery Conference, Boston</title><content type='html'>&lt;b&gt;Six months in stealth mode...&lt;/b&gt;&lt;br /&gt;
My &lt;a href=&quot;http://www.borismoore.com/2011/04/jquery-bay-area-conference-presentation.html&quot;&gt;last blog entry&lt;/a&gt; was six months ago, and concerned my jQuery Conference presentation in April 2011. Since then, no blog entries, but lots of activity on moving &amp;nbsp;jQuery Templates forwards to the &quot;next generation&quot;. It has been somewhat &#39;stealth mode&#39; - since I wanted to stabilize the design and the code before drawing too much attention to it.&amp;nbsp;That work has been progressing very well, and has now reached the point where I will gradually &amp;nbsp;bring it out from &#39;under wraps&#39;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;jQuery Conference Presentation&lt;/b&gt;&lt;br /&gt;
The first step in that process just happened - another jQuery Conference presentation: I just returned from presenting on &quot;JsViews: Next-generation jQuery Templates and Data Link&quot; at the&amp;nbsp;&lt;a href=&quot;http://events.jquery.org/2011/boston/&quot;&gt;October 2011 jQuery Conference in Boston&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Here are the conference links:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://www.slideshare.net/BorisMoore/jsviews-next-generation-jquery-templates&quot;&gt;Slides from the presentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://borismoore.github.com/jsviews/demos/jQueryConfDemosOct2011/index.html&quot;&gt;Conference Demos&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://borismoore.github.com/jsviews/demos/index.html&quot;&gt;Index of all demos&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/BorisMoore/jsviews&quot;&gt;Code&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;The presentation was very well received, and created some buzz on Twitter, as illustrated by these tweets:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;http://twitter.com/#!/thinksaydo&quot;&gt;thinksaydo&lt;/a&gt; Think Say Do, LLC&lt;/span&gt;&lt;/b&gt;: super excited about &lt;a href=&quot;https://github.com/BorisMoore/jsrender&quot;&gt;github.com/BorisMoore/jsr…&lt;/a&gt; and &lt;a href=&quot;https://github.com/BorisMoore/jsviews&quot;&gt;github.com/BorisMoore/jsv…&lt;/a&gt; being part of jQuery&#39;s future&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;http://twitter.com/#!/rascalking&quot;&gt;rascalking&lt;/a&gt; David Bonner&lt;/span&gt;&lt;/b&gt;: looking forward to playing with jsrender/jsviews. feels really comfortable, coming from a django background. &lt;a href=&quot;http://twitter.com/#!/search?q=%23jqcon&quot;&gt;#jqcon&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;http://twitter.com/#!/chinmaybijwe&quot;&gt;chinmaybijwe &lt;/a&gt;Chinmay Bijwe&lt;/span&gt;&lt;/b&gt;:&amp;nbsp;&lt;a href=&quot;http://twitter.com/#!/search?q=%23jqcon&quot;&gt;#jqcon&lt;/a&gt;&amp;nbsp;: JSViews and JSRender look great! Want to try soon.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;http://twitter.com/#!/vinbrown2&quot;&gt;vinbrown2 &lt;/a&gt;Vin Brown&lt;/span&gt;&lt;/b&gt;: seems any previously stated (by me) similarity between jsViews and xslt were overstated. this is oozing coolness.&amp;nbsp;&lt;a href=&quot;http://twitter.com/#!/search?q=%23jqcon&quot;&gt;#jqcon&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;http://twitter.com/#!/weisjohn&quot;&gt;weisjohn &lt;/a&gt;john weis&lt;/span&gt;&lt;/b&gt;: coming from the Django template world, JsRender and JsViews are the &amp;nbsp; &amp;nbsp; &amp;nbsp;hotness!&amp;nbsp;&lt;a href=&quot;http://twitter.com/#!/search?q=%23jqcon&quot;&gt;#jqcon&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;http://twitter.com/#!/abackstrom&quot;&gt;abackstrom&lt;/a&gt; Adam Backstrom&lt;/span&gt;&lt;/b&gt;: Super easy to add new template tags to jsViews. Tags can be &amp;nbsp; &amp;nbsp; &amp;nbsp;used in conditional template logic (if/else).&amp;nbsp;&lt;a href=&quot;http://twitter.com/#!/search?q=%23jqcon&quot;&gt;#jqcon&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;http://twitter.com/#!/abackstrom&quot;&gt;abackstrom &lt;/a&gt;Adam Backstrom&lt;/span&gt;&lt;/b&gt;: Progressive enhancement in jsViews: render on the server, later apply a view to the DOM, get a view that is now observing for changes&amp;nbsp;&lt;a href=&quot;http://twitter.com/#!/search?q=%23jqcon&quot;&gt;#jqcon&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;http://twitter.com/#!/shooley&quot;&gt;shooley&lt;/a&gt; Shawn Hooley&lt;/span&gt;&lt;/b&gt;: Excited about jsViews! Slick solution for dynamic rendering.&amp;nbsp;&lt;a href=&quot;http://twitter.com/#!/search?q=%23jqcon&quot;&gt;#jqcon&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;http://twitter.com/#!/addy_osmani&quot;&gt;addy_osmani &lt;/a&gt;Addy Osmani&lt;/span&gt;&lt;/b&gt;: Interesting next progression that&#39;s come out of the jQuery templatesproject: jsRender (no DOM/jQ dependence) -&lt;a href=&quot;https://github.com/BorisMoore/jsrender&quot;&gt;github.com/BorisMoore/jsr…&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;http://twitter.com/#!/clayalouise&quot;&gt;clayalouise &lt;/a&gt;clayalouise&lt;/span&gt;&lt;/b&gt;: Love the design for JsViews! I&#39;ve been looking for a better than knockoutjs&amp;nbsp;&lt;a href=&quot;http://twitter.com/#!/search?q=%23jqcon&quot;&gt;#jqcon&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;http://twitter.com/#!/monkeysort&quot;&gt;monkeysort&lt;/a&gt; Derek Meyer&lt;/span&gt;&lt;/b&gt;: Great talk by Boris Moore on the jQuery Templates replacementJsViews. Could have used a longer time slot for a public launch.&amp;nbsp;&lt;a href=&quot;http://twitter.com/#!/search?q=%23jqcon&quot;&gt;#jqcon&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;http://twitter.com/#!/ScottRHuff&quot;&gt;ScottRHuff&lt;/a&gt; Scott Huff&lt;/span&gt;&lt;/b&gt;: Exciting and thought provoking talk from Boris Moore on JsViews&amp;nbsp;&lt;a href=&quot;http://twitter.com/#!/search?q=%23jqcon&quot;&gt;#jqcon&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;a href=&quot;http://twitter.com/#!/_jeffrose&quot;&gt;_jeffrose&lt;/a&gt; Jeff Rose&lt;/span&gt;&lt;/b&gt;: Wish Boris Moore&#39;s presentation on JsViews was longer. Looks very impressive.&amp;nbsp;&lt;a href=&quot;http://twitter.com/#!/search?q=%23jqcon&quot;&gt;#jqcon&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;One aspect that triggered a lot of excitement and questions was progressive enhancement, using the same JsRender template on the server as on the client, and then activating the content in the client by calling $.link(). &amp;nbsp;(&lt;a href=&quot;http://borismoore.github.com/jsviews/demos/jQueryConfDemosOct2011/11_server-rendered_client-activated.html&quot;&gt;See this demo&lt;/a&gt;)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;And now...&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;From this point I&#39;ll be working towards a documented Beta release - not too far away. More of that in an upcoming post on &amp;nbsp;&quot;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #333333; font-family: &amp;quot;trebuchet ms&amp;quot;, verdana, arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;a href=&quot;http://www.borismoore.com/2011/10/jquery-templates-and-jsviews-roadmap.html&quot;&gt;jQuery Templates and JsViews: The Roadmap&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&quot;.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.borismoore.com/feeds/2450299268727821193/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.borismoore.com/2011/10/jsviews-presentation-at-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3627888979577168137/posts/default/2450299268727821193'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3627888979577168137/posts/default/2450299268727821193'/><link rel='alternate' type='text/html' href='http://www.borismoore.com/2011/10/jsviews-presentation-at-jquery.html' title='JsViews presentation at jQuery Conference, Boston'/><author><name>Boris Moore</name><uri>http://www.blogger.com/profile/17923416771395046921</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifritkTk81h2x0ZoT94F26hl67nnGg2D77YpdsHhkON627UBPredZm7VKmtJA42tSIx9eoMBwOE3fJkT3LeficQih5eGiuumKCdZZyzjWLGPxUkHxTCHpdcSwLQclpLA/s113/assets.github.com%252Fimages%252Fgravatars%252Fgravatar-140.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3627888979577168137.post-6473568363716800389</id><published>2011-04-21T12:40:00.001-07:00</published><updated>2022-04-04T11:35:15.652-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ajax"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="jQueryTemplates"/><title type='text'>jQuery Bay Area Conference - presentation, meetings and movements</title><content type='html'>&lt;div class=&quot;MsoNormal&quot;&gt;I just got back from speaking at this jQuery Conference Bay Area Conference last weekend, so this is a quick blog to provide some links.&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;This was the official jQuery Conference, which is held twice a year. So all the key members of the jQuery team and community were there. &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;29&amp;nbsp;&lt;a href=&quot;http://events.jquery.org/2011/sf-bay-area/schedule/&quot; target=&quot;_blank&quot;&gt;presentations&lt;/a&gt;&amp;nbsp;over two days&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Symbol;&quot;&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;About 500 participants&lt;/li&gt;
&lt;li&gt;Other presenters included John Resig, Yehuda Katz, Paul Irish, and others who you can see&amp;nbsp;&lt;a href=&quot;http://events.jquery.org/2011/sf-bay-area/speakers/&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;b&gt;My Presentation&lt;/b&gt;&lt;br /&gt;
I spoke about “&lt;i&gt;Harnessing jQuery Templates and Data Link, to build dynamic data-driven browser apps&lt;/i&gt;”.&lt;br /&gt;
The presentation was in three sections:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Discussion of App Scenarios for data and templates in the client, and example &lt;a href=&quot;http://jquery.github.com/jquery-tmpl/demos/movies/PagesCore/movies.html&quot; target=&quot;_blank&quot;&gt;demo app&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Templates today: &lt;a href=&quot;http://jquery.github.com/jquery-tmpl/demos/step-by-step.html&quot; target=&quot;_blank&quot;&gt;walkthrough&lt;/a&gt; of all the main features&lt;/li&gt;
&lt;li&gt;Templates ‘tomorrow’: preview of current work on really fast responsive interactive client-side views, integrating jQuery Templates and Data Linking. (&lt;a href=&quot;http://borismoore.github.com/jsviews/demos/index.html&quot; target=&quot;_blank&quot;&gt;Demo&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;The slides are&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #1f497d;&quot;&gt;&lt;a href=&quot;http://www.slideshare.net/BorisMoore/harness-jquery-templates-and-data-link&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&lt;/span&gt;.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraph&quot; style=&quot;margin-left: 1.0in; mso-list: l1 level2 lfo2; text-indent: -.25in;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;b&gt;Meetings and movements&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;I had some great meetings and discussions with other developers and open-source community members. Definitely declarative binding of templated views to observable data is ‘in the air’, and there is clearly a huge interest in related scenarios and patterns like client-side MVVM or MVC. We were already doing much of this in Microsoft AJAX Preview 6 with observable objects and arrays and declarative bindings in templates, but it was not known to many. My hope is that the current &lt;a href=&quot;https://github.com/BorisMoore/jsviews&quot; target=&quot;_blank&quot;&gt;JsViews&lt;/a&gt; integration of data link and templating we are working on will break new ground in this area, but this time within a simpler leaner approach, and in synergy with jQuery. People are looking for fast lightweight declarative frameworks of this kind.&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;border: 1px solid #999; padding: 5px;&quot;&gt;&lt;i&gt;Update: &lt;/i&gt;I have published the demo pages above on GitHub as live pages, and have updated the links above to point to the new pages.&lt;br /&gt;
&lt;br /&gt;
The new content is as follows:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Live demo pages of current jQuery Templates:&amp;nbsp;&lt;a href=&quot;http://jquery.github.com/jquery-tmpl/demos/step-by-step.html&quot; target=&quot;_blank&quot;&gt;jquery.github.com/jquery-tmpl/demos/step-by-step.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Demo pages of preview work of pure string-based rendering, for better performance in read-only scenarios:&amp;nbsp;&lt;a href=&quot;http://borismoore.github.com/jsrender/demos/index.html&quot; target=&quot;_blank&quot;&gt;borismoore.github.com/jsrender/demos/index.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Demo pages of JsViews, for interactive pages while still using string-based rendering, for better performance in read-only scenarios:&amp;nbsp;&lt;a href=&quot;http://borismoore.github.com/jsviews/demos/index.html&quot; target=&quot;_blank&quot;&gt;borismoore.github.com/jsviews/demos/index.html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.borismoore.com/feeds/6473568363716800389/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.borismoore.com/2011/04/jquery-bay-area-conference-presentation.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3627888979577168137/posts/default/6473568363716800389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3627888979577168137/posts/default/6473568363716800389'/><link rel='alternate' type='text/html' href='http://www.borismoore.com/2011/04/jquery-bay-area-conference-presentation.html' title='jQuery Bay Area Conference - presentation, meetings and movements'/><author><name>Boris Moore</name><uri>http://www.blogger.com/profile/17923416771395046921</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifritkTk81h2x0ZoT94F26hl67nnGg2D77YpdsHhkON627UBPredZm7VKmtJA42tSIx9eoMBwOE3fJkT3LeficQih5eGiuumKCdZZyzjWLGPxUkHxTCHpdcSwLQclpLA/s113/assets.github.com%252Fimages%252Fgravatars%252Fgravatar-140.png'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3627888979577168137.post-5455325010672456186</id><published>2011-02-14T16:02:00.001-08:00</published><updated>2022-04-04T11:35:52.382-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="jQueryTemplates"/><title type='text'>In the Pipeline</title><content type='html'>Things have been busy, and I have been way less active on this blog than I intended.&lt;br /&gt;
&lt;br /&gt;
But there&#39;s a good side to that: there are some important updates and improvements in the pipeline, and that&#39;s what&#39;s been keeping me busy...&lt;br /&gt;
&lt;br /&gt;
I have been working in three main areas:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;A Beta2 release of &lt;a href=&quot;https://github.com/jquery/jquery-tmpl&quot;&gt;jQuery Templates&lt;/a&gt;, which is planned for April. &lt;br /&gt;
&lt;br /&gt;
This should address a number of issues and requests that have been expressed. One new feature planned for Beta2 is an API to render a template against data, straight to an HTML string, without any dependency on an HTML DOM. This can then be used for direct insertion as innerHTML, and will also enable easy use of jQuery Templates for rendering on the server, as well as improved performance of jQuery Templates when used in the browser for read-only scenarios. &lt;br /&gt;
&lt;br /&gt;
At the same time all the power of jQuery Templates will still be there, for those that choose to render templates with the full DOM activation phase included, as at present. &lt;br /&gt;
&lt;br /&gt;
In the case of server rendering, the idea is that the DOM activation can still happen in the browser, against server-rendered HTML. So progressive enhancement scenarios should be relatively easy to achieve...&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;A Beta2 release of &lt;a href=&quot;https://github.com/jquery/jquery-datalink&quot;&gt;jQuery Data Link&lt;/a&gt;, also planned for April.&lt;br /&gt;
&lt;br /&gt;
This involves significant changes to the current Data Link implementation, with much broader scenario coverage than at present. I hope to push my present code for this new version to a Beta2 branch of jQuery Data Link soon, for those who are curious about the ongoing design.&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Finally, I have been working on a new script loader: &lt;a href=&quot;https://github.com/BorisMoore/JsDefer&quot;&gt;JsDefer&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
You can find the current code for JsDefer here &lt;a href=&quot;https://github.com/BorisMoore/JsDefer&quot;&gt;https://github.com/BorisMoore/JsDefer&lt;/a&gt;. This script loader shares a number of features with a script loader which we had released a long way back within the Microsoft AJAX platform (see &lt;a href=&quot;http://aspnet.codeplex.com/releases/view/34488&quot;&gt;http://aspnet.codeplex.com/releases/view/34488&lt;/a&gt;). &lt;br /&gt;
&lt;br /&gt;
It comes in two versions - a jQuery plugin, and another version that does not require jQuery to be loaded in the page. &lt;br /&gt;
&lt;br /&gt;
As well as providing some of the features we had in our Microsoft AJAX script loader, JsDefer also takes advantage of the concept of a &quot;Deferred&quot; object, to facilitate working with asynchronous processes (in particular, of course, the process of dynamically fetching a script and loading it into the page). The recent jQuery 1.5 release uses Deferred objects in the context of AJAX requests, so JsDefer is designed to work &#39;hand in glove&#39; with jQuery 1.5 AJAX requests, among other scenarios.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
I plan to publish a blog post on JsDefer very soon, with an initial dive into how it works and the scenarios it addresses.&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.borismoore.com/feeds/5455325010672456186/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.borismoore.com/2011/02/in-pipeline.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3627888979577168137/posts/default/5455325010672456186'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3627888979577168137/posts/default/5455325010672456186'/><link rel='alternate' type='text/html' href='http://www.borismoore.com/2011/02/in-pipeline.html' title='In the Pipeline'/><author><name>Boris Moore</name><uri>http://www.blogger.com/profile/17923416771395046921</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifritkTk81h2x0ZoT94F26hl67nnGg2D77YpdsHhkON627UBPredZm7VKmtJA42tSIx9eoMBwOE3fJkT3LeficQih5eGiuumKCdZZyzjWLGPxUkHxTCHpdcSwLQclpLA/s113/assets.github.com%252Fimages%252Fgravatars%252Fgravatar-140.png'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3627888979577168137.post-5219992015095126253</id><published>2010-10-04T07:00:00.001-07:00</published><updated>2022-04-04T11:36:42.719-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ajax"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="jQueryTemplates"/><title type='text'>jQuery Templates is now an Official jQuery Plugin</title><content type='html'>&lt;div style=&quot;border: 1px solid #999; padding: 5px; margin-top:12px;&quot;&gt;&lt;i&gt;&lt;b&gt;Update - October 2011&lt;/b&gt;&lt;/i&gt;: Please see recent post: &quot;&lt;a href=&quot;http://www.borismoore.com/2011/10/jquery-templates-and-jsviews-roadmap.html&quot;&gt;jQuery Templates and JsViews: The Roadmap&lt;/a&gt;&quot; for current information on the jQuery Templates roadmap.  &lt;/div&gt;&lt;br /&gt;
Joint announcements were made today by jQuery and Microsoft that jQuery has decided to make the &lt;em&gt;jQuery Templates&lt;/em&gt;, &lt;em&gt;Data Link&lt;/em&gt;, and &lt;em&gt;Globalization&lt;/em&gt; plugins &lt;em&gt;&#39;Official jQuery Plugins&#39;&lt;/em&gt;. &lt;br /&gt;
&lt;br /&gt;
See the following blog announcements for more details:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://weblogs.asp.net/scottgu/archive/2010/10/04/jquery-templates-data-link-and-globalization-accepted-as-official-jquery-plugins.aspx&quot;&gt;jQuery Templates, Data Link, and Globalization Accepted as Official jQuery Plugins&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://blog.jquery.com/2010/10/04/new-official-jquery-plugins-provide-templating-data-linking-and-globalization/&quot;&gt;New Official jQuery Plugins Provide Templating, Data Linking and Globalization&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;Of course I am very pleased by this news, which is the result of some active collaboration with members of the jQuery team. &lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;What this means:&lt;/h3&gt;&lt;h4&gt;A new home for the plugins...&lt;/h4&gt;First thing it means, of course, is that the repositories where those plugins live have now moved to a new home. The code that was at GitHub under the &lt;a href=&quot;http://github.com/nje/&quot;&gt;http://github.com/nje/&lt;/a&gt; project has been moved to the following repositories under the &lt;a href=&quot;http://github.com/jquery/&quot;&gt;jQuery&lt;/a&gt; project:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;jQuery Templates: &lt;a href=&quot;http://github.com/jquery/jquery-tmpl/&quot;&gt;http://github.com/jquery/jquery-tmpl/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;jQuery DataLink: &lt;a href=&quot;http://github.com/jquery/jquery-datalink/&quot;&gt;http://github.com/jquery/jquery-datalink/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;jQuery Globalization: &lt;a href=&quot;http://github.com/jquery/jquery-global/&quot;&gt;http://github.com/jquery/jquery-global/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;The above projects constitute &lt;em&gt;Beta&lt;/em&gt; releases of the plugins.&lt;br /&gt;
&lt;br /&gt;
The previous repositories under the &lt;a href=&quot;http://github.com/nje/&quot;&gt;http://github.com/nje/&lt;/a&gt; project may continue to exist, but if they do then it will be for exploratory work which may or may not find its way back into the official plugins in a later update.  &lt;br /&gt;
&lt;h4&gt;New documentation on the jQuery API site...&lt;/h4&gt;Another very important consequence of this announcement is that from now on, documentation for the &lt;em&gt;jQuery Templates plugin&lt;/em&gt; and for the &lt;em&gt;jQuery Data Link plugin&lt;/em&gt; will be available on the jQuery API site at &lt;a href=&quot;http://api.jquery.com/&quot;&gt;http://api.jquery.com&lt;/a&gt;. &lt;br /&gt;
&lt;br /&gt;
From today, new documentation is available there, which is much more complete than the previous Wiki provided on our repository.&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;The following link provides a list of all the documentation topics for the jQuery Templates plugin:&lt;br /&gt;
&lt;a href=&quot;http://api.jquery.com/category/plugins/templates/&quot;&gt;http://api.jquery.com/category/plugins/templates&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;And the following link provides a list of all the documentation topics for the jQuery Data Link plugin:&lt;br /&gt;
&lt;a href=&quot;http://api.jquery.com/category/plugins/data-link/&quot;&gt;http://api.jquery.com/category/plugins/data-link&lt;/a&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;One goal I have with this blog entry is to give you an idea of how the new documentation for jQuery Templates is organized, and to provide a convenient set of links to the various topics. Each topic concerns either a method from the plugin API, or a template tag that you can use within your template markup to obtain some of the rich features that this plugin provides. &lt;br /&gt;
&lt;h4&gt;&lt;em&gt;API&lt;/em&gt; documentation topics:&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;jQuery.tmpl() and .tmpl():&lt;/strong&gt; &lt;br /&gt;
These APIs are used to &lt;em&gt;render&lt;/em&gt; a jQuery template:&lt;br /&gt;
&lt;a href=&quot;http://api.jquery.com/tmpl&quot;&gt;http://api.jquery.com/tmpl&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://api.jquery.com/jQuery.tmpl&quot;&gt;http://api.jquery.com/jQuery.tmpl&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;jQuery.tmplItem() and .tmplItem():&lt;/strong&gt; &lt;br /&gt;
These APIs are used to &lt;em&gt;find&lt;/em&gt; a jQuery template instance, and are crucial for providing interactivity:&lt;br /&gt;
&lt;a href=&quot;http://api.jquery.com/tmplitem&quot;&gt;http://api.jquery.com/tmplitem&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://api.jquery.com/jQuery.tmplitem&quot;&gt;http://api.jquery.com/jQuery.tmplitem&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;jQuery.template() and .template():&lt;/strong&gt; &lt;br /&gt;
These APIs are used to &lt;em&gt;compile or store&lt;/em&gt; a jQuery template, and are particularly useful for scenarios where templates are loaded in the form of strings, such as templates retreived remotely:&lt;br /&gt;
&lt;a href=&quot;http://api.jquery.com/template&quot;&gt;http://api.jquery.com/template&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://api.jquery.com/jQuery.template&quot;&gt;http://api.jquery.com/jQuery.template&lt;/a&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;h4&gt;&lt;em&gt;Template tag&lt;/em&gt; documentation topics:&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;${...}:&lt;/strong&gt; &lt;br /&gt;
This tag is used to &lt;em&gt;evaluate fields or JavaScript expressions&lt;/em&gt; within templates:&lt;br /&gt;
&lt;a href=&quot;http://api.jquery.com/template-tag-equal&quot;&gt;http://api.jquery.com/template-tag-equal&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;{{each ...}}...{{/each}}:&lt;/strong&gt; &lt;br /&gt;
This tag is used used to &lt;em&gt;iterate&lt;/em&gt; within a template (without creating template items):&lt;br /&gt;
&lt;a href=&quot;http://api.jquery.com/template-tag-each&quot;&gt;http://api.jquery.com/template-tag-each&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;{{if ...}}...{{else ...}}...{{/if}}:&lt;/strong&gt; &lt;br /&gt;
This tag is used used to create &lt;em&gt;conditional sections&lt;/em&gt; within templates:&lt;br /&gt;
&lt;a href=&quot;http://api.jquery.com/template-tag-if&quot;&gt;http://api.jquery.com/template-tag-if&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://api.jquery.com/template-tag-else&quot;&gt;http://api.jquery.com/template-tag-else&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;{{html ...}}:&lt;/strong&gt; &lt;br /&gt;
This tag is used used to &lt;em&gt;insert markup obtained from data&lt;/em&gt; within templates:&lt;br /&gt;
&lt;a href=&quot;http://api.jquery.com/template-tag-html&quot;&gt;http://api.jquery.com/template-tag-html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;{{tmpl ...}}:&lt;/strong&gt; &lt;br /&gt;
This tag is used used for &lt;em&gt;composition and iteration&lt;/em&gt; within templates (and creating new template items for each nested rendered template):&lt;br /&gt;
&lt;a href=&quot;http://api.jquery.com/template-tag-tmpl&quot;&gt;http://api.jquery.com/template-tag-tmpl&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;{{wrap ...}}...{{/wrap}}:&lt;/strong&gt; &lt;br /&gt;
This tag is used used for &lt;em&gt;composition and iteration, along with incorporation of wrapped HTML&lt;/em&gt; within templates:&lt;br /&gt;
&lt;a href=&quot;http://api.jquery.com/template-tag-wrap&quot;&gt;http://api.jquery.com/template-tag-wrap&lt;/a&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
I hope this new documentation will help you to take advantage of some of the rich features of jQuery Templates. &lt;br /&gt;
&lt;br /&gt;
For extra help I&#39;m expecting soon to provide some more blog entries that continue the series &lt;a href=&quot;http://www.borismoore.com/2010/09/introducing-jquery-templates-1-first.html&quot;&gt;Introducing jQuery Templates&lt;/a&gt;...</content><link rel='replies' type='application/atom+xml' href='http://www.borismoore.com/feeds/5219992015095126253/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.borismoore.com/2010/10/jquery-templates-is-now-official-jquery.html#comment-form' title='61 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3627888979577168137/posts/default/5219992015095126253'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3627888979577168137/posts/default/5219992015095126253'/><link rel='alternate' type='text/html' href='http://www.borismoore.com/2010/10/jquery-templates-is-now-official-jquery.html' title='jQuery Templates is now an Official jQuery Plugin'/><author><name>Boris Moore</name><uri>http://www.blogger.com/profile/17923416771395046921</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifritkTk81h2x0ZoT94F26hl67nnGg2D77YpdsHhkON627UBPredZm7VKmtJA42tSIx9eoMBwOE3fJkT3LeficQih5eGiuumKCdZZyzjWLGPxUkHxTCHpdcSwLQclpLA/s113/assets.github.com%252Fimages%252Fgravatars%252Fgravatar-140.png'/></author><thr:total>61</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3627888979577168137.post-2182287749356001745</id><published>2010-09-23T16:50:00.002-07:00</published><updated>2022-04-04T11:37:24.617-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ajax"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="jQueryTemplates"/><title type='text'>Introducing jQuery Templates 1: First Steps</title><content type='html'>&lt;script type=&quot;text/javascript&quot;&gt;
(function(b){var c=0,a,e,k=b.tmpl,g=b.template,l=jQuery.fn.domManip,d,f=&#39;&lt;table class=&quot;plusViewerTabs&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th class=&quot;header_${activeIndex === 0}&quot;&gt;Result&lt;/th&gt;&lt;th class=&quot;header_${activeIndex === 1}&quot;&gt;Data&lt;/th&gt;{{each tmpls}}&lt;th class=&quot;header_${activeIndex === 2 + $index}&quot;&gt;${$value.name}&lt;/th&gt;{{/each}}&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;${tmpls.length + 2}&quot;&gt;{{if activeIndex === 0}}{{wrap wrapper}}{{tmpl(data) tmpls[0].tmpl}}{{/wrap}}{{else activeIndex === 1}}&lt;textarea{{if !editable}} readonly{{/if}}&gt;${$item.getData()}&lt;/textarea&gt;{{else}}&lt;textarea{{if !editable}} readonly{{/if}}&gt;${tmpls[activeIndex - 2].markup}&lt;/textarea&gt;{{/if}}&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&#39;;f=b.template(null,f);b.tmpl=function(f,d,e,b){if(!c&amp;&amp;!b)a={tmpls:[],tmplNames:{},activeIndex:0,data:d};return k(f,d,e,b)};b.extend(b.tmpl,k);b.template=function(d,e){var f,h,b=e;if(a&amp;&amp;a.tmplNames[d])return a.tmpls[a.tmplNames[d]-1].tmpl;else if(b&amp;&amp;!c){if(b instanceof jQuery)b=e[0]||{};if(b.nodeType){f=&quot;#&quot;+b.getAttribute(&quot;id&quot;);b=b.innerHTML}if(typeof b===&quot;string&quot;){h=f||b;if(!a.tmplNames[h]){a.tmpls.push({markup:b,tmpl:b=g(d,e),name:f||&quot;Template&quot;});a.tmplNames[h]=a.tmpls.length;return b}}}return g(d,e)};jQuery.fn.extend({domManip:function(){if(!c){var f=0,e=this[0],d=b(e),g;d.addClass(&quot;plusViewerTarget&quot;);while(e!==document.body){if(d.hasClass(&quot;plusViewer&quot;)){a.wrapper=e.innerHTML;a.depth=f;a.persist=d.hasClass(&quot;persist&quot;),g=a.tabs=d.hasClass(&quot;tabs&quot;),a.editable=a.persist||d.hasClass(&quot;edit&quot;);d.data(&quot;plusViewerState&quot;,a);d.data(&quot;plusViewerInitialState&quot;,b.extend(true,{},a));a=null;break}d=b(e=e.parentNode);f++}}var i=l.apply(this,arguments);if(g){c++;h(d);c--}else!a&amp;&amp;d.addClass(&quot;plusTargetContainer&quot;);return i}});function h(c){a=c.data(&quot;plusViewerState&quot;);if(a.wrapper){var d=a.wrapper.split(&quot;plusViewerTarget&quot;);d[1]=d[1].replace(/&gt;[\w\s]*&lt;/,&quot;&gt;{{html $item.html()}}&lt;/&quot;);a.wrapper=d.join(&quot;plusViewerTarget&quot;)}else a.wrapper=&quot;{{! }}{{html $item.html()}}&quot;;if(a.tabs)if(c.hasClass(&quot;data&quot;))a.activeIndex=1;else b.each(a.tmplNames,function(d,b){if(c.hasClass(d)){a.activeIndex=b+1;return false}});b.tmpl(f,a,{getData:j}).appendTo(c.empty());a.tabs&amp;&amp;a.activeIndex&amp;&amp;i(c)}function i(c){var a=b(c).find(&quot;textarea&quot;)[0];if(a){a.style.overflow=&quot;hidden&quot;;a.scrollHeight;a.style.height=a.scrollHeight+&quot;px&quot;;a.style.overflow=&quot;auto&quot;}}function j(){return JSON.stringify(this.data.data,null,&quot;\t&quot;)}b(function(){d=document.createElement(&quot;div&quot;);d.innerHTML=&quot;+&quot;;d.className=&quot;plusButton&quot;;document.body.appendChild(d);b(&quot;.plusViewer&quot;).delegate(&quot;.header_false&quot;,&quot;click&quot;,function(){var f,d=b.tmplItem(this),e=d.data.activeIndex=b(this).index();c++;a=d.data;d.update();a=null;c--;if(!e)return;i(d.nodes[0])}).delegate(&quot;textarea&quot;,&quot;change&quot;,function(){var a=b.tmplItem(this);if(a.data.activeIndex===1)try{a.data.data=b.parseJSON(this.value)}catch(g){alert(&quot;Syntax error!&quot;);this.value=j.call(a)}else{c++;var e=this.value,f=b.template(null,e),d=a.data.tmpls[a.data.activeIndex-2];try{f(b,b.extend({},a,{data:a.data.data[0]||a.data.data}));a.data.targetMarkup=e;d.markup=e;d.tmpl=f}catch(g){alert(&quot;Syntax error!&quot;);this.value=d.markup}c--}});b(&quot;.plusTargetContainer&quot;).on(&quot;mouseenter&quot;,function(c){if(c.relatedTarget&amp;&amp;c.relatedTarget.className===&quot;plusButton&quot;)return;if(e)e.style.border=&quot;solid transparent 1px&quot;;e=this;d.innerHTML=b(this).hasClass(&quot;activeViewer&quot;)?&quot;-&quot;:&quot;+&quot;;var a=b(this).offset();this.style.border=&quot;solid green 1px&quot;;d.style.left=a.left+&quot;px&quot;;d.style.top=a.top+&quot;px&quot;;d.style.display=&quot;block&quot;});b(&quot;.plusTargetContainer&quot;).on(&quot;mouseleave&quot;,function(a){if(a.relatedTarget&amp;&amp;a.relatedTarget.className===&quot;plusButton&quot;)return;e=null;d.style.display=&quot;none&quot;;this.style.border=&quot;solid transparent 1px&quot;});b(&quot;.plusButton&quot;).click(function(){c++;var d=b(e);if(this.innerHTML===&quot;+&quot;){h(d);d.addClass(&quot;activeViewer&quot;);this.innerHTML=&quot;-&quot;}else{var f=b(e).children().first().tmplItem(),j=f.nodes,g=document.createElement(&quot;div&quot;),k=j[0].parentNode,l=f.data.depth,i=d.data(&quot;plusViewerInitialState&quot;);g.innerHTML=i.wrapper;if(f.data.persist){a=f.data;d.data(&quot;plusViewerState&quot;,a)}else{a=i;d.data(&quot;plusViewerState&quot;,b.extend(true,{},a))}b.tmpl(a.tmpls[0].tmpl,a.data).appendTo(b(g).find(&quot;.plusViewerTarget&quot;));jQuery(j).remove();k.innerHTML=g.innerHTML;this.innerHTML=&quot;+&quot;;d.removeClass(&quot;activeViewer&quot;)}a=null;c--})})})(jQuery);if(!this.JSON)this.JSON={};(function(){function c(a){return a&lt;10?&quot;0&quot;+a:a}if(typeof Date.prototype.toJSON!==&quot;function&quot;){Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+&quot;-&quot;+c(this.getUTCMonth()+1)+&quot;-&quot;+c(this.getUTCDate())+&quot;T&quot;+c(this.getUTCHours())+&quot;:&quot;+c(this.getUTCMinutes())+&quot;:&quot;+c(this.getUTCSeconds())+&quot;Z&quot;:null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}}var h=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f=/[\\\&quot;\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,a,d,i={&quot;\b&quot;:&quot;\\b&quot;,&quot;\t&quot;:&quot;\\t&quot;,&quot;\n&quot;:&quot;\\n&quot;,&quot;\f&quot;:&quot;\\f&quot;,&quot;\r&quot;:&quot;\\r&quot;,&#39;&quot;&#39;:&#39;\\&quot;&#39;,&quot;\\&quot;:&quot;\\\\&quot;},b;function g(a){f.lastIndex=0;return f.test(a)?&#39;&quot;&#39;+a.replace(f,function(a){var b=i[a];return typeof b===&quot;string&quot;?b:&quot;\\u&quot;+(&quot;0000&quot;+a.charCodeAt(0).toString(16)).slice(-4)})+&#39;&quot;&#39;:&#39;&quot;&#39;+a+&#39;&quot;&#39;}function e(m,n){var i,j,h,k,l=a,f,c=n[m];if(c&amp;&amp;typeof c===&quot;object&quot;&amp;&amp;typeof c.toJSON===&quot;function&quot;)c=c.toJSON(m);if(typeof b===&quot;function&quot;)c=b.call(n,m,c);switch(typeof c){case&quot;string&quot;:return g(c);case&quot;number&quot;:return isFinite(c)?String(c):&quot;null&quot;;case&quot;boolean&quot;:case&quot;null&quot;:return String(c);case&quot;object&quot;:if(!c)return&quot;null&quot;;a+=d;f=[];if(Object.prototype.toString.apply(c)===&quot;[object Array]&quot;){k=c.length;for(i=0;i&lt;k;i+=1)f[i]=e(i,c)||&quot;null&quot;;h=f.length===0?&quot;[]&quot;:a?&quot;[\n&quot;+a+f.join(&quot;,\n&quot;+a)+&quot;\n&quot;+l+&quot;]&quot;:&quot;[&quot;+f.join(&quot;,&quot;)+&quot;]&quot;;a=l;return h}if(b&amp;&amp;typeof b===&quot;object&quot;){k=b.length;for(i=0;i&lt;k;i+=1){j=b[i];if(typeof j===&quot;string&quot;){h=e(j,c);h&amp;&amp;f.push(g(j)+(a?&quot;: &quot;:&quot;:&quot;)+h)}}}else for(j in c)if(Object.hasOwnProperty.call(c,j)){h=e(j,c);h&amp;&amp;f.push(g(j)+(a?&quot;: &quot;:&quot;:&quot;)+h)}h=f.length===0?&quot;{}&quot;:a?&quot;{\n&quot;+a+f.join(&quot;,\n&quot;+a)+&quot;\n&quot;+l+&quot;}&quot;:&quot;{&quot;+f.join(&quot;,&quot;)+&quot;}&quot;;a=l;return h}}if(typeof JSON.stringify!==&quot;function&quot;)JSON.stringify=function(h,c,f){var g;a=&quot;&quot;;d=&quot;&quot;;if(typeof f===&quot;number&quot;)for(g=0;g&lt;f;g+=1)d+=&quot; &quot;;else if(typeof f===&quot;string&quot;)d=f;b=c;if(c&amp;&amp;typeof c!==&quot;function&quot;&amp;&amp;(typeof c!==&quot;object&quot;||typeof c.length!==&quot;number&quot;))throw new Error(&quot;JSON.stringify&quot;);return e(&quot;&quot;,{&quot;&quot;:h})};if(typeof JSON.parse!==&quot;function&quot;)JSON.parse=function(a,c){var b;function d(f,g){var b,e,a=f[g];if(a&amp;&amp;typeof a===&quot;object&quot;)for(b in a)if(Object.hasOwnProperty.call(a,b)){e=d(a,b);if(e!==undefined)a[b]=e;else delete a[b]}return c.call(f,g,a)}a=String(a);h.lastIndex=0;if(h.test(a))a=a.replace(h,function(a){return&quot;\\u&quot;+(&quot;0000&quot;+a.charCodeAt(0).toString(16)).slice(-4)});if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:[&quot;\\\/bfnrt]|u[0-9a-fA-F]{4})/g,&quot;@&quot;).replace(/&quot;[^&quot;\\\n\r]*&quot;|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,&quot;]&quot;).replace(/(?:^|:|,)(?:\s*\[)+/g,&quot;&quot;))){b=eval(&quot;(&quot;+a+&quot;)&quot;);return typeof c===&quot;function&quot;?d({&quot;&quot;:b},&quot;&quot;):b}throw new SyntaxError(&quot;JSON.parse&quot;);}})();
&lt;/script&gt;
&lt;hr /&gt;






&lt;strong&gt;&lt;em&gt;UPDATE:&lt;/em&gt;&lt;/strong&gt; A joint announcement has just been made by jQuery and Microsoft that the &lt;em&gt;jQuery Templates&lt;/em&gt;, &lt;em&gt;Data Link&lt;/em&gt; and &lt;em&gt;Globalization&lt;/em&gt; plugins are now &lt;em&gt;&#39;Official jQuery Plugins&#39;&lt;/em&gt;. In addition, a full set of documentation for the &lt;em&gt;jQuery Templates&lt;/em&gt; and &lt;em&gt;Data Link&lt;/em&gt; plugins is now available on the &lt;a href=&quot;http://api.jquery.com/&quot;&gt;http://api.jquery.com/&lt;/a&gt; site. 

See my next post: &lt;a href=&quot;http://www.borismoore.com/2010/10/jquery-templates-is-now-official-jquery.html&quot;&gt;jQuery Templates is now an Official jQuery Plugin&lt;/a&gt; for details.
&lt;hr /&gt;








In my &lt;a href=&quot;http://www.borismoore.com/2010/09/from-microsoft-to-open-source.html&quot;&gt;last post&lt;/a&gt;, I said I planned to start a series of posts introducing &lt;i&gt;jQuery Templates&lt;/i&gt;. This is the first of that series. This post also introduces the &lt;a href=&quot;#sampleViewer&quot;&gt;Sample Viewer&lt;/a&gt;, which you can use to try out your own jQuery templates.

In a sense &lt;em&gt;jQuery Templates&lt;/em&gt; consists of &lt;em&gt;three&lt;/em&gt; plugins: &lt;em&gt;.tmpl(), .tmplItem() &lt;/em&gt;and &lt;em&gt;.template()&lt;/em&gt;, and each one comes in two flavors: &lt;em&gt;instance &lt;/em&gt;plugin and &lt;em&gt;static &lt;/em&gt;plugin.

From a basic scenario point of view, it is like this:
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;.tmpl()&lt;/em&gt;: &lt;em&gt;Render&lt;/em&gt; the template&lt;/li&gt;
&lt;li&gt;&lt;em&gt;.tmplItem()&lt;/em&gt;: &lt;em&gt;Find&lt;/em&gt; the template item&lt;/li&gt;
&lt;li&gt;&lt;em&gt;.template()&lt;/em&gt;: &lt;em&gt;Compile/Store&lt;/em&gt; the template&lt;/li&gt;
&lt;/ul&gt;The template itself is any HTML markup, along with any of a set of &lt;i&gt;template tags&lt;/i&gt; which enable some very rich scenarios for creating data-driven UI.

The current set of tags that are supported in jQuery templates are:
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;${...}&lt;/em&gt;: &lt;em&gt;Evaluate&lt;/em&gt; fields or expression&lt;/li&gt;
&lt;li&gt;&lt;em&gt;{{each ...}}...{{/each}}&lt;/em&gt;: &lt;em&gt;Iterate&lt;/em&gt; without creating template items&lt;/li&gt;
&lt;li&gt;&lt;em&gt;{{if ...}}...{{else ...}}...{{/if}}&lt;/em&gt;: &lt;em&gt;Conditional&lt;/em&gt; sections&lt;/li&gt;
&lt;li&gt;&lt;em&gt;{{html ...}}&lt;/em&gt;: &lt;em&gt;Insert markup&lt;/em&gt; from data &lt;/li&gt;
&lt;li&gt;&lt;em&gt;{{tmpl ...}}&lt;/em&gt;: &lt;em&gt;Composition&lt;/em&gt;, as template items&lt;/li&gt;
&lt;li&gt;&lt;em&gt;{{wrap ...}}...{{/wrap}}&lt;/em&gt;: &lt;em&gt;Composition&lt;/em&gt;, plus incorporation of wrapped HTML&lt;/li&gt;
&lt;/ul&gt;This blog will be the first of a series in which I hope to drill into the role of each of those APIs and tags. 

For this first blog, we&#39;ll start with the simplest possible scenario. We&#39;ll use just the &lt;em&gt;.tmpl()&lt;/em&gt; API, for rendering a template, and the &lt;em&gt;${...}&lt;/em&gt; template tag, for inserting data values into the rendered output...

So here goes:
&lt;h4&gt;








Rendering a template using local data within the page&lt;/h4&gt;Here is some data:
&lt;pre class=&quot;brush: js;&quot;&gt;var movies = [
    { Name: &quot;The Red Violin&quot;, ReleaseYear: &quot;1998&quot; },
    { Name: &quot;Eyes Wide Shut&quot;, ReleaseYear: &quot;1999&quot; },
    { Name: &quot;The Inheritance&quot;, ReleaseYear: &quot;1976&quot; }
];&lt;/pre&gt;Here is some markup to be used as a template:
&lt;pre class=&quot;brush: xml;&quot;&gt;&amp;lt;script id=&quot;movieTemplate&quot; type=&quot;text/x-jquery-tmpl&quot;&amp;gt;
    &amp;lt;li&amp;gt;
        &amp;lt;b&amp;gt;${Name}&amp;lt;/b&amp;gt; (${ReleaseYear})
    &amp;lt;/li&amp;gt;
&amp;lt;/script&amp;gt;&lt;/pre&gt;and a target element where we are going to render the result of rendering the template against our data:
&lt;pre class=&quot;brush: xml;&quot;&gt;&amp;lt;ul id=&quot;results&quot;&amp;gt;&amp;lt;/ul&amp;gt;&lt;/pre&gt;And here is some code to take the template, render it with the data, and append the resulting HTML as content under our target element:
&lt;pre class=&quot;brush: js;&quot;&gt;$( &quot;#movieTemplate&quot; ).tmpl( movies )
    .appendTo( &quot;#results&quot; );&lt;/pre&gt;In the above code, we get a jQuery wrapped set containing our template markup, and use the &lt;em&gt;.tmpl()&lt;/em&gt; plugin method (to which we pass the data) to render the template. Then we chain with the &lt;i&gt;appendTo&lt;/i&gt; method to append the results under our target element:
&lt;div class=&quot;demo&quot;&gt;








&lt;strong&gt;Demo:&lt;/strong&gt;
&lt;ul id=&quot;results1a&quot;&gt;&lt;/ul&gt;&lt;/div&gt;As you see the template got rendered once for each item in the &lt;i&gt;movies&lt;/i&gt; array. Data values are inserted using the template tag &lt;i&gt;${...}&lt;/i&gt;. In fact &lt;i&gt;${expression}&lt;/i&gt; inserts the (HTML-encoded) result of evaluating the &lt;i&gt;expression&lt;/i&gt; term, in the context of the current item.  

The template engine actually exposes the current data item as the variable &lt;i&gt;$data&lt;/i&gt;, and also exposes each of the fields of the current data item as individual variables. So the most simplest use-case of &lt;i&gt;${...}&lt;/i&gt; is just with a field name as expression, such as &lt;i&gt;${ReleaseYear}&lt;/i&gt;. This is actually equivalent to &lt;i&gt;${$data.ReleaseYear}&lt;/i&gt; and inserts the value of that field on the current data item. Pretty straightforward.

Here is the complete code of our example:

&lt;pre class=&quot;brush: js; toolbar: true;&quot;&gt;&amp;lt;script src=&quot;http://code.jquery.com/jquery.js&quot; type=&quot;text/javascript&quot;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script src=&quot;jquery.tmpl.js&quot; type=&quot;text/javascript&quot;&amp;gt;&amp;lt;/script&amp;gt;

&amp;lt;script id=&quot;movieTemplate&quot; type=&quot;text/x-jquery-tmpl&quot;&amp;gt;
    &amp;lt;li&amp;gt;
        &amp;lt;b&amp;gt;${Name}&amp;lt;/b&amp;gt; (${ReleaseYear})
    &amp;lt;/li&amp;gt;
&amp;lt;/script&amp;gt;

&amp;lt;ul id=&quot;results&quot;&amp;gt;&amp;lt;/ul&amp;gt;

&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;
    var movies = [
        { Name: &quot;The Red Violin&quot;, ReleaseYear: &quot;1998&quot; },
        { Name: &quot;Eyes Wide Shut&quot;, ReleaseYear: &quot;1999&quot; },
        { Name: &quot;The Inheritance&quot;, ReleaseYear: &quot;1976&quot; }
    ];

    $( &quot;#movieTemplate&quot; ).tmpl( movies )
        .appendTo( &quot;#results&quot; );
&amp;lt;/script&amp;gt;
&lt;/pre&gt;&lt;h4&gt;








Playing with the data and the template: Sample Viewer&lt;/h4&gt;To get the feeling of how it works, here is the same demo again, but this time I have used a special Sample Viewer script which is integrated into my blog, so that if you mouse over the demo, you will see a little &#39;+&#39; button that you can click on. The result will be a tabbed view in which you can see the data and the template, as well as the result:
&lt;div class=&quot;plusViewer edit&quot;&gt;








&lt;strong&gt;Demo with Sample Viewer&lt;/strong&gt; (Mouse over...)
&lt;ul id=&quot;results1b&quot;&gt;&lt;/ul&gt;&lt;/div&gt;Try mousing over the demo above, clicking on the &#39;+&#39; button, and modifying the data or the template under the respective tabs. Go back to the result tab and you will see how it renders. Click on the &#39;-&#39; button, and you will be back with the orginal data and template...

By the way, this sample viewer is actually implemented using jQuery templates, and illustrates the kind of dynamic interactive client-side UI that can be built very easily with jQuery templates. Maybe at some point I&#39;ll reach the point of blogging about how I went about building the sample viewer. But for now, let&#39;s get back to just playing with it. For example, if you want to just change the data, and see how the template rendering works with your changes, here are some examples of changes to the data that you could explore:
&lt;h4&gt;








Changing the data&lt;/h4&gt;Mouse over the demo above and expand the &lt;i&gt;Sample Viewer&lt;/i&gt;. Now try copying and pasting the data examples below into the &lt;i&gt;Data&lt;/i&gt; tab, and then switching back to the &lt;i&gt;Result&lt;/i&gt; tab.

&lt;em&gt;Change values, number of elements etc.&lt;/em&gt;
&lt;pre class=&quot;code&quot;&gt;[
    { &quot;Name&quot;: &quot;The BLUE Violin&quot;, &quot;ReleaseYear&quot;: &quot;1998&quot; }
]&lt;/pre&gt;&lt;i&gt;Conclusion:&lt;/i&gt; It actually is data-driven :-)

&lt;em&gt;Remove some fields and add others:&lt;/em&gt;
&lt;pre class=&quot;code&quot;&gt;[
    { &quot;Name&quot;: &quot;The Red Violin&quot;, &quot;ReleaseYear&quot;: &quot;1998&quot; },
    { &quot;Name&quot;: &quot;Eyes Wide Shut&quot;  },
    { &quot;Name&quot;: &quot;The Inheritance&quot;, &quot;ReleaseYear&quot;: &quot;1976&quot;, &quot;Director&quot;: &quot;Mauro Bolognini&quot; }
]&lt;/pre&gt;&lt;i&gt;Conclusion:&lt;/i&gt; It ignores the missing/undefined values without error. If you put the value of those fields to null or to the empty string, the result is the same. And of course the added fields have no effect, unless you want to add &lt;i&gt;${Director}&lt;/i&gt; to the template. (Try it...)

&lt;em&gt;Replace the array with a single object:&lt;/em&gt;
&lt;pre class=&quot;code&quot;&gt;{ Name: &quot;The Red Violin&quot;, ReleaseYear: &quot;1998&quot; }&lt;/pre&gt;&lt;i&gt;Conclusion:&lt;/i&gt; The templating engine is smart about arrays. Pass an object and it renders the template once, with the object as data item. Pass it an array and it creates a template item (a rendered template) for each of the data items in the array.

&lt;em&gt;Set the data to null:&lt;/em&gt;
&lt;pre class=&quot;code&quot;&gt;null&lt;/pre&gt;&lt;i&gt;Conclusion:&lt;/i&gt; If you pass no data at all, the templating engine still renders the template once, but the current data item is null. 

We will see that there are many scenarios where you are just rendering boiler-plate, or where  the template pulls in data from other places than the data item, so passing data to the template is not always appropriate or relevant. It may be a nested template, and use data from the parent item. It may have template tags whose parameters are not simple values, but function calls, and the template is driven by the data returned by that function call. For example it might include &lt;i&gt;{{each myApp.getData(foo)}}&lt;/i&gt;, or &lt;i&gt;${myApp.getData(foo)}&lt;/i&gt;. 

In this blog I am staying with much simpler examples, but we will see in later blogs how passing functions to template tags is extremely common. 

&lt;em&gt;Include some HTML markup in the data:&lt;/em&gt;
&lt;pre class=&quot;code&quot;&gt;{ &quot;Name&quot;: &quot;The &amp;lt;strong style=&quot;color: Red;&quot;&amp;gt;Red&amp;lt;/strong&amp;gt; Violin&quot;, &quot;ReleaseYear&quot;: &quot;1998&quot; }&lt;/pre&gt;&lt;i&gt;Conclusion:&lt;/i&gt; This does &lt;i&gt;not&lt;/i&gt; change the formatting of the text. Instead, it shows the markup in the rendered UI. This is by design: &lt;i&gt;${expression}&lt;/i&gt; HTML-encodes the value before inserting it into the DOM. If you actually want your markup to get inserted into the DOM, then use the &lt;i&gt;{{html ...}}&lt;/i&gt; template tag rather than the &lt;i&gt;${...}&lt;/i&gt; template tag. You can try it now: go to the &lt;i&gt;#movieTemplate&lt;/i&gt; tab and replace ${Name} by {{html Name}}. Now the markup will not be escaped, and the data will actually get inserted as HTML. (We&#39;ll come back to this lower down in the blog).

One detail: the sample viewer is using &lt;a href=&quot;http://www.json.org/js.html&quot;&gt;JSON2&lt;/a&gt; to convert between string expressions and JavaScript objects. So the text you are editing above is actually JSON, not JavaScript literals. That&#39;s why the keys are wrapped in quotes. Try removing them, and the sample viewer will tell you that you have a syntax error! But in your script, of course, you have literals, and those quotes can be omitted (as long as you avoid JavaScript keywords!)
&lt;h4&gt;








Changing the template&lt;/h4&gt;Let&#39;s try changing the template, now, rather than the data. For convenience, here is the sample viewer again. This time I set it to show the tabs from the get-go, so you don&#39;t need to mouse over and click the &#39;+&#39; button...

&lt;strong&gt;&lt;a href=&quot;&quot; name=&quot;sampleViewer&quot;&gt;Sample Viewer&lt;/a&gt;&lt;/strong&gt;
&lt;div class=&quot;plusViewer edit tabs&quot;&gt;








&lt;ul id=&quot;results1c&quot;&gt;&lt;/ul&gt;&lt;/div&gt;So try copying and pasting the template examples below into the &lt;i&gt;#movieTemplate&lt;/i&gt; tab, and then switching back to the &lt;i&gt;Result&lt;/i&gt; tab.

&lt;em&gt;Add some text:&lt;/em&gt;
&lt;pre class=&quot;code&quot;&gt;&amp;lt;li&amp;gt;
    &amp;lt;b&amp;gt;${Name}&amp;lt;/b&amp;gt; (Released in the year ${ReleaseYear})
&amp;lt;/li&amp;gt;&lt;/pre&gt;&lt;i&gt;Conclusion:&lt;/i&gt; It works as you would expect!

&lt;em&gt;Add some markup and some formatting:&lt;/em&gt;
&lt;pre class=&quot;code&quot;&gt;&amp;lt;li&amp;gt;
    &amp;lt;b&amp;gt;${Name}&amp;lt;/b&amp;gt; (&amp;lt;span style=&quot;color: Blue;&quot;&amp;gt;${ReleaseYear}&amp;lt;span&amp;gt;)
&amp;lt;/li&amp;gt;&lt;/pre&gt;&lt;i&gt;Conclusion:&lt;/i&gt; It works as you would expect...

&lt;em&gt;Add simple JavaScript expressions:&lt;/em&gt;
&lt;pre class=&quot;code&quot;&gt;&amp;lt;li&amp;gt;
    &amp;lt;b&amp;gt;${Name.toUpperCase()}&amp;lt;/b&amp;gt; (${parseInt(ReleaseYear) + 100})
&amp;lt;/li&amp;gt;&lt;/pre&gt;&lt;i&gt;Conclusion:&lt;/i&gt; This works too. You can put JavaScript expressions as parameters to the tags. 

But don&#39;t go overboard! There is not a complete JavaScript parser in the context of inline expressions in the template. If you have complex code, write a function, and call the function from your template, and pass parameters if you need to: &lt;i&gt;${myFunction(a,b)}&lt;/i&gt;. (More on that in a later blog...) 

&lt;em&gt;Add another template tag:&lt;/em&gt;
&lt;pre class=&quot;code&quot;&gt;&amp;lt;li&amp;gt;
    &amp;lt;b&amp;gt;${Name}&amp;lt;/b&amp;gt; (${ReleaseYear}) - Director: ${Director}
&amp;lt;/li&amp;gt;&lt;/pre&gt;&lt;i&gt;Conclusion:&lt;/i&gt; Nothing yet - there is no Director field... 

&lt;em&gt;Now change the data too:&lt;/em&gt;
&lt;pre class=&quot;code&quot;&gt;[
    { &quot;Name&quot;: &quot;The Red Violin&quot;, &quot;ReleaseYear&quot;: &quot;1998&quot;, &quot;Director&quot;: &quot;Francois Girard&quot; },
    { &quot;Name&quot;: &quot;Eyes Wide Shut&quot;, &quot;ReleaseYear&quot;: &quot;1999&quot;, &quot;Director&quot;: &quot;Stanley Kubrick&quot; },
    { &quot;Name&quot;: &quot;The Inheritance&quot;, &quot;ReleaseYear&quot;: &quot;1976&quot;, &quot;Director&quot;: &quot;Mauro Bolognini&quot; }
]&lt;/pre&gt;&lt;i&gt;Conclusion:&lt;/i&gt; Yes, it works as expected!

Finally let&#39;s make the change I mentioned in the previous section, and get a &#39;teaser&#39; on one of the other template tags to be covered in later blogs: the &lt;i&gt;{{html ...}}&lt;/i&gt; tag... 

&lt;em&gt;First, include HTML markup in the data:&lt;/em&gt;
&lt;pre class=&quot;code&quot;&gt;{ &quot;Name&quot;: &quot;The &amp;lt;strong style=&#39;color: Red;&#39;&amp;gt;Red&amp;lt;/strong&amp;gt; Violin&quot;, &quot;ReleaseYear&quot;: &quot;1998&quot; }&lt;/pre&gt;&lt;em&gt;Now change the template to use the {{html ...}} template tag instead of the ${...} template tag:&lt;/em&gt;
&lt;pre class=&quot;code&quot;&gt;&amp;lt;li&amp;gt;
    &amp;lt;b&amp;gt;{{html Name}}&amp;lt;/b&amp;gt; (${ReleaseYear})
&amp;lt;/li&amp;gt;&lt;/pre&gt;&lt;i&gt;Conclusion:&lt;/i&gt; Thanks to the &lt;i&gt;{{html ...}}&lt;/i&gt; tag, you can insert HTML markup into the DOM, as HTML.  

Combining some of the changes above to data and template, here is a working example that illustrates what you did, and which you can use for exploring further changes: 

&lt;strong&gt;Sample Viewer&lt;/strong&gt;
&lt;div class=&quot;plusViewer edit tabs&quot;&gt;








&lt;ul id=&quot;results2&quot;&gt;&lt;/ul&gt;&lt;/div&gt;And here is the complete code of our modified example:
&lt;pre class=&quot;brush: js; toolbar: true;&quot;&gt;&amp;lt;script src=&quot;http://code.jquery.com/jquery.js&quot; type=&quot;text/javascript&quot;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script src=&quot;jquery.tmpl.js&quot; type=&quot;text/javascript&quot;&amp;gt;&amp;lt;/script&amp;gt;

&amp;lt;script id=&quot;movieTemplate&quot; type=&quot;text/x-jquery-tmpl&quot;&amp;gt;
    &amp;lt;li&amp;gt;
        &amp;lt;b&amp;gt;{{html Name}}&amp;lt;/b&amp;gt; 
        (&amp;lt;span style=&quot;color: Blue&quot;&amp;gt; ${ReleaseYear}&amp;lt;/span&amp;gt;) - Director: ${Director}
    &amp;lt;/li&amp;gt;
&amp;lt;/script&amp;gt;

&amp;lt;ul id=&quot;results&quot;&amp;gt;&amp;lt;/ul&amp;gt;

&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;
    var movies = [
        { Name: &quot;The &amp;lt;strong style=&#39;color: red&#39;&amp;gt;Red&amp;lt;/strong&amp;gt; Violin&quot;, ReleaseYear: &quot;1998&quot;, Director: &quot;Francois Girard&quot; },
        { Name: &quot;Eyes Wide Shut&quot;, ReleaseYear: &quot;1999&quot;, Director: &quot;Stanley Kubrick&quot; },
        { Name: &quot;The Inheritance&quot;, ReleaseYear: &quot;1976&quot;, Director: &quot;Mauro Bolognini&quot; }
    ];

    $( &quot;#movieTemplate&quot; ).tmpl( movies )
        .appendTo( &quot;#results&quot; );
&amp;lt;/script&amp;gt;
&lt;/pre&gt;&lt;h4&gt;








What&#39;s next?...&lt;/h4&gt;Of course we have only just started scratching the surface here. I hope to provide more blogs soon to continue exploring the possibilities of jQuery templates.

In the meantime, you can download the code for jQuery templates from &lt;a href=&quot;http://github.com/jquery/jquery-tmpl&quot;&gt;http://github.com/jquery/jquery-tmpl&lt;/a&gt;. &lt;script id=&quot;movieTemplate&quot; type=&quot;text/x-jquery-tmpl&quot;&gt;
&lt;li&gt;
    &lt;b&gt;${Name}&lt;/b&gt; (${ReleaseYear})
&lt;/li&gt;
&lt;/script&gt;&lt;script id=&quot;movieTemplate2&quot; type=&quot;text/x-jquery-tmpl&quot;&gt;
&lt;li&gt;
    &lt;b&gt;{{html Name}}&lt;/b&gt; (&lt;span style=&quot;color: Blue;&quot;&gt;${ReleaseYear}&lt;/span&gt;) - Director: ${Director}
&lt;/li&gt;
&lt;/script&gt;&lt;script type=&quot;text/javascript&quot;&gt;
 var movies = [
  { Name: &quot;The Red Violin&quot;, ReleaseYear: &quot;1998&quot; },
  { Name: &quot;Eyes Wide Shut&quot;, ReleaseYear: &quot;1999&quot; },
  { Name: &quot;The Inheritance&quot;, ReleaseYear: &quot;1976&quot; }
 ];
 
 var movies2 = [
    { Name: &quot;The &lt;strong style=&#39;color: red&#39;&gt;Red&lt;/strong&gt; Violin&quot;, ReleaseYear: &quot;1998&quot;, Director: &quot;Francois Girard&quot; },
    { Name: &quot;Eyes Wide Shut&quot;, ReleaseYear: &quot;1999&quot;, Director: &quot;Stanley Kubrick&quot; },
    { Name: &quot;The Inheritance&quot;, ReleaseYear: &quot;1976&quot;, Director: &quot;Mauro Bolognini&quot; }
 ];
 $( &quot;#movieTemplate&quot; ).tmpl( movies ).appendTo( &quot;#results1a&quot; );
 $( &quot;#movieTemplate&quot; ).tmpl( movies ).appendTo( &quot;#results1b&quot; );
 $( &quot;#movieTemplate&quot; ).tmpl( movies ).appendTo( &quot;#results1c&quot; );
 $( &quot;#movieTemplate2&quot; ).tmpl( movies2 ).appendTo( &quot;#results2&quot; );
&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.borismoore.com/feeds/2182287749356001745/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.borismoore.com/2010/09/introducing-jquery-templates-1-first.html#comment-form' title='35 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3627888979577168137/posts/default/2182287749356001745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3627888979577168137/posts/default/2182287749356001745'/><link rel='alternate' type='text/html' href='http://www.borismoore.com/2010/09/introducing-jquery-templates-1-first.html' title='Introducing jQuery Templates 1: First Steps'/><author><name>Boris Moore</name><uri>http://www.blogger.com/profile/17923416771395046921</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifritkTk81h2x0ZoT94F26hl67nnGg2D77YpdsHhkON627UBPredZm7VKmtJA42tSIx9eoMBwOE3fJkT3LeficQih5eGiuumKCdZZyzjWLGPxUkHxTCHpdcSwLQclpLA/s113/assets.github.com%252Fimages%252Fgravatars%252Fgravatar-140.png'/></author><thr:total>35</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3627888979577168137.post-3709530129956699146</id><published>2010-09-22T16:27:00.001-07:00</published><updated>2022-04-04T11:38:17.056-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ajax"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="jQueryTemplates"/><title type='text'>From Microsoft to Open Source</title><content type='html'>Since earlier this year, I have been working on &lt;em&gt;jQuery Templates&lt;/em&gt;, as well as some other contributions to jQuery. The starting point was an initial prototype by John Resig, sometimes referred to as his &lt;i&gt;micro-templating&lt;/i&gt; proposal. I hope to follow this post with a series of posts on &lt;em&gt;jQuery Templates&lt;/em&gt;. &lt;br /&gt;
&lt;br /&gt;
But before beginning those posts I wanted to to give some background:&lt;br /&gt;
&lt;h4&gt;Microsoft and jQuery&lt;/h4&gt;At Microsoft, we had a pretty cool &lt;a href=&quot;http://aspnet.codeplex.com/releases/view/34488&quot;&gt;client templating implementation&lt;/a&gt; which &lt;a href=&quot;http://weblogs.asp.net/infinitiesloop/&quot;&gt;Dave Reed&lt;/a&gt; and I created. This was part of the Microsoft AJAX Library. The client templates were integrated with live data-linking, and with a script loader.&amp;nbsp;We also worked on some very interesting integration between all that and jQuery, so that if you were using jQuery you could get jQuery-style APIs for the MS AJAX features, and use selectors, fluent-style APIs etc.&lt;br /&gt;
&lt;br /&gt;
But after reaching the point of releasing Preview 6,&amp;nbsp;and getting very close to a final release, our management team decided to make a radical change. Client-side AJAX platforms are all about performance and optimization of Web requests, and in a sense we were in a contradictory situation. - We were encouraging our developers to use both the MS AJAX platform and jQuery in their client apps, but inevitably there was some overlap and the inclusion of both platforms in their apps was not completely optimal.&lt;br /&gt;
&lt;br /&gt;
So the change was that from that point on we would not just provide support for using jQuery alongside our own client-side Microsoft AJAX platform. We would instead begin to offer contributions directly to jQuery.&lt;br /&gt;
&lt;br /&gt;
In fact while jQuery has some very cool features, there were a number of features in our AJAX platform which were not in jQuery, and indeed were pretty much ahead of the curve as far as AJAX platforms in general are concerned -&amp;nbsp;or at least that is my view :-). Amongst those features -&amp;nbsp;our client templates, our concept of observable JavaScript objects and arrays (which we now refer to as &lt;em&gt;&quot;data-linking&quot;&lt;/em&gt;), our globalization support, and our script loader. &lt;br /&gt;
&lt;h4&gt;Moving to Open Source&lt;/h4&gt;So we began the process of completely redesigning and re-implementing some of those features as pure jQuery plugins or extensions.&amp;nbsp;The goal was very strongly towards lean and clean JavaScript code; to follow JavaScript best-practice for coding -&amp;nbsp;in the sense of optimal use of the JavaScript language itself; and &lt;em&gt;not&lt;/em&gt; to attempt to squeeze it into a strongly-typed or object-orientated (in the C# or Java sense) paradigm -&amp;nbsp;or in general bring to bear coding habits and patterns that come from C# and are not really &#39;at home&#39; in JavaScript code.&lt;br /&gt;
&lt;br /&gt;
The work is taking place as a true open source effort, hosted on GitHub, and in touch with the community. I have been having a great time as a developer working in that context, and enjoying every minute of it!&lt;br /&gt;
&lt;br /&gt;
So far we have three projects on GitHub: &lt;a href=&quot;http://github.com/nje/jquery-tmpl&quot;&gt;jQuery Templates&lt;/a&gt;, &lt;a href=&quot;http://github.com/nje/jquery-datalink&quot;&gt;jQuery Data Linking&lt;/a&gt;, and&amp;nbsp;&lt;a href=&quot;http://github.com/nje/jquery-glob&quot;&gt;jQuery Globalization&lt;/a&gt;. We are also working on bringing our original Script Loader code into a form that might be optimal for jQuery.&amp;nbsp;The globalization plugin was announced &lt;a href=&quot;http://weblogs.asp.net/scottgu/archive/2010/06/10/jquery-globalization-plugin-from-microsoft.aspx&quot;&gt;here&lt;/a&gt;, and is already seeing a lot of use. jQuery Templates has been under very active development recently, and will be the subject of some of my upcoming blogs. And jQuery Data-Linking will probably see some more intensive development in the coming weeks, and is likely to include some very interesting integration with jQuery Templates...&lt;br /&gt;
&lt;br /&gt;
I am looking forward to sharing more of these Open Source efforts with you over the coming weeks, starting with a &lt;a href=&quot;http://www.borismoore.com/2010/09/introducing-jquery-templates-1-first.html&quot;&gt;series of blogs&lt;/a&gt; introducing jQuery Templates...</content><link rel='replies' type='application/atom+xml' href='http://www.borismoore.com/feeds/3709530129956699146/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.borismoore.com/2010/09/from-microsoft-to-open-source.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3627888979577168137/posts/default/3709530129956699146'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3627888979577168137/posts/default/3709530129956699146'/><link rel='alternate' type='text/html' href='http://www.borismoore.com/2010/09/from-microsoft-to-open-source.html' title='From Microsoft to Open Source'/><author><name>Boris Moore</name><uri>http://www.blogger.com/profile/17923416771395046921</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifritkTk81h2x0ZoT94F26hl67nnGg2D77YpdsHhkON627UBPredZm7VKmtJA42tSIx9eoMBwOE3fJkT3LeficQih5eGiuumKCdZZyzjWLGPxUkHxTCHpdcSwLQclpLA/s113/assets.github.com%252Fimages%252Fgravatars%252Fgravatar-140.png'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3627888979577168137.post-1009219366886146159</id><published>2010-09-20T18:10:00.001-07:00</published><updated>2022-04-04T10:23:18.310-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="life"/><category scheme="http://www.blogger.com/atom/ns#" term="me"/><title type='text'>Dancing with Data</title><content type='html'>Well, finally, this blog will start. After so long always planning to start a blog, but never actually doing so, now, my current work on jQuery templates is reaching the point where I really can&#39;t &#39;hide&#39; any longer! &lt;br /&gt;
&lt;br /&gt;
The immediate purpose of this blog, then, will be to share with others what I feel to be the really rich potential of building dynamic Web applications using client-side templates, and in particular, the &lt;a href=&quot;http://github.com/nje/jquery-tmpl&quot;&gt;jQuery Templates&lt;/a&gt; I have been working on these past four months or so. But more broadly, I hope to share aspects of my &lt;i&gt;&quot;Dancing with Data&quot;&lt;/i&gt; journey that I think may be interesting to others, or on which I would love to get feedback. &lt;br /&gt;
&lt;h4&gt;




Why &quot;Dancing with Data&quot;?&lt;/h4&gt;
I referred to my&lt;i&gt; &quot;Dancing with Data&quot;&lt;/i&gt; journey, and in fact my journey through life has so often I feel drawn me into a fascination with apparent opposites. Dance and Data. Order and Chaos, Mathematics and Music, Science and Spirituality.&lt;br /&gt;
&lt;br /&gt;
I studied mathematics at college, went on to do research studies in theoretical physics (actually&lt;a href=&quot;http://en.wikipedia.org/wiki/Twistor_Theory&quot;&gt; twistor theory&lt;/a&gt;) under &lt;a href=&quot;http://en.wikipedia.org/wiki/Roger_Penrose&quot;&gt;Roger Penrose&lt;/a&gt;, then, rather than submit my doctoral thesis, went off in a different direction, getting involved in working in experimental theater and voice work, with the &lt;a href=&quot;http://en.wikipedia.org/wiki/Roy_Hart&quot;&gt;Roy Hart Theatre&lt;/a&gt;, and soon after, moving from the UK to France with the theater company, and also playing clarinet and composing music for theater performances.&lt;br /&gt;
&lt;br /&gt;
Then, some time later, music took me back to mathematics, in a sense: For a music composition I was working on, I got my first music software, sampling keyboard, and so on, and from there started to teach myself programming, and began to develop my own music software tools for composition and real-time improvisation. And basically it was music that took me into the world of software development, and ultimately to becoming a professional developer.&lt;br /&gt;
&lt;br /&gt;
So from there, it was &quot;data&quot; too that fascinated me. Not so much data itself, but data-driven applications and UI. In a sense, life itself is data-driven, if you think about genomes and DNA sequences, for example. Yet within that &#39;prescriptive&#39; concept, so much richness and &#39;innovation&#39;, coming, as it were, from the meeting of chaos with order, through mutations and selection, with the interplay between gene expression and environmental factors. I would almost say that life itself, in fact, is a kind of dance with data.&lt;br /&gt;
&lt;br /&gt;
Right at the beginning of the emergence of XML I created a client-side (in the browser) declarative stylesheet language for transforming XML data fetched from the server, into HTML. This led me to become a member of the XSLT working group on the W3C. - And later, to join Microsoft, where I was a member of the team which created InfoPath before, later, joining the ASP.NET team. And most recently, it led me to be involved in working with the open source community and with jQuery, once again exploring this interplay between data and UI, where the user too is a player, and the result is an interactive responsive application; where&amp;nbsp;the user, too, if you like, is &#39;dancing with the data&#39;.&lt;br /&gt;
&lt;h4&gt;




Opposites&lt;/h4&gt;
Opposites then, but through that opposing dialectic, the richness of the interplay. I feel as if my contribution is about bringing together these opposites. Facilitating, in some way. Using my own logical analytic capabilities, but following at the same time some kind of intuitive path, a gut feeling, and seeking the innovative richness that can occur when the goal is not just to compete, or to emulate, (or, dare I say it - in&amp;nbsp;some cases at least - to copy), the competition - rather, the goal is to follow what seems right, what seems to make sense, what seems to be suggested by the underlying patterns, what seems to fit the user need.</content><link rel='replies' type='application/atom+xml' href='http://www.borismoore.com/feeds/1009219366886146159/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.borismoore.com/2010/09/dancing-with-data.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3627888979577168137/posts/default/1009219366886146159'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3627888979577168137/posts/default/1009219366886146159'/><link rel='alternate' type='text/html' href='http://www.borismoore.com/2010/09/dancing-with-data.html' title='Dancing with Data'/><author><name>Boris Moore</name><uri>http://www.blogger.com/profile/17923416771395046921</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifritkTk81h2x0ZoT94F26hl67nnGg2D77YpdsHhkON627UBPredZm7VKmtJA42tSIx9eoMBwOE3fJkT3LeficQih5eGiuumKCdZZyzjWLGPxUkHxTCHpdcSwLQclpLA/s113/assets.github.com%252Fimages%252Fgravatars%252Fgravatar-140.png'/></author><thr:total>0</thr:total></entry></feed>