<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>JavaScriptr &#187; jquery</title>
	<atom:link href="http://www.javascriptr.com/category/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.javascriptr.com</link>
	<description>A blog about JavaScript and other web development technologies</description>
	<lastBuildDate>Tue, 17 May 2011 17:51:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>jQuery Conference &#8217;09</title>
		<link>http://www.javascriptr.com/2009/09/20/jquery-conference-09/</link>
		<comments>http://www.javascriptr.com/2009/09/20/jquery-conference-09/#comments</comments>
		<pubDate>Sun, 20 Sep 2009 19:34:55 +0000</pubDate>
		<dc:creator>Henry B.</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[cambridge]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[nerd]]></category>

		<guid isPermaLink="false">http://www.javascriptr.com/?p=137</guid>
		<description><![CDATA[Last weekend I went up to Cambridge, MA for the &#8217;09 jQuery Conference. Two days of great jQuery/JavaScript goodness! I gotta say that was the best conference I&#8217;ve been to in awhile. There were a couple presentations I had to skip but the breakout sessions more then made up for them. All in all I [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.javascriptr.com/wp-content/uploads/2009/09/jquery_conf-1024x330.jpg" alt="the main room @ jQuery Conference" title="the main room @ jQuery Conference" width="500"  class="aligncenter size-large wp-image-150" /></p>
<p>Last weekend I went up to Cambridge, MA for the &#8217;09 jQuery Conference. Two days of great jQuery/JavaScript goodness! I gotta say that was the best conference I&#8217;ve been to in awhile.</p>
<p>There were a couple presentations I had to skip but the breakout sessions more then made up for them. All in all I took home some great tips &#038; tricks for<span id="more-137"></span>:</p>
<ul>
<li>writting efficient jQuery code</li>
<li>using custom events for single page web apps</li>
<li>speeding up page load with tools like <a href="http://labjs.com/">labjs</a></li>
<li>building iPhone apps via <a href="http://www.jqtouch.com/">jQTouch</a></li>
<li>and the biggest tip of all&#8230; get a hotel within a mile from conference</li>
</ul>
<p>The conference was held at the Microsoft New England Research &#038; Development Center aka <a href="http://microsoftcambridge.com">MS NERD</a>. Took this panoramic shot of Boston from the lunch area duing conference&#8230;<br />
<img src="http://www.javascriptr.com/wp-content/uploads/2009/09/boston_pano-1024x242.jpg" alt="view of Boston from Cambridge" title="view of Boston from Cambridge" width="500" class="size-large wp-image-138" /></p>
<p>Great venue!! The wifi was sick! Looking forward to the next event @ MS NERD Center.</p>
<p>Check out the <a href="http://events.jquery.com/jquery-conference-2009/">presentation slides</a> from the conference. Make sure you go next year!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.javascriptr.com/2009/09/20/jquery-conference-09/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PureJSTemplate  &#8211; A pure javascript templating engine for jQuery</title>
		<link>http://www.javascriptr.com/2008/06/05/purejstemplate-a-pure-javascript-templating-engine-for-jquery/</link>
		<comments>http://www.javascriptr.com/2008/06/05/purejstemplate-a-pure-javascript-templating-engine-for-jquery/#comments</comments>
		<pubDate>Fri, 06 Jun 2008 01:32:31 +0000</pubDate>
		<dc:creator>mo rock</dc:creator>
				<category><![CDATA[HTML/XHTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[PureJSTemplate]]></category>
		<category><![CDATA[templating]]></category>

		<guid isPermaLink="false">http://www.javascriptr.com/2008/06/05/purejstemplate-a-pure-javascript-templating-engine-for-jquery/</guid>
		<description><![CDATA[Most templating languages suck Ok, if your like me then you hate all templating langauges- they suck, they really suck. I hate them because I hate the rules they enforce upon me, they are slow, and they slow me down. Because of this, usually I end up making code that looks like this: UGLY: 1 [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Most templating languages suck </strong></p>
<p>Ok, if your like me then you hate all templating langauges- they suck, they really suck. I hate them because I hate the rules they enforce upon me, they are slow, and they slow me down. Because of this, usually I end up making code that looks like this:</p>
<p><strong>UGLY: </strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> display<span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #003366; font-weight: bold;">var</span> output <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&lt;div&gt;&quot;</span> <span style="color: #339933;">+</span> data.<span style="color: #660066;">text</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;&lt;/div&gt;&quot;</span><span style="color: #339933;">;</span>
   element.<span style="color: #660066;">innerHTML</span><span style="color: #339933;">=</span>output<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>How horrible is that? That&#8217;s probably worse than using a bad templating langauge.</p>
<p>Well, after disappointments with other jQuery templating plugins, I decided to make my own<span id="more-14"></span>:</p>
<p><strong>The Solution: PureJSTemplate </strong></p>
<p>With PureJSTemplate you use old fashioned javascript in your template. You simply surround the javascript in special tags. Here&#8217;s an example of what you can do:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span># <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i<span style="color: #339933;">&lt;</span><span style="color: #CC0000;">10</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> #<span style="color: #339933;">&gt;</span>
   <span style="color: #339933;">&lt;</span>#<span style="color: #339933;">=</span>i#<span style="color: #339933;">&gt;&lt;</span>br<span style="color: #339933;">/&gt;</span>
<span style="color: #339933;">&lt;</span>#<span style="color: #009900;">&#125;</span>#<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>That will output the numbers 0 through 9. Easy, isn&#8217;t it?</p>
<p><strong>Using it: </strong></p>
<p>You simply surround your template code with a textarea tag:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;textarea</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;tpl&quot;</span> <span style="color: #000066;">style</span>=<span style="color: #ff0000;">&quot;display:none&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
&nbsp;
<span style="color: #808080; font-style: italic;">&lt;!-- TEMPLATE CODE HERE --&gt;</span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/textarea<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>and call it from javascript like so:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;output&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">pureJSTemplate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
   id   <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;tpl&quot;</span><span style="color: #339933;">,</span>
   data <span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>That&#8217;s it.</p>
<p><strong> Get the Code: </strong></p>
<p>Visit a demo/benchmark page <a href="http://www.glicky.com/downloads/testtemplating_jquery.html" title="demo">here</a>. Get the js <a href="http://www.glicky.com/downloads/purejstemplate_jquery.js" title="js">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.javascriptr.com/2008/06/05/purejstemplate-a-pure-javascript-templating-engine-for-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

