<?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>QuirkeyBlog &#187; Development</title>
	<atom:link href="http://www.quirkey.com/blog/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.quirkey.com/blog</link>
	<description>A Developer with too little time.</description>
	<lastBuildDate>Mon, 01 Aug 2011 16:07:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Artists not Hackers</title>
		<link>http://www.quirkey.com/blog/2011/05/26/artists-not-hackers/</link>
		<comments>http://www.quirkey.com/blog/2011/05/26/artists-not-hackers/#comments</comments>
		<pubDate>Thu, 26 May 2011 21:52:40 +0000</pubDate>
		<dc:creator>AQ</dc:creator>
				<category><![CDATA[Art]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://www.quirkey.com/blog/?p=534</guid>
		<description><![CDATA[A couple of weeks ago I gave a short presentation mockingly titled &#8220;John Tesh does Client Side Javascript&#8221;. The real thesis of the talk has nothing to do with John Tesh, in fact it has little to do with client side JavaScript. The thesis I&#8217;m trying to present is that artists, not hackers, are where [...]]]></description>
			<content:encoded><![CDATA[	<p>A couple of weeks ago I gave a <a href="http://swinger.quirkey.com/#/preso/aq-jsconf2011/display/1" title="">short presentation</a> mockingly titled &#8220;John Tesh does Client Side Javascript&#8221;. The real thesis of the talk has nothing to do with John Tesh, in fact it has little to do with client side JavaScript. The thesis I&#8217;m trying to present is that artists, not hackers, are where we should put our ambitions.  Unfortunately, the irony was lost on a bunch of people and regardless I think its an apt subject for a good old fashioned blog post.</p>

	<h3>Art is passion</h3>

	<blockquote>Technique alone is never enough. You have to have passion. Technique alone is just an embroidered pot holder.<br />
&#8212;<a href="http://en.wikipedia.org/wiki/Raymond_Chandler" title="">Raymond Chandler</a></blockquote>

	<p>Programming and web development is often a cold silent world. We sit in front of ever larger screens, growing ever more quiet as we move all our conversations, all our lives even, on to a souless &#8216;cloud&#8217; of information. It can be pretty bleak. The push towards this empty void is accelerated by some constant code mantras. Often progress means faster; it means raw numbers and a race towards small benchmarkable improvements. Its a society of technique, of sharpening blades and micro-optimizations. For me, at least, theres something missing. It&#8217;s what Raymond Chandler points to above. Passion here is the difference between Technique and Craft, between Hacking and Art.</p>

	<h3>Hacking is so 1998</h3>

	<p>I want to retire the word hacking.</p>

	<p>I&#8217;m sick of it. It implies the completely wrong metality that I would aspire to. hacking conveys butchery, it suggests unproffesionalism. Most of all it suggests a &#8216;git it done&#8217; attitude that is pretty opposite the idea of making <em>art</em>. Is code <em>art</em>? I&#8217;m not going to go in to the &#8216;what is art?&#8217; circle &#8211; its a trap. The art is almost irrelevant, it is the act thats import. The act of creating.</p>

	<p>I don&#8217;t want to be hacking &#8211; I want to be creating.</p>

	<h3>Art is balance</h3>

	<p>The more I think about it, life itself is really about balance &#8211; or at least the pursuit there of. Not to get all Geoge Lucas &#8211; but there are a lot of forces at work and in ourselves that drive what our lives &#8211; our art, our work &#8211; are about. Here, I believe that the artist, above all, is able to stradle the line between these powers and emotions.</p>

	<p>As a programmer here are some of the tightropes you&#8217;ll have to walk:</p>
	<ul>
		<li>Pride vs Humility: Taking pride in your craft while being humble about its origins. We&#8217;re all just re-formulating old ideas.</li>
		<li>Winning vs Respect: The drive to win and be the best is productive until it means sacrificing knowledge you can gain from your competitora</li>
		<li>Shipping vs Perfection: This is also similar to Quality vs Speed. The need to get <em>something</em> out often is more important then the need to atain perfection in your work. Artists face this every day and the knowledge of self in this respect is often what create uniquness. Jackson Pollock once famously said, when asked about when he knew one of his <a href="http://www.google.com/search?q=jackson+pollock&#038;hl=en&#038;prmd=ivnso&#038;tbm=isch&#038;tbo=u&#038;source=univ&#038;sa=X&#038;ei=ssreTd8ykemBB_Ki9fgK&#038;ved=0CDQQsAQ&#038;biw=1337&#038;bih=1079" title="">iconic paintings was &#8216;finished&#8217;</a> &#8211; &#8220;how do you know when you&#8217;re finished making love?&#8221;. Artists rely on thier insticts, not their critics for &#8220;shipping&#8221;.</li>
	</ul>

	<h3>Striving</h3>

	<p>To be an artist is to <em>make</em> art. Where hacking is an act, <strong>art</strong> is a lifelong goal.</p>

	<p>I&#8217;m not an artist, but I&#8217;d like to think I&#8217;m trying.</p>

 ]]></content:encoded>
			<wfw:commentRss>http://www.quirkey.com/blog/2011/05/26/artists-not-hackers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Flash Rules</title>
		<link>http://www.quirkey.com/blog/2011/03/08/flash-rules/</link>
		<comments>http://www.quirkey.com/blog/2011/03/08/flash-rules/#comments</comments>
		<pubDate>Tue, 08 Mar 2011 23:44:34 +0000</pubDate>
		<dc:creator>AQ</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Geekery]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.quirkey.com/blog/?p=503</guid>
		<description><![CDATA[I&#8217;m probably going to get in trouble for this, but I&#8217;ll let you in on a little secret. Your hatred of Flash is wrong and misplaced. I love web standards and I love the magical unicorn that is HTML5. I don&#8217;t hate Flash. Sure, I have my disagreements with it, but the &#8220;FLASH SUCKS&#8221; mantra [...]]]></description>
			<content:encoded><![CDATA[	<p>I&#8217;m probably going to get in trouble for this, but I&#8217;ll let you in on a little secret. Your hatred of Flash is wrong and misplaced. I love web standards and I love the magical unicorn that is <span class="caps">HTML5</span>. I don&#8217;t hate Flash. Sure, I have my disagreements with it, but the &#8220;FLASH <span class="caps">SUCKS</span>&#8221; mantra that was spawned with the iPhone and only gets louder and louder these days is just silly. Actually, it goes beyond that &#8211; not only is it pointless but its actually hurting the JavaScript and development community at large.</p>

	<p><span id="more-503"></span></p>

	<p>I&#8217;ve been around the block when it comes to web development and I&#8217;ve witnessed this sea change first hand. I&#8217;m not going to go in and recount war stories, but I&#8217;ve had my ups and downs working with Flash and Flash developers. I can&#8217;t really pinpoint a specific moment when people started to question it, but I remember working on a site for a high end fashion client and seeing early versions of script.aculo.us and just being blown away. It seemed so simple: this animated dropdown menu didnt need to be designed and compiled in an entirely different environment! It could all be <em>one thing</em>. Sure the animation was pretty chunky and yeah it might have crashed the occasional Firefox, but it seemed like magic &#8211; and I wanted more. It took some convincing, but we started to build out more and more outside of Flash and it felt great. Then there was the iPhone, and soon enough it all seemed so repulsive. You mean, I can&#8217;t see what kind of noodles this Thai Fusion place sells!? <em>argh</em>. I dont know how Apple did it, but wow, what a spin. Instead of blaming the device, or even better, the authors of these restaurant&#8217;s websites &#8211; we all started blaming Flash itself. <em><span class="caps">FLASH SUCKS</span></em> became the new mantra and we all went along with it. Like an angry mob with iPitchforks we stormed Flash&#8217;s castle.</p>

	<p>The result of all this yelling and vigorous finger pointing is in some ways what we all call <a href="http://www.html5rocks.com/" title=""><span class="caps">HTML5</span></a>. This glory train of hope, a beacon from a distant land where <em>everything</em> is a standard and you can order thai food from your phone. The hilarious thing however, is that as JavaScript developers the joke is on us.</p>

	<h3>Why People Hate Flash</h3>

	<p>Beyond the pure cargo-culting and the flash-blockers, some people at the heart of the argument do have their reasons. Lets take a brief detour from the main story to examine some of them.</p>

	<h4>It&#8217;s a proprietery product with a single owner</h4>

	<p>This is the con that most open source developers take issue with and something that hurts somewhere deep inside. As a very active open source developer, not only on my own projects, but as part of the community at large, I really don&#8217;t want to work on closed platforms. Since my first experience with open source and my first experience reporting, finding and fixing a bug, I haven&#8217;t turned back. Ruby, Rails, jQuery, etc. the benefits of open source are more than I can extol here. As a user, though, the core of <span class="caps">OSS</span> is transparency. It&#8217;s discovering a nasty bug and being able to effect change. This factor is obviously a range between projects but at some level, even if you don&#8217;t report a bug, it&#8217;s just knowing it&#8217;s there. It&#8217;s the knowledge that a <em>community</em> of people is willing and able to <em>fix</em> things. The lack of this is what instills fear in me when using software these days. As part of a team we&#8217;ve experienced bugs in Flash and reported them, and waited for a fix. When it&#8217;s something critical, sometimes you just want to be able to poke at the source. Even if it&#8217;s just to leave and say not my problem. I get this, it is a problem. I can&#8217;t really excuse this, other than saying that this same problem exists with <em>most</em> software and tools people use on a daily basis. Open Source is the exception, not the rule. Apple and the iPhone <span class="caps">SDK</span> is as much of a problem in this regard as Flash. Steve Jobs&#8217; saying that they&#8217;re commited to open source and standards by supporting Mobile Safari and Webkit doesnt mean that the <span class="caps">SDK</span> or the tools to compile iPhone apps are going to be open source any time soon.</p>

	<h4>It doesn&#8217;t work on my iPhone</h4>

	<p>This is true, it doesnt and that&#8217;s a problem. In <a href="http://www.apple.com/hotnews/thoughts-on-flash/" title="">Steve Jobs&#8217; angry missive</a> he blamed unreliable performance and battery draining as well as other things in their lack of support for Flash. I have an Android these days, and it is slow, but at the same time, it&#8217;s pretty useful to have Flash running on the device. Does it drain battery? Probably? No more than watching a video or checking Twitter every 20 seconds. Clearly there were other factors at work there, and I&#8217;m not blaming Apple really. It <strong>is</strong> annoying that a lot of sites <em>rely</em> on Flash at their core (in part Paperless Post is not exempt) but really that&#8217;s an issue with developement practices, not with Flash or the device.</p>

	<p>With or without Flash mobile is really a seperate concern. On mobile devices making something interactive, fast, and compatible is really the challenge.<br />
(In fact <strong>Interactive, Fast, Compatible</strong> is really the <a href="http://en.wikipedia.org/wiki/CAP_theorem" title=""><span class="caps">CAP</span></a> of mobile applications). Unfortunately the promise of <span class="caps">HTML5</span> only sort of solves this at this point. Have you used canvas on an iPad? It feels like you&#8217;re running Flash in <span class="caps">IE6</span> on a Pentium II. <span class="caps">SLOW</span>. Sure, there&#8217;s <span class="caps">CSS </span>Animation, but that really only takes you so far. I guarantee this will change in the next short while (years not months), but we&#8217;re talking about <em>now</em>.</p>

	<h4>It&#8217;s not crawlable by search engines</h4>

	<p>At its core this is true, but its just as true as with <span class="caps">AJAX</span> applications, as can be seen by the recent <a href="http://www.quirkey.com/blog/2011/02/10/ish/" title="">hash-bang hubub.</a> With Flash or JS you have the same challenges and roughly the same solutions. The most complete solution at this point is just to make a mobile or JS and Flash-free version that the more interactive version is a layer on top of. The fact that your restaurant&#8217;s website doesnt have an <span class="caps">HTML</span> menu is not Flash&#8217;s fault, its the developer&#8217;s fault for not making it accessible.</p>

	<h4>Its slow and crashy and makes my fans turn on</h4>

	<p>Yes, there are slow and buggy sites out there. Yes a lot of them have .swfs on them. Is Flash as a tool and platform really at fault here? Flash openened up the web to interactivity, high quality streaming video, and robust applications. As a tool it&#8217;s very very powerful. With great power comes great responsibility. It&#8217;s pretty easy to invoke a memory leak in Flash and it&#8217;s up to the developers to contain and optimize their apps. Again, this is really a problem of education and the development community at large. The most common target of this complaint are Flash based advertisements and banners. So an ad for body spray takes over your page, and seems to slow your whole computer down. Thats pretty annoying. Well just wait for <span class="caps">DOM</span>/canvas based ads. They&#8217;re coming, and they&#8217;re manipulating your entire page and breaking your JS. Just you wait.</p>

	<h3>A couple of reasons to love Flash</h3>

	<p>At the same time, and despite all the yelling, there are some clear reasons to still love Flash. It was the first to do a lot of these things we now call <span class="caps">HTML5</span> on the web. In many and maybe most cases it&#8217;s still better at doing them. In particular, while <span class="caps">HTML5</span> video works pretty well on certain devices and browsers, it&#8217;s pretty far behind its Flash counterpart in terms of speed and general functionality. Fonts as well. One of the sticking points we&#8217;ve had at Paperless Post is the lack of detailed font controls and especially interactivity with fonts. Sure @font-face is nice, but it has its limitations and compatibility issues when it comes to pixel perfect rendering. Canvas fonts are even worse.</p>

	<p>Flash is also pretty much everywhere. Besides the iThings, Android, your browser (every browser) its there and works almost exactly the same. That&#8217;s pretty sweet. It was one of Flash&#8217;s original promises and it still rings true (with one major exception). The proprietary thing also comes in handy in this respect, too. I&#8217;m not agreeing with it, but when a bug is fixed or a security hole is patched, updates come rather quickly to your end users. This is as compared to the wide range of browser release cycles.</p>

	<p>From a development standpoint, ActionScript is  close to something we know and love (presumably): <span class="caps">ECMA</span>Script. Newer versions have added more Java-like package management but a lot of the syntax (; and {}) et al will be very familiar. If you have only ever programmed on the Flash timeline, you would also know that most ActionScript apps are coded in a normal editor of your choosing and compiled on the command line. In fact, there&#8217;s a pretty cool project generation and build tool for ActionScript in Ruby called <a href="http://projectsprouts.org/" title="">sproutes</a>. Its syntax tends to lean more towards the Java and less towards the script, but it&#8217;s still very easy to pick up. In fact, I jumped in to one of our projects at Paperless recently and was able to code up a bunch of a module in a single day with only passing help from our resident <span class="caps">AS3</span> expert.</p>

	<h3>There is hope: quit being an asshole.</h3>

	<p>That all is great, but it misses the biggest and best thing that Flash has &#8211; a thriving community of extremely talented developers. Its not uncommon to find a Flash developer at this point with > 10 years experience coding in Flash for the web. 10+ years! How many years have you been programming JavaScript professionally? For how many years has it been your primary focus? How many large scale interactive applications have you built? My guess is that the average Flash developer has built 20 times that. For good reasons. Not only have they had better tools for most of that time, but they&#8217;ve also been in heavy demand for that whole time, and building applications non-stop. Many of the challenges that JS and <span class="caps">HTML5</span> developers are facing when building these large scale interactive apps, the Flash developers have already solved. They have those algorithms, that knowledge of 3D, that ability to turn code into motion and excitement.</p>

	<p>As a talented Flash developer, you&#8217;re probably starting to explore the world of <span class="caps">HTML5</span> and canvas and in some cases Cocoa and Objective-C. You&#8217;re starting to learn how to adapt your Flash expertise to this brave new world. In some cases you&#8217;re pretty put-off by the attitude of the JS community and its blind hatred of a tool and framework that you&#8217;ve devoted a portion of your career to up to this point. Understandably. A lot of these people are being assholes. If you devoted a lot of your waking hours to Java, it was and is really hard to want to ease into Ruby due to the bile and anti-you sentiment coming from the Ruby community. Over time, Ruby has adapted to its community and its forebearers (see <a href="http://jruby.org/" title="">JRuby</a>).</p>

	<p>As a JavaScript developer, it&#8217;s now your responsibility to stop the hate and welcome these super smart developers with open arms. Ask them questions, lean on them for advice, for hacks, for problem-solving. Hire them, even! They will appreciate it and they will blow your socks off. The best Flash developers aren&#8217;t tied to a language or technology, they&#8217;re just really interested in making awesome, boundary-pushing applications for the web. The fact is that they&#8217;re moving this way with or without you. If you help them, and respect them, and learn from them, your app and eventually the entire web will be a better place. If you shun them, they&#8217;ll just do what you do, but do it better. They&#8217;ve already done all the things that you&#8217;re trying to accomplish.</p>

	<p>Flash isn&#8217;t going anywhere for a little while, and complaining about it doesn&#8217;t help. Instead let&#8217;s all quit being assholes and work together to push the open web and open standards. Most importantly, let&#8217;s learn from all our mistakes and triumphs and hacks and continue to make the <em>now</em> web more fun.</p>

 ]]></content:encoded>
			<wfw:commentRss>http://www.quirkey.com/blog/2011/03/08/flash-rules/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>NovWriMo &#8211; Repaying some debt</title>
		<link>http://www.quirkey.com/blog/2010/10/31/novwrimo-repaying-some-debt/</link>
		<comments>http://www.quirkey.com/blog/2010/10/31/novwrimo-repaying-some-debt/#comments</comments>
		<pubDate>Mon, 01 Nov 2010 03:12:57 +0000</pubDate>
		<dc:creator>AQ</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.quirkey.com/blog/?p=463</guid>
		<description><![CDATA[In the spirit of NaNoWriMo I&#8217;m attempting something different for November. While, I&#8217;m not going to try to write an entire novel, I am going to try to write every day. Over the past two years I&#8217;ve released and maintained a ton of open source and beyond that just wrote a huge amount of code. [...]]]></description>
			<content:encoded><![CDATA[	<p>In the spirit of <a href="http://www.nanowrimo.org" title="">NaNoWriMo</a> I&#8217;m attempting something different for November. While, I&#8217;m not going to try to write an entire novel, I am going to try to write every day. Over the past two years I&#8217;ve released and maintained a ton of open source and beyond that just wrote a huge amount of code. I&#8217;ve talked about some of it at conferences, blogged a little here, twittered a little there, however, a lot of what I&#8217;ve learned and what I&#8217;ve released remains with little, no, or just plain poor documentation. Over the next 30 days I&#8217;m going to try to remedy that, by posting tutorials, updating docs, recording screencasts and just sharing some wisdom daily for some of the projects I&#8217;ve been working on. I&#8217;m going to try to do something every day, though theres a big block of <a href="http://rubyconf.org" title="">RubyConf</a> in the middle there, so I hope I can push even then.</p>

	<p>Here are some of the things I&#8217;m hoping to accomplish (in no particular order):</p>

	<ul>
		<li>New Sammy.js Site and updated documentation</li>
		<li>Updated and additional Sammy.js Tutorials</li>
		<li>A soca screencast and tutorial</li>
		<li>Updates to jim and writing about the typical workflow</li>
	</ul>

	<p>If you have other suggestions or places in some of my libraries that you&#8217;d like to see updated, let me know! Keep an eye here for the latest, starting tomorrow.</p>
 ]]></content:encoded>
			<wfw:commentRss>http://www.quirkey.com/blog/2010/10/31/novwrimo-repaying-some-debt/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sammy 0.6: California Suite</title>
		<link>http://www.quirkey.com/blog/2010/09/02/sammy-0-6-california-suite/</link>
		<comments>http://www.quirkey.com/blog/2010/09/02/sammy-0-6-california-suite/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 13:18:12 +0000</pubDate>
		<dc:creator>AQ</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Sammy]]></category>
		<category><![CDATA[Software/Scripts]]></category>

		<guid isPermaLink="false">http://www.quirkey.com/blog/?p=453</guid>
		<description><![CDATA[It&#8217;s a couple months in the making, but I&#8217;m happy to say that Sammy.js 0.6 is finally here. Check out the HISTORY and the Changes. I&#8217;m calling this release the California Suite in honor of my move to the West Coast and the fact that I did most of this coding on the plane back [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://img.skitch.com/20100831-11assdyxnsmqepn2aftj5mu4kr.png" alt="" /></p>
<p>It&#8217;s a couple months in the making, but I&#8217;m happy to say that <a href="http://code.quirkey.com/sammy">Sammy.js</a> 0.6 is finally here. Check out the <a href="http://github.com/quirkey/sammy/blob/master/HISTORY.md"><span class="caps">HISTORY</span></a> and the <a href="http://github.com/quirkey/sammy/compare/v0.5.4...v0.6.0">Changes</a>. I&#8217;m calling this release the California Suite in honor of my move to the West Coast and the fact that I did most of this coding on the plane back and forth. There are some awesome big new features that I&#8217;ve been using for a little while now and I can say are a big improvement over previous releases.</p>
<p><a href="http://github.com/quirkey/sammy/tarball/v0.6.0">Download it!</a></p>
<p>Before I get to that, I want to mention that work is in full swing on a new Sammy.js website with more documentation and other great stuff. I even have a real logo which I hope to share soon (stickers, anyone?). Before the site launches, though, I set up a <a href="http://github.com/quirkey/sammy/wiki/">new GitHub wiki</a> so that sammy.js users and developers can share projects and code that they&#8217;ve been working on.</p>
<p>On to the features!</p>
<span id="more-453"></span>
<h3>Context! Context! Context!</h3>
<p>The biggest complaint and frustration that I heard from people working with Sammy was about dealing with rendering complex views on the client. If you&#8217;re doing full client side applications or any amount of client side templating you&#8217;ve felt the pain of deeply nested callbacks and complex workarounds for interpolating data in an asynchronous environment. It&#8217;s all like, render this template, wait, first I need the data, hold up, I cant even render that yet I need to get this other template first. Here&#8217;s a common example of what I&#8217;m talking about:</p>
<div class="highlight"><pre><span class="k">this</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="s1">&#39;#/&#39;</span><span class="o">,</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span><br />
  <span class="k">this</span><span class="p">.</span><span class="nx">partial</span><span class="p">(</span><span class="s1">&#39;index.mustache&#39;</span><span class="o">,</span> <span class="kd">function</span><span class="p">(</span><span class="nx">html</span><span class="p">)</span> <span class="p">{</span><br />
    <span class="nx">$</span><span class="p">(</span><span class="s1">&#39;#main&#39;</span><span class="p">).</span><span class="nx">html</span><span class="p">(</span><span class="nx">html</span><span class="p">);</span><br />
    <span class="nx">$</span><span class="p">.</span><span class="nx">getJSON</span><span class="p">(</span><span class="s1">&#39;items.json&#39;</span><span class="o">,</span> <span class="kd">function</span><span class="p">(</span><span class="nx">items</span><span class="p">)</span> <span class="p">{</span><br />
      <span class="k">this</span><span class="p">.</span><span class="nx">partial</span><span class="p">(</span><span class="s1">&#39;item.mustache&#39;</span><span class="o">,</span> <span class="nx">items</span><span class="o">,</span> <span class="kd">function</span><span class="p">(</span><span class="nx">item</span><span class="o">,</span> <span class="nx">i</span><span class="p">)</span> <span class="p">{</span><br />
        <span class="nx">$</span><span class="p">(</span><span class="s1">&#39;#main ul&#39;</span><span class="p">).</span><span class="nx">append</span><span class="p">(</span><span class="nx">item</span><span class="p">);</span><br />
      <span class="p">});</span><br />
    <span class="p">});</span><br />
  <span class="p">));</span><br />
<span class="p">});</span><br />
</pre></div>
<p>It&#8217;s not just nested callback&#8217;s that are the pain &#8211; its the knowing (or not knowing) when a template will be there or not. It&#8217;s also trying to deal with fetching data and fetching templates within the same context without a unified <span class="caps">API</span>. After kind of examining how other people are doing this, I took some queues from jQuery&#8217;s <span class="caps">API</span> as well as &#8216;promise&#8217; style programming and <a href="http://sexyjs.com/">Sexy.js</a>. The result is <code>Sammy.RenderContext</code>. You create a <code>RenderContext</code> by calling one of three methods within a route/<code>EventContext</code> &#8211; <code>load()</code> <code>render()</code> or <code>partial()</code>. Once you have a every method you chain to it is guaranteed to execute in the order that you chain it <em>regardless of it synchronicity</em>. This means that you can put an <code>appendTo()</code> after a <code>load()</code> and the content won&#8217;t be appended until its fetched asynchronously from a remote location. The content from the previous method in the chain is also passed along so you don&#8217;t have to constantly pull out references. The code above, translated to the <em>new way</em> looks like:</p>
<div class="highlight"><pre><span class="k">this</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="s1">&#39;#/&#39;</span><span class="o">,</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span><br />
  <span class="k">this</span><span class="p">.</span><span class="nx">render</span><span class="p">(</span><span class="s1">&#39;index.mustache&#39;</span><span class="p">)</span><br />
      <span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="s1">&#39;#main&#39;</span><span class="p">)</span><br />
      <span class="p">.</span><span class="nx">render</span><span class="p">(</span><span class="s1">&#39;items.json&#39;</span><span class="p">)</span><br />
      <span class="p">.</span><span class="nx">renderEach</span><span class="p">(</span><span class="s1">&#39;item.mustache&#39;</span><span class="p">)</span><br />
      <span class="p">.</span><span class="nx">appendTo</span><span class="p">(</span><span class="s1">&#39;#main ul&#39;</span><span class="p">);</span><br />
<span class="p">});</span><br />
</pre></div>
<p>A wee bit nicer. Not only does it improve readability but it makes it much easier to do longer more involved client side templating without getting lost in a mire of order and context passing. RenderContext&#8217;s can also be invoked side by side in a single route for parallel execution of chains. Each chain is its own object and keeps its own state. I tried to keep the <span class="caps">API</span> concise but with just a few methods, I think most situations are covered:</p>
<div class="highlight"><pre><span class="nx">then</span><span class="p">(</span><span class="kd">function</span><span class="p">(</span><span class="nx">content</span><span class="o">,</span> <span class="nx">previous</span><span class="p">)</span> <span class="p">{})</span><br />
<span class="nx">next</span><span class="p">(</span><span class="nx">content</span><span class="p">);</span><br />
<span class="nx">wait</span><span class="p">();</span><br />
<span class="c">// Loading local or remote content</span><br />
<span class="nx">load</span><span class="p">(</span><span class="s1">&#39;item.template&#39;</span><span class="p">)</span><br />
<span class="nx">load</span><span class="p">(</span><span class="nx">$</span><span class="p">(</span><span class="s1">&#39;.item&#39;</span><span class="p">))</span><br />
<span class="c">// rendering templates</span><br />
<span class="nx">interpolate</span><span class="p">(</span><span class="s1">&#39;item.template&#39;</span><span class="o">,</span> <span class="p">{})</span><br />
<span class="nx">interpolate</span><span class="p">(</span><span class="nx">$</span><span class="p">(</span><span class="s1">&#39;.item&#39;</span><span class="p">)</span><span class="o">,</span> <span class="p">{})</span><br />
<span class="nx">render</span><span class="p">(</span><span class="s1">&#39;item.template&#39;</span><span class="o">,</span> <span class="p">{})</span><br />
<span class="nx">partial</span><span class="p">(</span><span class="s1">&#39;item.template&#39;</span><span class="o">,</span> <span class="p">{})</span><br />
<span class="nx">collect</span><span class="p">(</span><span class="nx">items</span><span class="o">,</span> <span class="kd">function</span><span class="p">(</span><span class="nx">item</span><span class="o">,</span> <span class="nx">i</span><span class="p">)</span> <span class="p">{})</span><br />
<span class="nx">renderEach</span><span class="p">(</span><span class="s1">&#39;item.template&#39;</span><span class="o">,</span> <span class="nx">items</span><span class="p">)</span><br />
<span class="c">// <span class="caps">DOM</span> Manipulation</span><br />
<span class="nx">swap</span><span class="p">()</span><br />
<span class="nx">appendTo</span><span class="p">(</span><span class="nx">$</span><span class="p">(</span><span class="nx">element</span><span class="p">))</span><br />
<span class="nx">prependTo</span><span class="p">(</span><span class="nx">$</span><span class="p">(</span><span class="nx">element</span><span class="p">))</span><br />
<span class="nx">replace</span><span class="p">(</span><span class="nx">$</span><span class="p">(</span><span class="nx">element</span><span class="p">))</span><br />
<span class="c">// Events</span><br />
<span class="nx">trigger</span><span class="p">(</span><span class="s1">&#39;name&#39;</span><span class="o">,</span> <span class="p">{})</span><br />
</pre></div>

<p>Along with the readability improvements, the <code>RenderContext</code> (specifically <code>load()</code>) allows for <span class="caps">DOM</span> style or pre-embedded templating. Meaning, templates don&#8217;t have to come from files, they can be <span class="caps">DOM</span> elements and embedded into <code>&lt;script&gt;</code> or hidden tags. This goes along with the two new templating engines added as well . . .</p>
<h3>Alchemy</h3>
<p>I thought I had this really novel idea. Why not use classes or other attributes of <span class="caps">DOM</span> elements to define how they&#8217;re tied to a <span class="caps">JSON</span> object? I worked on some prototypes and finally found a name and wrote some real code. It turns out, it was a pretty good idea, but also one that had been done before. 0.6 includes plugins for my own <code>Sammy.Meld</code> and the existing and by default more popular <a href="http://beebole.com/pure/">pure.js</a>.</p>
<p>The basic idea of both of these engines is that you take some data like this:</p>
<div class="highlight"><pre><span class="p">{</span><br />
  <span class="s2">&quot;post&quot;</span><span class="o">:</span> <span class="p">{</span><br />
    <span class="s2">&quot;title&quot;</span><span class="o">:</span> <span class="s2">&quot;My Post&quot;</span><span class="o">,</span><br />
    <span class="s2">&quot;body&quot;</span><span class="o">:</span> <span class="s2">&quot;Lorem ipsum dolor sit amet.&quot;</span><span class="o">,</span><br />
    <span class="s2">&quot;tags&quot;</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;one&quot;</span><span class="o">,</span> <span class="s2">&quot;two&quot;</span><span class="o">,</span> <span class="s2">&quot;three&quot;</span><span class="p">]</span><span class="o">,</span><br />
    <span class="s2">&quot;meta&quot;</span><span class="o">:</span> <span class="p">{</span><br />
      <span class="s2">&quot;comments&quot;</span><span class="o">:</span> <span class="mi">5</span><span class="o">,</span><br />
      <span class="s2">&quot;time&quot;</span><span class="o">:</span> <span class="s2">&quot;Yesterday&quot;</span><br />
    <span class="p">}</span><br />
  <span class="p">}</span><br />
<span class="p">}</span><br />
</pre></div>
<p>And some <span class="caps">HTML</span> like this:</p>
<div class="highlight"><pre><span class="nt">&lt;div</span> <span class="na">class=</span><span class="s">&quot;post&quot;</span><span class="nt">&gt;</span><br />
  <span class="nt">&lt;h2</span> <span class="na">class=</span><span class="s">&quot;title&quot;</span><span class="nt">&gt;&lt;/h2&gt;</span><br />
  <span class="nt">&lt;div</span> <span class="na">class=</span><span class="s">&quot;body&quot;</span><span class="nt">&gt;&lt;/div&gt;</span><br />
  <span class="nt">&lt;span</span> <span class="na">class=</span><span class="s">&quot;tags&quot;</span><span class="nt">&gt;&lt;/span&gt;</span><br />
  <span class="nt">&lt;ul</span> <span class="na">class=</span><span class="s">&quot;meta&quot;</span><span class="nt">&gt;</span><br />
    <span class="nt">&lt;li&gt;</span>Comments Count: <span class="nt">&lt;span</span> <span class="na">class=</span><span class="s">&quot;comments&quot;</span><span class="nt">&gt;&lt;/span&gt;&lt;/li&gt;</span><br />
    <span class="nt">&lt;li&gt;</span>Posted: <span class="nt">&lt;span</span> <span class="na">class=</span><span class="s">&quot;time&quot;</span><span class="nt">&gt;&lt;/span&gt;&lt;/li&gt;</span><br />
  <span class="nt">&lt;/ul&gt;</span><br />
<span class="nt">&lt;/div&gt;</span><br />
</pre></div>
<p>Meld them together and you should get something like:</p>
<div class="highlight"><pre><span class="nt">&lt;div</span> <span class="na">class=</span><span class="s">&quot;post&quot;</span><span class="nt">&gt;</span><br />
  <span class="nt">&lt;h2</span> <span class="na">class=</span><span class="s">&quot;title&quot;</span><span class="nt">&gt;</span>My Post<span class="nt">&lt;/h2&gt;</span><br />
  <span class="nt">&lt;div</span> <span class="na">class=</span><span class="s">&quot;body&quot;</span><span class="nt">&gt;</span>Lorem ipsum dolor sit amet.<span class="nt">&lt;/div&gt;</span><br />
  <span class="nt">&lt;span</span> <span class="na">class=</span><span class="s">&quot;tags&quot;</span><span class="nt">&gt;</span>one<span class="nt">&lt;/span&gt;</span><br />
  <span class="nt">&lt;span</span> <span class="na">class=</span><span class="s">&quot;tags&quot;</span><span class="nt">&gt;</span>two<span class="nt">&lt;/span&gt;</span><br />
  <span class="nt">&lt;span</span> <span class="na">class=</span><span class="s">&quot;tags&quot;</span><span class="nt">&gt;</span>three<span class="nt">&lt;/span&gt;</span><br />
  <span class="nt">&lt;ul</span> <span class="na">class=</span><span class="s">&quot;meta&quot;</span><span class="nt">&gt;</span><br />
    <span class="nt">&lt;li&gt;</span>Comments Count: <span class="nt">&lt;span</span> <span class="na">class=</span><span class="s">&quot;comments&quot;</span><span class="nt">&gt;</span>5<span class="nt">&lt;/span&gt;&lt;/li&gt;</span><br />
    <span class="nt">&lt;li&gt;</span>Posted: <span class="nt">&lt;span</span> <span class="na">class=</span><span class="s">&quot;time&quot;</span><span class="nt">&gt;</span>Yesterday<span class="nt">&lt;/span&gt;&lt;/li&gt;</span><br />
  <span class="nt">&lt;/ul&gt;</span><br />
<span class="nt">&lt;/div&gt;</span><br />
</pre></div>
<p>There are some clear benefits to this over traditional tag style (mustache, ejs) style templating. Namely, its just <span class="caps">HTML</span>. This means that you can include it in the <span class="caps">DOM</span> on the initial render and not have to go fetch it from the server. It also means that a designer can just design it and even use <em>lorem ipsum</em> if you want, and you don&#8217;t have to go through and <em>add</em> the templating language. There are some downsides, too. <span class="caps">DOM</span> manipulation even with jQuery&#8217;s speed is pretty much always going to be slower then just text interpolation. I&#8217;m working on improving the speed of Meld though caching and faster manipulations, but it ain&#8217;t easy. The other big downside is that complicated iteration or template logic is pretty hard to do in this style. Pure tries to get around this by using a third element called <code>directives</code> which are further instructions on how to meld the data and the markup. I forgo this extra ability to configure in Meld in favor of very simple transformations (ul,ol = lists) and a much smaller file size (<em>uncompressed</em> meld is only 4K). I&#8217;ve been using Meld on some personal projects and hope to test its worth in a real production environment very soon. You can see more examples of it&#8217;s power <a href="http://github.com/quirkey/sammy/blob/master/test/test_sammy_meld.js">in the tests</a></p>
<h3>What&#8217;s next?</h3>
<p>I&#8217;m still pushing to get Sammy.js to 1.0 in the very near future. I really don&#8217;t think theres that much between here and there. I&#8217;ll mention that I&#8217;ve finally been seriously coding with node and server side js and I&#8217;m not that happy with the current state of routing libs there. Server side sammy? Maybe.</p>
<h3>More</h3>
<p>There were a lot of smaller bug fixes and improvements beyond Meld and the RenderContext so I definitely encourage checking out the <a href="http://github.com/quirkey/sammy/blob/master/HISTORY.md">full list</a> and making the upgrade soon. Big thanks as always to everyone who helped with the release. Go out and make some apps!</p>]]></content:encoded>
			<wfw:commentRss>http://www.quirkey.com/blog/2010/09/02/sammy-0-6-california-suite/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Lessons from working for startups</title>
		<link>http://www.quirkey.com/blog/2010/07/29/lessons-from-working-for-startups/</link>
		<comments>http://www.quirkey.com/blog/2010/07/29/lessons-from-working-for-startups/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 15:34:55 +0000</pubDate>
		<dc:creator>AQ</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Entrepreneurship]]></category>

		<guid isPermaLink="false">http://www.quirkey.com/blog/?p=443</guid>
		<description><![CDATA[When I saw that tweet this weekend it dredged up a bunch of thoughts and experiences that I&#8217;ve been wanting to put down on paper for a very long time. Why not now? Over the past 6 years I&#8217;ve worked with 8 different startups in different capacities and pitched or met with countless others. I&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[	<p><a href="http://twitter.com/joedamato/status/19451827323"><img src="http://img.skitch.com/20100728-b1ub8is7c59eaqq78cdk8bcgx2.png" /></a></p>

	<p>When I saw that tweet this weekend it dredged up a bunch of thoughts and experiences that I&#8217;ve been wanting to put down on paper for a very long time. Why not now?<br />
<span id="more-443"></span><br />
Over the past 6 years I&#8217;ve worked with 8 different startups in different capacities and pitched or met with countless others. I&#8217;ve been a founder; I&#8217;ve worked for equity; I&#8217;ve been a consultant getting paid cold-hard-cash; I&#8217;ve built prototypes, full products, and everything in between. I know there are a lot of more experienced developers out there, but even so, I think I have some things to share, and lessons I&#8217;ve learned from the good, bad and ugly of being a developer in a startup.</p>

	<h3>Startups aren&#8217;t for everyone</h3>

	<p>Every company is different, and from what I&#8217;ve experienced so far, the mindset and attitude of the bay area is different in a lot of ways from the NY tech scene. At the same rate, though, there are a lot of common things between most startups. In general the environment and process is much different from a large established company, especially in the early days. This means if you need rock solid stability of schedule, work cycle, direction, space, pretty much anything, startup life might not be for you. There is one constant in being involved with a startup and that is change. If you&#8217;re just a developer along for the ride, or a co-founder, change should be something you take in stride. A lot of this has to do with trust. Do you trust the people guiding this ship? Obviously this applies to any job, but is amplified when your livelihood is directly tied to the people you work with.</p>

	<h3>Don&#8217;t invest in an idea you don&#8217;t believe in</h3>

	<p>This should go without saying, but you&#8217;d be surprised when people don&#8217;t really understand what taking equity or options really mean. When you take equity as a developer (especially as a non-founder) what you&#8217;re actually doing is investing in the company in exchange for your skills/work. This isn&#8217;t something to be taken lightly &#8211; even if it&#8217;s a tiny piece. Take yourself out of the position of making the exchange for work. Assuming you had the money and opportunity too, would you give this company you&#8217;re money in exchange for equity. This goes beyond trust into the realm of belief. Do you <strong>believe</strong> that the startup you are investing in will actually be successful and provide a return on your investment? If you don&#8217;t believe that or have any doubts then as a developer you&#8217;re probably not going to work hard to achieve that goal.</p>

	<p>This isn&#8217;t just about actualization, it&#8217;s about making good investments. Whatever you charge for your time, putting stake in something you don&#8217;t think is going to be successful is basically taking whatever money you would have made for that time and flushing it.</p>

	<h3>Get paid</h3>

	<p>If you&#8217;re a developer working for a startup theres no reason you shouldn&#8217;t be getting paid, even if you&#8217;re developer numero uno. Perhaps this means taking a slight pay cut from what you would be making at an established company in exchange for some ownership, but the general rule is you should be making more then enough to cover your life costs and at least enough that you&#8217;re not bitter towards those paying you.</p>

	<p>I&#8217;ve done pure equity in the past and have pretty much completely sworn off of it. Unless you&#8217;re a co-founder, it&#8217;s going to be a very rare case to be committed enough to go the long haul without getting paid. And even if you are a co-founder, you should have enough savings to pay yourself, or think about raising some capital so you can.</p>

	<p>If you&#8217;re approached by a startup to build their prototype or work on their app and all they have is an idea, they should pay you for your services. If this is the founders &#8216;side-project&#8217; and/or they haven&#8217;t raised or put in any capital, thats a definite sign that you should get paid. Think about it &#8211; if they&#8217;re not willing to invest the capital to pay you, why should you invest?</p>

	<h3>Retainers Rule</h3>

	<p>Going along with the rule that <strong>change</strong> is one of the biggest aspects of being part of a startup, if you&#8217;re working as a freelance developer you need to structure your contract so it accounts for this. If the startup is small or just starting, working on a project basis is a bad idea as a rule. If you&#8217;re working to a fixed scope like &#8220;Working prototype of myawesomestartup.com&#8221;, even if the details are very well defined, what happens when the entire goal of the startup changes? Do you scrap your work? Do you ask for a &#8216;change-order&#8217;? Do you have to just suck it up and forget about getting paid for the extra time you put in? If you don&#8217;t assume this scenario from the start, it&#8217;s often awkward and painful to try to negotiate this post-change.</p>

	<p>At the end of my last round of freelancing, almost all the projects I was working on were set up on some sort of retainer. This was great for me, because I had a definite amount of work and dollars coming in every month. It was great for the startup because they didn&#8217;t have to worry about getting charged extra or haggling over money every time they changed their minds.</p>

	<p>I pitched every new job and potential client like this, and in the end it worked out great. If the client thought this was a bad idea or was so sure that they had everything ready from the start, I made sure to put in a clause or section that defined exactly what would happen and how much it would cost when they did want something different. (it <em>always</em> happened).</p>

	<h3>Get the position and job you want</h3>

	<p>This all comes down to the final point, that as a skilled developer the ball is really in your court. The key is to not abuse that advantage, but definitely make use of it to get the job that you want. The reason I hadn&#8217;t settled down into a full time job was really because it took this long to find exactly what I wanted. Paperless Post finally met my criteria:</p>

	<ul>
		<li>Great people</li>
		<li>Clear direction and strong motivation</li>
		<li>A real business plan with actual revenue</li>
		<li>Willingness to pay and reward good work</li>
		<li>Dedication to Open source</li>
	</ul>

	<p>It really shouldn&#8217;t be so rare to find this, but it really is from my experience. Your requirements might be different, but if you&#8217;re ready to take the plunge of investing a lot of time in a product or team it should always be doing the best to meet these goals. As a quick aside, Paperless Post is <a href="http://www.paperlesspost.com/info/about/jobs/jobs" title="">currently hiring in both NY and SF</a> feel free to mention this post.</p>

	<p>Working for and with startups has been uniquely rewarding for me, not just because I&#8217;m <a href="http://img.skitch.com/20100729-xbejd63jtug633g1b9end3sbnf.png" title="">ballin&#8217;</a> but because I&#8217;ve learned more in the past couple of years then I ever could have hoped otherwise.</p>
 ]]></content:encoded>
			<wfw:commentRss>http://www.quirkey.com/blog/2010/07/29/lessons-from-working-for-startups/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>An invitation to my new gig</title>
		<link>http://www.quirkey.com/blog/2010/04/16/an-invitation-to-my-new-gig/</link>
		<comments>http://www.quirkey.com/blog/2010/04/16/an-invitation-to-my-new-gig/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 21:48:49 +0000</pubDate>
		<dc:creator>AQ</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Entrepreneurship]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Talks]]></category>

		<guid isPermaLink="false">http://www.quirkey.com/blog/?p=418</guid>
		<description><![CDATA[After freelancing (or hustlin&#8217; &#8211; as I called it) for the past year and more, I&#8217;m finally settling down. As of last week, I&#8217;m now the CTO of Paperless Post. Though I truly loved working with a number of the clients I helped out over the past year, Paperless Post made me an offer I [...]]]></description>
			<content:encoded><![CDATA[	<p><a href="http://www.paperlesspost.com"><img src="http://img.skitch.com/20100416-qsqhhsqwp1m9bxpg32we1skwfe.png" /></a></p>

	<p>After freelancing (or hustlin&#8217; &#8211; as I called it) for the past year and more, I&#8217;m finally settling down. As of last week, I&#8217;m now the <span class="caps">CTO</span> of <a href="http://www.paperlesspost.com" title="">Paperless Post.</a> Though I truly loved working with a number of the clients I helped out over the past year, Paperless Post made me an offer I couldn&#8217;t refuse &#8211; not just monetarily. The team they&#8217;ve assembled is not only extremely talented, but is a pleasure to work with and constantly challenging each other to do great work. It would take nothing less to get me to commit to a project full time. That&#8217;s not all, though. For my friends and followers in the open source community, you&#8217;ll be happy to know that at PP we&#8217;re already using a number of my projects including Sammy.js. I actually worked to get into my contract that my responsibilities as a member of the community and a maintainer of these and new projects is part of my job. This means that I should actually get some dedicated time to work on Sammy and hopefully extract some of the cool ideas that we&#8217;re working on and get to share them with the community.</p>

	<p>Paperless Post isn&#8217;t what you&#8217;d think of as a typical web startup. Sure, theres funding, competitors, crazy deploys, late night coding. However, they&#8217;ve actual made a business and <a href="http://www.paperlesspost.com/press" title="">the world outside of silicon alley has already noticed</a> Its not a twitter mashup or a buzz word filled rails app with some missing vowels in the name. Our goal is not to constantly push the envelope, its to do a couple things really well and with style. I can&#8217;t tell you how excited I am to be helping to shape the future of this product.</p>

	<p>The past couple of weeks has been a serious roller coaster of emotions but somehow thanks to my wife and friends I&#8217;ve landed on my feet and I&#8217;m better for it. Thanks especially to my former clients for being so supportive during this crazy transition.</p>

 ]]></content:encoded>
			<wfw:commentRss>http://www.quirkey.com/blog/2010/04/16/an-invitation-to-my-new-gig/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Sammy 0.5: Something for Everyone</title>
		<link>http://www.quirkey.com/blog/2010/02/15/sammy-0-5-something-for-everyone/</link>
		<comments>http://www.quirkey.com/blog/2010/02/15/sammy-0-5-something-for-everyone/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 19:06:24 +0000</pubDate>
		<dc:creator>AQ</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Sammy]]></category>
		<category><![CDATA[Software/Scripts]]></category>

		<guid isPermaLink="false">http://www.quirkey.com/blog/?p=411</guid>
		<description><![CDATA[I&#8217;m pleased to announce the next major release of Sammy.js, 0.5.0. I&#8217;ll go over what I think are the most import changes, but you can check out the HISTORY or just cut to the chase and download it. jQuery 1.4.1 One of the big events I was waiting for in order to release this new [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/blog/uploads/sammy-something-for-everyone.jpg" alt="Something for everyone" /></p>
<p>I&#8217;m pleased to announce the next major release of <a href="http://code.quirkey.com/sammy">Sammy.js</a>, 0.5.0. I&#8217;ll go over what I think are the most import changes, but you can check out the <a href="http://github.com/quirkey/sammy/blob/master/HISTORY.md"><span class="caps">HISTORY</span></a> or just cut to the chase and <a href="http://github.com/quirkey/sammy/tarball/v0.5.0">download it</a>.</p>
<h3>jQuery 1.4.1</h3>
<p>One of the big events I was waiting for in order to release this new version was the <a href="http://jquery14.com">release of jQuery 1.4.1</a>. Besides being a good leap and jump faster then previous versions, the latest jQuery added support for cross-browser bubbling of the <code>submit</code> event. This might not sound like a big deal, but Sammy handles <code>post/put/delete</code> routes by binding to forms and their <code>submit</code> events. In previous versions of Sammy, if a form was dynamically added to the page (i.e. by a <code>partial</code> or <code>get</code> route), you (or the app) would fire a <code>changed</code> event, which would tell the app to search for all newly added forms and bind to their <code>submit</code> events. Using the power of jQuery 1.4.1, Sammy can now just listen for submit events that will bubble up to the applications element and from their dispatch the route. In general this is a lot cleaner and will make it easier for beginners as it just <em>works</em>.</p>
<h3>Chain of fools</h3>
<p>From user requests, and to fulfill my own desires, I&#8217;ve tried make Sammy more adaptable to different styles of coding/app creation. The first thing I realized why not make Sammy app definitions chain-able? It&#8217;s a style of development that jQuery developers are already used to, and it looks pretty swanky, too. With 0.5, all the app modifying methods are now chain-able:</p>
<div class="highlight"><pre>  <br />
<br />
<span class="c">// classic style:</span><br />
<span class="nx">$</span><span class="p">.</span><span class="nx">sammy</span><span class="p">(</span><span class="kd">function</span><span class="p">()</span> <span class="p">{</span><br />
  <span class="k">this</span><span class="p">.</span><span class="nx">use</span><span class="p">(</span><span class="nx">Sammy</span><span class="p">.</span><span class="nx">Mustache</span><span class="p">);</span><br />
  <span class="k">this</span><span class="p">.</span><span class="nx">use</span><span class="p">(</span><span class="nx">Sammy</span><span class="p">.</span><span class="nx">Session</span><span class="p">);</span><br />
  <br />
  <span class="k">this</span><span class="p">.</span><span class="nx">before</span><span class="p">(</span><span class="kd">function</span><span class="p">()</span> <span class="p">{</span><br />
    <span class="c">// &#8230;</span><br />
  <span class="p">});</span><br />
  <br />
  <span class="k">this</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="s1">&#39;#/&#39;</span><span class="o">,</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span><br />
    <span class="c">// &#8230;</span><br />
  <span class="p">});</span><br />
  <br />
  <span class="k">this</span><span class="p">.</span><span class="nx">bind</span><span class="p">(</span><span class="s1">&#39;run&#39;</span><span class="o">,</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span><br />
    <span class="c">// &#8230;</span><br />
  <span class="p">});</span><br />
  <br />
<span class="p">})</span><br />
<br />
<span class="c">// New chain style:</span><br />
<span class="nx">$</span><span class="p">.</span><span class="nx">sammy</span><span class="p">()</span><br />
  <span class="p">.</span><span class="nx">use</span><span class="p">(</span><span class="nx">Sammy</span><span class="p">.</span><span class="nx">Mustache</span><span class="p">)</span><br />
  <span class="p">.</span><span class="nx">use</span><span class="p">(</span><span class="nx">Sammy</span><span class="p">.</span><span class="nx">Session</span><span class="p">)</span><br />
  <span class="p">.</span><span class="nx">before</span><span class="p">(</span><span class="kd">function</span><span class="p">()</span> <span class="p">{</span> <br />
    <span class="c">// .</span><br />
  <span class="p">})</span><br />
  <span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="s1">&#39;#/&#39;</span><span class="o">,</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span><br />
    <span class="c">// &#8230;</span><br />
  <span class="p">})</span><br />
  <span class="p">.</span><span class="nx">bind</span><span class="p">(</span><span class="s1">&#39;run&#39;</span><span class="o">,</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span><br />
    <span class="c">// &#8230;</span><br />
  <span class="p">});</span><br />
    <br />
</pre></div>
<h3>Sammy()</h3>
<p>Once just a namespace, <code>Sammy()</code> is now a function (and its aliased to $.sammy). The <code>Sammy()</code> method provides access to the new Sammy.apps object and hence allows you to access the different Sammy applications you&#8217;ve added to the page without having to define additional global vars. Finding and extending is all based on @element_selector@s so those should be unique per-application. It also provides a quicker syntax for defining an app bound to an <code>element_selector</code>.</p>
<div class="highlight"><pre><span class="c">// Old way</span><br />
<span class="c">// we&#39;re forced to make app a global so we can access it </span><br />
<span class="c">// outside of this closure</span><br />
<span class="nx">app</span> <span class="o">=</span> <span class="nx">$</span><span class="p">.</span><span class="nx">sammy</span><span class="p">(</span><span class="kd">function</span><span class="p">()</span> <span class="p">{</span><br />
  <span class="k">this</span><span class="p">.</span><span class="nx">element_selector</span> <span class="o">=</span> <span class="s1">&#39;#myapp&#39;</span><span class="o">;</span><br />
  <span class="c">//&#8230;</span><br />
<span class="p">})</span><br />
<span class="c">// equivalent to</span><br />
<span class="nx">app</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Sammy</span><span class="p">.</span><span class="nx">Application</span><span class="p">(</span><span class="kd">function</span><span class="p">()</span> <span class="p">{</span><br />
  <span class="k">this</span><span class="p">.</span><span class="nx">element_selector</span> <span class="o">=</span> <span class="s1">&#39;#myapp&#39;</span><span class="o">;</span><br />
  <span class="c">//&#8230;</span><br />
<span class="p">});</span><br />
<br />
<span class="c">// <span class="caps">NEW</span> <span class="caps">WAY</span></span><br />
<span class="nx">$</span><span class="p">.</span><span class="nx">sammy</span><span class="p">(</span><span class="s1">&#39;#myapp&#39;</span><span class="o">,</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span><br />
  <span class="c">//&#8230;</span><br />
<span class="p">});</span><br />
<span class="c">// equivalent to Sammy(&#39;#myapp&#39;, function() {})</span><br />
<br />
<span class="c">// No need to assign it, the app can be looked up by element selector</span><br />
<span class="nx">$</span><span class="p">.</span><span class="nx">sammy</span><span class="p">(</span><span class="s1">&#39;#myapp&#39;</span><span class="p">)</span> <span class="c">//=&gt; Sammy.Application</span><br />
</pre></div>
<p>There are some cool use-cases for this, including being able to iterate over all the Sammy apps in play and extend them.</p>
<h3><code>any</code> way you want it</h3>
<p>Sammy 0.5 adds the new <code>any</code> <em>pseudo</em>-verb which allows you to easily add a route that will match against any verb:</p>
<div class="highlight"><pre>  <br />
<span class="nx">$</span><span class="p">.</span><span class="nx">sammy</span><span class="p">(</span><span class="kd">function</span><span class="p">()</span> <span class="p">{</span><br />
  <br />
  <span class="k">this</span><span class="p">.</span><span class="nx">any</span><span class="p">(</span><span class="s1">&#39;#/&#39;</span><span class="o">,</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span><br />
    <span class="k">this</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s2">&quot;I&#39;m up for anything&quot;</span><span class="p">);</span><br />
  <span class="p">});</span><br />
  <br />
  <span class="c">// also equivalent</span><br />
  <span class="k">this</span><span class="p">.</span><span class="nx">route</span><span class="p">(</span><span class="s1">&#39;#/&#39;</span><span class="o">,</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{});</span><br />
  <br />
<span class="p">});</span><br />
</pre></div>
<p>This was actually the first step of another way to define Sammy applications. The new <code>mapRoutes()</code> method allows you to define any number of routes as 2D Array.</p>
<div class="highlight"><pre><span class="nx">$</span><span class="p">.</span><span class="nx">sammy</span><span class="p">(</span><span class="kd">function</span><span class="p">()</span> <span class="p">{</span><br />
  <br />
  <span class="k">this</span><span class="p">.</span><span class="nx">runIndex</span> <span class="o">=</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span><br />
    <span class="k">this</span><span class="p">.</span><span class="nx">partial</span><span class="p">(</span><span class="s1">&#39;index.template&#39;</span><span class="p">);</span><br />
  <span class="p">};</span><br />
  <br />
  <span class="k">this</span><span class="p">.</span><span class="nx">mapRoutes</span><span class="p">([</span><br />
    <span class="c">// each element in the array represents the arguments sent to route()</span><br />
    <span class="p">[</span><span class="s1">&#39;get&#39;</span><span class="o">,</span> <span class="s1">&#39;#/user&#39;</span><span class="o">,</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span><br />
      <span class="k">this</span><span class="p">.</span><span class="nx">partial</span><span class="p">(</span><span class="s1">&#39;user.template&#39;</span><span class="p">);</span><br />
    <span class="p">}]</span><span class="o">,</span><br />
    <span class="c">// leaving out the verb assumes the verb is &#39;any&#39;</span><br />
    <span class="p">[</span><span class="sr">/\/alert$/</span><span class="o">,</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span><br />
      <span class="nx">alert</span><span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">params</span><span class="p">[</span><span class="s1">&#39;alert&#39;</span><span class="p">]);</span><br />
    <span class="p">}]</span><span class="o">,</span><br />
    <span class="c">// passing a string instead of a callback assigns the method with that</span><br />
    <span class="c">// name from the application.</span><br />
    <span class="p">[</span><span class="s1">&#39;get&#39;</span><span class="o">,</span> <span class="s1">&#39;#/&#39;</span><span class="o">,</span> <span class="s1">&#39;runIndex&#39;</span><span class="p">]</span><br />
  <span class="p">]);</span><br />
  <br />
<span class="p">});</span><br />
</pre></div>
<p>I personally like the method syntax better, but there are some cool uses for this &#8211; You could even load your routes from multiple files and add them to the application using <span class="caps">JSON</span>.</p>
<h3>Filters</h3>
<p><code>before</code> filters are very useful for extracting common functionality out of your routes. However, I&#8217;ve found myself writing this pretty often:</p>
<div class="highlight"><pre><span class="nx">$</span><span class="p">.</span><span class="nx">sammy</span><span class="p">(</span><span class="kd">function</span><span class="p">()</span> <span class="p">{</span><br />
  <br />
  <span class="k">this</span><span class="p">.</span><span class="nx">before</span><span class="p">(</span><span class="kd">function</span><span class="p">()</span> <span class="p">{</span><br />
    <span class="c">// only run if the path is not the index</span><br />
    <span class="k">if</span> <span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">path</span> <span class="o">!=</span> <span class="s1">&#39;#/&#39;</span><span class="p">)</span> <span class="p">{</span><br />
      <span class="c">//&#8230; do something</span><br />
    <span class="p">}</span><br />
  <span class="p">})</span><br />
  <br />
<span class="p">});</span><br />
</pre></div>
<p>Taking some hints from Rails, I&#8217;ve added options to <code>before</code> filters. The above example could be rewritten:</p>
<div class="highlight"><pre><span class="nx">$</span><span class="p">.</span><span class="nx">sammy</span><span class="p">(</span><span class="kd">function</span><span class="p">()</span> <span class="p">{</span><br />
  <br />
  <span class="k">this</span><span class="p">.</span><span class="nx">before</span><span class="p">({</span><span class="nx">except</span><span class="o">:</span> <span class="s1">&#39;#/&#39;</span><span class="p">}</span><span class="o">,</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span><br />
    <span class="c">//&#8230; do something</span><br />
  <span class="p">})</span><br />
  <br />
<span class="p">});</span><br />
</pre></div>
<p>The filters can match against <code>path</code> (as a string or RegExp) and <code>verb</code> and you can define them in the positive (<code>only</code>) or negative (<code>except</code>). The method that does the matching is exposed as <code>contextMatchesOptions</code> so you can use it outside of <code>before()</code></p>
<p>I&#8217;ve also found myself doing a lot of wrapping entire route callbacks in an asynchronous check for something (usually a login). The new <code>around</code> filters make this easy. <code>around</code> takes a single argument which is a neatly packed function that contains the full execution path of the route being accessed. This includes additional filters and the route callback itself. This also means you can entirely halt the execution by never running the passed callback.</p>
<div class="highlight"><pre><span class="nx">$</span><span class="p">.</span><span class="nx">sammy</span><span class="p">(</span><span class="kd">function</span><span class="p">()</span> <span class="p">{</span><br />
  <br />
  <span class="k">this</span><span class="p">.</span><span class="nx">around</span><span class="p">(</span><span class="kd">function</span><span class="p">(</span><span class="nx">callback</span><span class="p">)</span> <span class="p">{</span><br />
    <span class="c">// `this` here is the Sammy.EventContext</span><br />
    <span class="c">// just like before, etc</span><br />
    <span class="nx">$</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="s1">&#39;/session&#39;</span><span class="o">,</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span><br />
      <span class="nx">callback</span><span class="p">();</span><br />
    <span class="p">});</span><br />
  <span class="p">});</span><br />
<br />
<span class="p">})</span><br />
</pre></div>
<h3>Lots more</h3>
<p>Theres actually a fair amount more to cover in Sammy 0.5, but I think I&#8217;ll be doing more short &#8216;Whats new&#8217; posts soon. Check the <a href="http://github.com/quirkey/sammy/blob/master/HISTORY.md"><span class="caps">HISTORY</span></a> for a full rundown of changes.</p>
<h3>Thanks</h3>
<p>Special thanks goes out to everyone who helped with ideas, commits and testing for this release including Lena Herrmann, Jinzhu, dpree, Jeff O&#8217;Connell, Todd Willey, Tim Caswell, and Frank Prößdorf (endor).</p>]]></content:encoded>
			<wfw:commentRss>http://www.quirkey.com/blog/2010/02/15/sammy-0-5-something-for-everyone/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>The year I tried really hard</title>
		<link>http://www.quirkey.com/blog/2010/01/12/the-year-i-tried-really-hard/</link>
		<comments>http://www.quirkey.com/blog/2010/01/12/the-year-i-tried-really-hard/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 21:58:41 +0000</pubDate>
		<dc:creator>AQ</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://www.quirkey.com/blog/?p=403</guid>
		<description><![CDATA[I realize its already half way through the month, but I needed to get the obligatory year in review out. I had to bother. Why? Because last year was BIG. I ended 2008 leaving my former job to pursue greater things. My big goal for the year was to do awesome work, start building a [...]]]></description>
			<content:encoded><![CDATA[	<p><a href="http://www.flickr.com/photos/katandaq/4247061138/" title="IMG_2204 by kat_and_aq, on Flickr"><img src="http://farm3.static.flickr.com/2693/4247061138_98f04ec6a5.jpg" width="500" height="333" alt="IMG_2204" /></a></p>

	<p>I realize its already half way through the month, but I needed to get the obligatory year in review out. I <em>had</em> to bother. Why? Because last year was <span class="caps">BIG</span>. I ended 2008 <a href="http://www.quirkey.com/blog/2008/12/18/big-moves/" title="">leaving my former job</a> to pursue greater things. My big goal for the year was to do awesome work, start building a reputation, and give back to the community. I&#8217;m very proud to say I accomplished all of those. I did so by <em>working my ass off</em>. Straight <em>hustling</em>.</p>

	<p>Highlights:</p>

	<ul>
		<li>Getting married!</li>
		<li>Speaking at 4 technical conferences including ones in Japan and Scotland.</li>
		<li>Starting a fund <a href="http://www.quirkey.com/blog/2009/05/27/the-small-fund/" title="">that raised ~$1000 for RailsBridge and the Anita Borg Foundation.</a></li>
		<li><a href="http://www.quirkey.com/blog/category/sammy/" title="">Releasing Sammy.js</a> and seeing a number of large organizations and companies use it in production.</li>
		<li>Contributing to, releasing, and maintaining <a href="http://code.quirkey.com/" title="">over 40 open source projects.</a></li>
		<li>Working with a number of really awesome companies with very talented individuals including <a href="http://www.paperlesspost.com" title="">Paperless Post</a> and <a href="http://www.wejetset.com" title="">Wejetset</a></li>
		<li>Traveling a <em>lot</em>: Japan, Scotland, 3 trips to the West Coast, Boston, Philly, Virginia.</li>
	</ul>

	<p>I can&#8217;t really complain. I&#8217;ve set some new big goals for this year. The biggest is bit of a step backwards. Last year, I worked a lot. A little too much if you ask my wife and some of my friends. So this year is the year of accomplishing a lot while working less. As much as I love coding, there are other things I love more. Namely, my wife. In an attempt to break it down into actual achievable goals:</p>

	<ul>
		<li>Only work with clients that I <em>want</em> to work with. A side luxury of working my ass off is that I&#8217;ve been offered a bit more work then I can feasibly do myself. Which puts me almost exactly where I want to be &#8211; being able to work on projects I genuinely find fun and interesting. Lucky me!</li>
		<li>Take it down a notch with the open source shenanigans. This is slightly unfortunate, but I&#8217;m almost as overwhelmed with open source projects as I am with client work. I&#8217;m not going to dump or stop supporting the popular highly used projects, like Sammy or qadmin, but some of the lesser known used ones are going to become unsupported and I&#8217;m going to <em>try</em> to slow down with creating new ones. <em>Try</em>.</li>
		<li>Cook more, write more, read more, learn more, see more people. My new meetup/idea <a href="http://codefoodbar.org" title="food,bar">code</a> should address some of these. Very excited for the first meeting next week. Buying a kindle has actually made me read <em>way</em> more. I&#8217;m trying to spend more time on actual dedicated learning.</li>
	</ul>

	<p>At the end of 2010 I want to look back and think about how much <strong>fun</strong> I had and how much I learned. So, friends and colleagues, heres to those goals and a great new year.</p>
 ]]></content:encoded>
			<wfw:commentRss>http://www.quirkey.com/blog/2010/01/12/the-year-i-tried-really-hard/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Sammy 0.4: Here&#8217;s looking at you</title>
		<link>http://www.quirkey.com/blog/2010/01/04/sammy-0-4-heres-looking-at-you/</link>
		<comments>http://www.quirkey.com/blog/2010/01/04/sammy-0-4-heres-looking-at-you/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 16:16:10 +0000</pubDate>
		<dc:creator>AQ</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Sammy]]></category>

		<guid isPermaLink="false">http://www.quirkey.com/blog/?p=399</guid>
		<description><![CDATA[It&#8217;s been a good while in the making, and I&#8217;m proud to announce the next major release of Sammy.js. Also, I&#8217;ve published Part II of the Sammy Tutorial. Part II introduces post routes as well as some of the new features of Sammy 0.4. I&#8217;ll swing through some of the biggest changes and new hotness [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a good while in the making, and I&#8217;m proud to announce the next major release of <a href="http://code.quirkey.com/sammy">Sammy.js.</a> Also, I&#8217;ve published <a href="http://code.quirkey.com/sammy/tutorials/json_store_part2.html">Part II of the Sammy Tutorial.</a> Part II introduces <code>post</code> routes as well as some of the new features of Sammy 0.4.</p>
<p>I&#8217;ll swing through some of the biggest changes and new hotness &#8211; see the <a href="http://github.com/quirkey/sammy/blob/master/HISTORY"><span class="caps">HISTORY</span></a> or the <a href="http://github.com/quirkey/sammy/commits/master">Commits</a> for a full list and more detail.</p>
<span id="more-399"></span>
<h3>LocationProxy</h3>
<p>I&#8217;ve always thought the poller implementation that monitors the hash/location for changes was a little bit of a hack. CodeOfficer also had brought up the pain of having a poller per-app when you have multiple or many Sammy applications on a single page. As more browser&#8217;s support it I also wanted to make use of the native &#8216;onhashchange&#8217; event which when bound to, completely eliminates the need for polling. I attempted to do this all in one fell swoop, by decoupling the location monitoring into an entirely separate object: <code>Sammy.HashLocationProxy</code>. The <code>HashLocationProxy</code> is setup for each app by default. It tries to make use of the &#8216;onhashchange&#8217; event where available, and where it isn&#8217;t it gracefully falls back to ol&#8217; fashioned polling. The big difference, however, is there is only a single global poller per page no matter how many apps you have.</p>
<p>The <code>HashLocationProxy</code> also defines a spec for other location proxies to be created. There&#8217;s also a <code>DataLocationProxy</code> which derives its location from a <code>jQuery.data</code> attribute.</p>
<h3>Storage and Session</h3>
<p>The newest and most visibly awesome part of the new release is a new suite of plugins and prototypes: <code>Sammy.Store</code>, <code>Sammy.Storage</code> and <code>Sammy.Session</code>. As part of 0.3 I introduced <code>Sammy.Cache</code> which was really a first attempt at what <code>Sammy.Storage</code> does. <code>Sammy.Store</code> is an single access point and <span class="caps">API</span> for all the various browser based storage methods, including HTML5 <span class="caps">DOM</span> Storage and Cookies. It provides a unified way of dealing with these as Key/Value stores. As an extra bonus, it also conforms to Key Value Observing, triggering jQuery events when values change. Heres a little example:</p>
<div class="highlight"><pre><span class="c">// Cookies</span><br />
<span class="kd">var</span> <span class="nx">cookie</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Sammy</span><span class="p">.</span><span class="nx">Store</span><span class="p">({</span><span class="nx">name</span><span class="o">:</span> <span class="s1">&#39;mycookie&#39;</span><span class="o">,</span> <span class="nx">type</span><span class="o">:</span> <span class="s1">&#39;cookie&#39;</span><span class="p">});</span><br />
<span class="nx">cookie</span><span class="p">.</span><span class="nx">set</span><span class="p">(</span><span class="s1">&#39;foo&#39;</span><span class="o">,</span> <span class="s1">&#39;bar&#39;</span><span class="p">);</span> <span class="c">//=&gt; &quot;bar&quot;</span><br />
<span class="nx">cookie</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="s1">&#39;foo&#39;</span><span class="p">);</span> <span class="c">//=&gt; &quot;bar&quot;</span><br />
<span class="nx">cookie</span><span class="p">.</span><span class="nx">keys</span><span class="p">();</span> <span class="c">//=&gt; [&quot;foo&quot;]</span><br />
<span class="c">// HTML5 localStorage (only works in certain browsers)</span><br />
<span class="kd">var</span> <span class="nx">local</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Sammy</span><span class="p">.</span><span class="nx">Store</span><span class="p">({</span><span class="nx">name</span><span class="o">:</span> <span class="s1">&#39;mylocal&#39;</span><span class="o">,</span> <span class="nx">type</span><span class="o">:</span> <span class="s1">&#39;local&#39;</span><span class="p">});</span><br />
<span class="nx">local</span><span class="p">.</span><span class="nx">fetch</span><span class="p">(</span><span class="s1">&#39;foo&#39;</span><span class="o">,</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span><br />
  <span class="k">return</span> <span class="s1">&#39;bar&#39;</span><span class="o">;</span><br />
<span class="p">});</span> <span class="c">//=&gt; &quot;bar&quot;</span><br />
<span class="c">// Only sets if not set.</span><br />
<span class="nx">local</span><span class="p">.</span><span class="nx">fetch</span><span class="p">(</span><span class="s1">&#39;foo&#39;</span><span class="o">,</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span><br />
  <span class="k">return</span> <span class="s1">&#39;baz!&#39;</span><span class="o">;</span><br />
<span class="p">});</span> <span class="c">//=&gt; &quot;bar&quot;</span><br />
</pre></div>
<p>The <a href="http://code.quirkey.com/sammy/tutorials/json_store_part2.html">latest chapter of the Sammy tutorial</a> also covers <code>Sammy.Session</code></p>
<h3>More Plugins</h3>
<p>There are also a number of other less glamorous but new and awesome plugins.</p>
<ul>
	<li><code>Sammy.Mustache</code> Provides support for the Mustache templating framework, thanks to <a href="http://github.com/janl/mustache.js">Mustache.js</a></li>
	<li><code>Sammy.JSON</code> is a simple wrapper around json2.js</li>
	<li><code>Sammy.NestedParams</code>: Adds full [tested!] support for Rails/Rack style nested params to Sammy form handling. (Even though this was part of the 0.3.1 release, I never mentioned it here)</li>
</ul>
<h3>Thanks</h3>
<p>Thanks to everyone who helped with this release through testing, ideas, or putting Sammy in production and telling me what&#8217;s wrong with it.</p>]]></content:encoded>
			<wfw:commentRss>http://www.quirkey.com/blog/2010/01/04/sammy-0-4-heres-looking-at-you/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Wejetset City Notes Interactive: Notes from Sammy.js in Production</title>
		<link>http://www.quirkey.com/blog/2009/12/16/wejetset-city-notes-interactive-notes-from-sammy-js-in-production/</link>
		<comments>http://www.quirkey.com/blog/2009/12/16/wejetset-city-notes-interactive-notes-from-sammy-js-in-production/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 16:50:51 +0000</pubDate>
		<dc:creator>AQ</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Sammy]]></category>

		<guid isPermaLink="false">http://www.quirkey.com/blog/?p=388</guid>
		<description><![CDATA[Last week I had the pleasure of launching a big new feature set into production for one of my favorite clients, Wejetset. The excitement was greatly enhanced by the fact that City Notes Interactive makes full use of my own special framework, Sammy.js. City Notes and the other features deployed were an almost ideal project. [...]]]></description>
			<content:encoded><![CDATA[<img src="http://img.skitch.com/20091216-nt27x3jx17jc8drh7x51aandhh.jpg" alt="wejetset - city notes"/><p>Last week I had the pleasure of launching a big new feature set into production for one of my favorite clients, <a href="http://www.wejetset.com">Wejetset.</a> The excitement was greatly enhanced by the fact that <a href="http://www.wejetset.com/city_notes">City Notes Interactive</a> makes full use of my own special framework, <a href="http://code.quirkey.com/sammy">Sammy.js.</a></p>
<p>City Notes and the other features deployed were an almost ideal project. The design and direction was an awesome back-and-forth collaboration between myself, Tom Ran of <a href="http://thescoutmag.com">The Scout</a> fame, and the face and brains behind Wejetset, Taj Reid. I could probably talk forever about how much fun it is to work with those guys, but in this post I&#8217;d rather dive deeper into the challenges and takeaways in the actual code.</p>
<span id="more-388"></span>
<p>I knew right from the beginning that Sammy would be a good fit for this. The question was how. Sammy let me think about the construction of the app in terms of routes and instantly gave me a way to create perma-links to specific notes and even specific filters.</p>
<h3>Templating</h3>
<p>One of the first decisions I made was to go with server-side templating. As much as I am and have been a proponent of pushing everything client-side, for this specific app it made much less sense. Specifically, there are other places throughout the site where I&#8217;m using the same templates and the benefits of re-using them were just too strong. Also, this gives the extra bonus of making the site a little more google friendly. In fact, without JavaScript the most recent notes still display and can link to the right destinations.</p>
<h3>Forms</h3>
<p>One thing that I wanted to streamline as much as possible is handling forms &#8211; posting them to the server and handling the responses without leaving the page. I came up with a useful method &#8211; <code>postFormDirectly()</code> &#8211; that handles the post route and submits it directly to the server, handling the response and sending it back to a callback.</p>
<p>Heres an example call, for positing the form to create city notes.</p>
<div class="highlight"><pre><span class="k">this</span><span class="p">.</span><span class="nx">postFormDirectly</span><span class="p">(</span><span class="s1">&#39;/city_notes&#39;</span><span class="o">,</span> <span class="kd">function</span><span class="p">(</span><span class="nx">response</span><span class="p">)</span> <span class="p">{</span> <br />
  <span class="k">if</span> <span class="p">(</span><span class="nx">response</span><span class="p">.</span><span class="nx">status</span> <span class="o">==</span> <span class="s1">&#39;success&#39;</span><span class="p">)</span> <span class="p">{</span><br />
    <span class="k">this</span><span class="p">.</span><span class="nx">redirect</span><span class="p">(</span><span class="s1">&#39;#/&#39;</span><span class="p">);</span><br />
  <span class="p">}</span><br />
<span class="p">});</span><br />
</pre></div>
<p>Instantly, you can tell that a lot is abstracted and changed from a traditional route. Here we&#8217;re routing on an actual <span class="caps">URI</span> as opposed to just an anchor. This has the added benefit of allowing the form to work without JS. (<em>As an aside, I&#8217;ve personally found a key to making degradable and unit testable sites is to first make the process work (albeit without any flair) without JS and then add the code to push the interactions and the single page-ness.</em>)</p>
<p>To give a little more insight, heres the implementation:</p>
<div class="highlight"><pre><span class="k">this</span><span class="p">.</span><span class="nx">postFormDirectly</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">path</span><span class="o">,</span> <span class="nx">callback</span><span class="p">)</span> <span class="p">{</span><br />
  <span class="kd">var</span> <span class="nx">app</span> <span class="o">=</span> <span class="k">this</span><span class="o">;</span><br />
  <span class="nx">app</span><span class="p">.</span><span class="nx">post</span><span class="p">(</span><span class="nx">path</span><span class="o">,</span> <span class="kd">function</span><span class="p">(</span><span class="nx">context</span><span class="p">)</span> <span class="p">{</span><br />
    <span class="kd">var</span> <span class="nx">context</span> <span class="o">=</span> <span class="k">this</span><span class="o">,</span><br />
        <span class="nx">post_path</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">path</span><span class="o">,</span> <br />
        <span class="nx">wrapped_callback</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">response</span><span class="p">)</span> <span class="p">{</span><br />
          <span class="nx"><span class="caps">WJS</span></span><span class="p">.</span><span class="nx">handleResponse</span><span class="p">(</span><span class="nx">response</span><span class="o">,</span> <span class="nx">context</span><span class="p">.</span><span class="nx">params</span><span class="o">,</span> <span class="kd">function</span><span class="p">(</span><span class="nx">r</span><span class="p">)</span> <span class="p">{</span><br />
            <span class="k">if</span> <span class="p">(</span><span class="nx">$</span><span class="p">.</span><span class="nx">isFunction</span><span class="p">(</span><span class="nx">callback</span><span class="p">))</span> <span class="p">{</span><br />
              <span class="nx">callback</span><span class="p">.</span><span class="nx">apply</span><span class="p">(</span><span class="nx">context</span><span class="o">,</span> <span class="p">[</span><span class="nx">r</span><span class="p">]);</span><br />
            <span class="p">}</span><br />
          <span class="p">});</span><br />
        <span class="p">};</span><br />
    <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nx">post_path</span><span class="p">.</span><span class="nx">match</span><span class="p">(</span><span class="sr">/js$/</span><span class="p">))</span> <span class="p">{</span> <span class="nx">post_path</span> <span class="o">=</span> <span class="nx">post_path</span> <span class="o">+</span> <span class="s1">&#39;?format=js&#39;</span><span class="o">;</span> <span class="p">}</span><br />
    <span class="k">this</span><span class="p">.</span><span class="nx">params</span><span class="p">[</span><span class="s1">&#39;$form&#39;</span><span class="p">].</span><span class="nx">find</span><span class="p">(</span><span class="s1">&#39;:input&#39;</span><span class="p">).</span><span class="nx">trigger</span><span class="p">(</span><span class="s1">&#39;clear-errors&#39;</span><span class="p">);</span><br />
    <span class="k">this</span><span class="p">.</span><span class="nx">params</span><span class="p">[</span><span class="s1">&#39;$form&#39;</span><span class="p">].</span><span class="nx">ajaxSubmit</span><span class="p">({</span><br />
      <span class="nx">url</span><span class="o">:</span> <span class="nx">post_path</span><span class="o">,</span><br />
      <span class="nx">dataType</span><span class="o">:</span> <span class="s1">&#39;json&#39;</span><span class="o">,</span><br />
      <span class="nx">success</span><span class="o">:</span> <span class="nx">wrapped_callback</span><span class="o">,</span><br />
      <span class="nx">error</span><span class="o">:</span> <span class="nx">wrapped_callback</span><br />
    <span class="p">}).</span><span class="nx">trigger</span><span class="p">(</span><span class="s1">&#39;show-loading&#39;</span><span class="p">);</span><br />
  <span class="p">});</span><br />
<span class="p">};</span><br />
</pre></div>
<p>Lets take a little walk through. First and formost, we&#8217;re just adding a <code>post</code> route to our Sammy app. The contents of this route allow us to use jquery.form&#8217;s nifty <code>ajaxSubmit</code> to send the form to the server without reloading the page. We&#8217;re creating a response callback for the ajax request called <code>wrapped_callback</code> which takes the response from the server, passes it to <code>handleResponse</code> which then in turn calls our passed callback if it exists. <code>handleResponse</code> does a lot, too, but I&#8217;m not going to post the contents here (though I might make it into a plugin &#8230;). All you need to know is that the response from the server is <span class="caps">JSON</span> and looks something like:</p>
<div class="highlight"><pre><span class="p">{</span><span class="s2">&quot;status&quot;</span><span class="o">:</span> <span class="s2">&quot;success&quot;</span><span class="o">,</span> <span class="s2">&quot;message&quot;</span><span class="o">:</span> <span class="s2">&quot;You&#39;re note was posted successfuly.&quot;</span><span class="p">}</span><br />
</pre></div>
<p><code>handleResponse</code> displays the little flash message and also highlights the form if there are errors. I use this pattern on a number of projects and it seems to work pretty well.</p>
<p>One neat Sammy tidbit you might not have known about, in post &amp; put routes, there is always a &#8216;$form&#8217; param which is a jQuery object containing the <span class="caps">HTML</span> form that submitted to the route. Very useful for cases like above.</p>
<h3>Modals</h3>
<p>If you play around with the app, you&#8217;ll notice that we make pretty good use of modal windows for actions (submit/share/email to friend). The cool thing about using Sammy for this is they&#8217;re just routes, so refreshing the page or linking jumps directly to them. I also wrote a little jQuery extension that I found extremely useful for them:</p>
<div class="highlight"><pre><span class="nx">$</span><span class="p">.</span><span class="nx">fn</span><span class="p">.</span><span class="nx">findOrAppend</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">selector</span><span class="o">,</span> <span class="nx">element</span><span class="p">)</span> <span class="p">{</span><br />
  <span class="kd">var</span> <span class="nx">$this</span> <span class="o">=</span> <span class="nx">$</span><span class="p">(</span><span class="k">this</span><span class="p">)</span><span class="o">,</span> <br />
      <span class="nx">$el</span> <span class="o">=</span> <span class="nx">$this</span><span class="p">.</span><span class="nx">find</span><span class="p">(</span><span class="nx">selector</span><span class="p">);</span><br />
  <span class="k">if</span> <span class="p">(</span><span class="nx">$el</span><span class="p">.</span><span class="nx">length</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">)</span> <span class="k">return</span> <span class="nx">$el</span><span class="o">;</span> <br />
  <span class="c">// el doesnt exist so lets make it</span><br />
  <span class="k">if</span> <span class="p">(</span><span class="k">typeof</span> <span class="nx">element</span> <span class="o">==</span> <span class="s1">&#39;undefined&#39;</span><span class="p">)</span> <span class="p">{</span><br />
    <span class="c">// figure out how to build the element from the selector</span><br />
    <span class="kd">var</span> <span class="nx">parts</span> <span class="o">=</span> <span class="nx">selector</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s1">&#39; &#39;</span><span class="p">);</span><br />
    <span class="nx">$el</span> <span class="o">=</span> <span class="nx">$</span><span class="p">(</span><span class="s2">&quot;&lt;div&gt;&quot;</span><span class="p">);</span><br />
    <span class="k">if</span> <span class="p">(</span><span class="nx">parts</span><span class="p">.</span><span class="nx">length</span> <span class="o">==</span> <span class="mi">1</span><span class="p">)</span> <span class="p">{</span><br />
      <span class="c">// single selector so just added</span><br />
      <span class="nx">$el</span><span class="p">.</span><span class="nx">addSelector</span><span class="p">(</span><span class="nx">selector</span><span class="p">);</span><br />
    <span class="p">}</span> <span class="k">else</span> <span class="p">{</span><br />
      <span class="c">// selector with multiple depth so we just want the last selector</span><br />
      <span class="nx">$el</span><span class="p">.</span><span class="nx">addSelector</span><span class="p">(</span><span class="nx">parts</span><span class="p">.</span><span class="nx">pop</span><span class="p">());</span><br />
      <span class="c">// find this down the parts</span><br />
      <span class="nx">$this</span> <span class="o">=</span> <span class="nx">$this</span><span class="p">.</span><span class="nx">findOrAppend</span><span class="p">(</span><span class="nx">parts</span><span class="p">.</span><span class="nx">join</span><span class="p">(</span><span class="s1">&#39; &#39;</span><span class="p">));</span><br />
    <span class="p">}</span><br />
  <span class="p">}</span> <span class="k">else</span> <span class="p">{</span><br />
    <span class="c">// we provided a specific element</span><br />
    <span class="nx">$el</span> <span class="o">=</span> <span class="nx">$</span><span class="p">(</span><span class="nx">element</span><span class="p">);</span><br />
  <span class="p">}</span><br />
  <span class="c">// append it</span><br />
  <span class="nx">$this</span><span class="p">.</span><span class="nx">append</span><span class="p">(</span><span class="nx">$el</span><span class="p">);</span><br />
  <span class="c">// return it</span><br />
  <span class="k">return</span> <span class="nx">$el</span><span class="o">;</span><br />
<span class="p">};</span><br />
</pre></div>
<p><code>findOrAppend()</code> takes a selector (I used it mostly with #ids) and creates a series of nested divs (if needed) that matches that selector.</p>
<p>For example, given <span class="caps">HTML</span>:</p>
<div class="highlight"><pre><span class="nt">&lt;div</span> <span class="na">id=</span><span class="s">&quot;container&quot;</span><span class="nt">&gt;</span><br />
  <span class="nt">&lt;div</span> <span class="na">id=</span><span class="s">&quot;main&quot;</span><span class="nt">&gt;&lt;/div&gt;</span><br />
<span class="nt">&lt;/div&gt;</span><br />
</pre></div>
<p>And we wanted to replace the contents of an element #submit_modal inside of it:</p>
<div class="highlight"><pre><span class="kd">var</span> <span class="nx">$modal</span> <span class="o">=</span> <span class="nx">$</span><span class="p">(</span><span class="s1">&#39;body&#39;</span><span class="p">).</span><span class="nx">findOrAppend</span><span class="p">(</span><span class="s1">&#39;#main #submit_modal&#39;</span><span class="p">);</span><br />
</pre></div>
<p>The first time its called, it actually creates the neccesary #submit_modal div and returns it. However, if it exists already, it will just find it using <code>$.fn.find()</code> and return it.</p>
<p>For modals, this allows me to ensure that the container exists first, then replace it with the contents of the modal that I&#8217;m fetching from the server.</p>
<div class="highlight"><pre><span class="k">this</span><span class="p">.</span><span class="nx">helpers</span><span class="p">({</span><br />
  <span class="c">// &#8230;</span><br />
  <span class="nx">showModal</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">path</span><span class="o">,</span> <span class="nx">selector</span><span class="o">,</span> <span class="nx">callback</span><span class="p">)</span> <span class="p">{</span><br />
    <span class="kd">var</span> <span class="nx">context</span> <span class="o">=</span> <span class="k">this</span><span class="o">;</span><br />
    <span class="k">this</span><span class="p">.</span><span class="nx">showLoading</span><span class="p">();</span><br />
    <span class="k">this</span><span class="p">.</span><span class="nx">loadNotesInBackground</span><span class="p">();</span><br />
    <span class="k">this</span><span class="p">.</span><span class="nx">partial</span><span class="p">(</span><span class="nx">path</span><span class="o">,</span> <span class="kd">function</span><span class="p">(</span><span class="nx">form</span><span class="p">)</span> <span class="p">{</span><br />
      <span class="kd">var</span> <span class="nx">$el</span> <span class="o">=</span> <span class="nx">context</span><span class="p">.</span><span class="nx">$element</span><span class="p">()</span><br />
                <span class="p">.</span><span class="nx">findOrAppend</span><span class="p">(</span><span class="nx">selector</span><span class="p">);</span><br />
      <span class="kd">var</span> <span class="nx">$close</span> <span class="o">=</span> <span class="nx">$</span><span class="p">(</span><span class="s1">&#39;&lt;img src=&quot;/images/button_remove.gif&quot; alt=&quot;close&quot; class=&quot;close_modal&quot; /&gt;&#39;</span><span class="p">);</span>                    <br />
      <span class="nx">$el</span><span class="p">.</span><span class="nx">hide</span><span class="p">().</span><span class="nx">html</span><span class="p">(</span><span class="nx">form</span><span class="p">);</span><br />
      <span class="nx">$close</span><span class="p">.</span><span class="nx">prependTo</span><span class="p">(</span><span class="nx">$el</span><span class="p">).</span><span class="nx">click</span><span class="p">(</span><span class="kd">function</span><span class="p">()</span> <span class="p">{</span><br />
        <span class="nx">$el</span><span class="p">.</span><span class="nx">slideUp</span><span class="p">(</span><span class="mi">200</span><span class="p">);</span><br />
        <span class="nx">context</span><span class="p">.</span><span class="nx">redirect</span><span class="p">(</span><span class="s1">&#39;#&#39;</span><span class="o">,</span> <span class="nx">context</span><span class="p">.</span><span class="nx">conditionsToURL</span><span class="p">());</span><br />
      <span class="p">});</span><br />
      <span class="k">if</span> <span class="p">(</span><span class="nx">callback</span><span class="p">)</span> <span class="p">{</span> <span class="nx">callback</span><span class="p">.</span><span class="nx">apply</span><span class="p">(</span><span class="nx">context</span><span class="o">,</span> <span class="p">[</span><span class="nx">$el</span><span class="p">]);</span> <span class="p">}</span><br />
      <span class="c">// bind error handlers</span><br />
      <span class="nx">context</span><span class="p">.</span><span class="nx">bindFormErrorHandlers</span><span class="p">();</span><br />
      <span class="nx">context</span><span class="p">.</span><span class="nx">hideLoading</span><span class="p">();</span><br />
      <span class="nx">$el</span><span class="p">.</span><span class="nx">slideDown</span><span class="p">();</span><br />
      <span class="nx">$</span><span class="p">(</span><span class="s1">&#39;#main&#39;</span><span class="p">).</span><span class="nx">slideTo</span><span class="p">();</span><br />
    <span class="p">});</span><br />
  <span class="p">}</span><br />
  <span class="c">//&#8230;</span><br />
<span class="p">});</span><br />
</pre></div>
<p>Here I have a helper that fetches the view/template from the server using <code>partial()</code> and then situates its content using <code>findOrAppend()</code>. It also does me the favor of adding the little close icon in the upper right corner. A typical use is for the login screen:</p>
<div class="highlight"><pre><span class="k">this</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="s1">&#39;#/login&#39;</span><span class="o">,</span> <span class="kd">function</span><span class="p">(</span><span class="nx">context</span><span class="p">)</span> <span class="p">{</span><br />
 <span class="k">this</span><span class="p">.</span><span class="nx">showModal</span><span class="p">(</span><span class="s1">&#39;/account/login&#39;</span><span class="o">,</span> <span class="s1">&#39;#main #login_signup.modal&#39;</span><span class="p">)</span><br />
<span class="p">});</span><br />
</pre></div>
<h3>Analytics</h3>
<p>It has to be said as well that I&#8217;m really excited about the burgeoning Sammy.js community. I&#8217;m lucky enough to have some other really smart individuals working on Sammy projects and sharing some of their code through plugins. Thanks to <a href="http://britg.com/">Brit Gardner</a> and his <a href="http://github.com/britg/sammy-google-analytics">Sammy.GoogleAnalytics</a> plugin, adding analytics to the app was as easy as dropping in the file and adding one line to my app. That felt really really good. I hope more people will start sharing some plugins soon.</p>
<h3>A lot more</h3>
<p>There were a lot more discoveries over the months building this app then I can really share in a little blog post but needless to say, I&#8217;m going to try to bring the usefull and reusable stuff back into Sammy and plugins for everyone to use. If you want to hear more about it or have specific questions, dont hesitate to ping me on <span class="caps">IRC</span> or twitter or email the <a href="http://groups.google.com/group/sammyjs">Sammy mailing list.</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.quirkey.com/blog/2009/12/16/wejetset-city-notes-interactive-notes-from-sammy-js-in-production/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What I&#8217;ve been up to: The last forever (Oct, Nov 09)</title>
		<link>http://www.quirkey.com/blog/2009/12/09/what-ive-been-up-to-the-last-forever-oct-nov-09/</link>
		<comments>http://www.quirkey.com/blog/2009/12/09/what-ive-been-up-to-the-last-forever-oct-nov-09/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 20:09:37 +0000</pubDate>
		<dc:creator>AQ</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Sammy]]></category>

		<guid isPermaLink="false">http://www.quirkey.com/blog/?p=385</guid>
		<description><![CDATA[The two week trip to California was nothing less than a great success. A fine blend of business and pleasure (with an emphasis on the relaxing). Highlights included: Going to RubyConf without actually going. Eating and drinking fine food and wine in Napa/Sonoma for 4 days non-stop. (Full list of vineyards and restaurants with menus [...]]]></description>
			<content:encoded><![CDATA[	<p>The two week trip to California was nothing less than a great success. A fine blend of business and pleasure (with an emphasis on the relaxing).</p>

	<p>Highlights included:</p>

	<ul>
		<li>Going to RubyConf without actually going.</li>
		<li>Eating and drinking fine food and wine in Napa/Sonoma for 4 days non-stop. (Full list of vineyards and restaurants with menus on request).</li>
		<li>Spending time with my lovely wife.</li>
		<li>Seeing friends I don&#8217;t get to see enough.</li>
	</ul>

	<p>Though this blog may tell a different story, I actually have been writing a lot of code as well:</p>

	<ul>
		<li>Most notably, the production, public-facing Sammy.js application I&#8217;ve been working so diligently on finally launched: <a href="http://www.wejetset.com/city_notes" title="">Wejetset City Notes Interactive.</a> I learned a ton writing and deploying it, and I promise to share a bunch of those lessons, soon.</li>
		<li>With the help of <a href="http://rvm.beginrescueend.com/" title="">the amazing rvm</a> I&#8217;ve started getting all my gems tested and working on Ruby 1.9. I think everyone should be doing the same, so if people are interested in my approach, maybe I&#8217;ll write a tutorial.</li>
		<li>I&#8217;ve even been porting other peoples gems to 1.9. Specifically <a href="http://github.com/quirkey/oauth/tree/1.9-nodeps" title="">I have a fork of the oauth gem</a> that works on Ruby 1.9.1 without any dependencies. It should be merged and released to the master oauth gem shortly.</li>
		<li>It&#8217;s been a long time coming, but I&#8217;ve been <a href="http://github.com/quirkey/qadmin/commits/master" title="">working on a big rewrite of qadmin</a> thats being used in production in a couple places. Its a lot easier to configure and extend and really just needs to have its documentation thoroughly updated before I can do a real release.</li>
		<li>I&#8217;ve also <a href="http://portfolio.quirkey.com" title="">updated my portfolio</a> to include links to my talks and some other new projects.</li>
	</ul>

	<p>I&#8217;m hoping to get some more blogging done and <span class="caps">OSS</span> releases out in the next couple of days so stay tuned!</p>

 ]]></content:encoded>
			<wfw:commentRss>http://www.quirkey.com/blog/2009/12/09/what-ive-been-up-to-the-last-forever-oct-nov-09/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Going to California: Nov 12-23</title>
		<link>http://www.quirkey.com/blog/2009/11/03/going-to-california-nov-12-23/</link>
		<comments>http://www.quirkey.com/blog/2009/11/03/going-to-california-nov-12-23/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 15:57:55 +0000</pubDate>
		<dc:creator>AQ</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Travel]]></category>

		<guid isPermaLink="false">http://www.quirkey.com/blog/?p=381</guid>
		<description><![CDATA[Let&#8217;s just say it was a crazy October, and we&#8217;ll leave it at that. There are big things afoot for November, though. I&#8217;m headed west for a multi-stop tour of Northern California with my wife from Nov 12-23. It&#8217;s going to be part business/part pleasure, but every time I&#8217;ve gone in recent years theres been [...]]]></description>
			<content:encoded><![CDATA[	<p><a href="http://www.flickr.com/photos/katandaq/3169158878/" title="Sunset at Telegraph Hill by kat_and_aq, on Flickr"><img src="http://farm2.static.flickr.com/1292/3169158878_1ff1875661.jpg" width="500" height="375" alt="Sunset at Telegraph Hill" /></a></p>

	<p>Let&#8217;s just say it was a crazy October, and we&#8217;ll leave it at that. There are big things afoot for November, though. I&#8217;m headed west for a multi-stop tour of Northern California with my wife from Nov 12-23. It&#8217;s going to be part business/part pleasure, but every time I&#8217;ve gone in recent years theres been no shortage of fun. Though I wont be attending RubyConf, <strong>I&#8217;ll be in San Francisco during and around it Nov 19-23</strong>.</p>

	<p>First, If any dev shops/teams/meetup groups want to hear me talk/present about Sammy.js or any other projects I&#8217;m involved in I&#8217;d be happy to come by and drop some knowledge.</p>

	<p>Second, I would greatly appreciate anybody willing to let me office-crash and hang out with them in their workplaces.</p>

	<p>Finally, I would love to meet up with fellow Rubyists, Javascripters and foodies to do any one (or many) of the following things:</p>

	<ul>
		<li>eat delicious food</li>
		<li>write fun code</li>
		<li>talk about the future of the web</li>
		<li>drink and sing karaoke</li>
	</ul>

	<p>If you&#8217;re interested, just <a href="http://twitter.com/aq" title="@aq">hit me up on twitter </a> or email me at aaron at this domain.</p>
 ]]></content:encoded>
			<wfw:commentRss>http://www.quirkey.com/blog/2009/11/03/going-to-california-nov-12-23/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sammy 0.3.0 Released: I gotta right to swing!</title>
		<link>http://www.quirkey.com/blog/2009/09/30/sammy-0-3-0-released-i-gotta-right-to-swing/</link>
		<comments>http://www.quirkey.com/blog/2009/09/30/sammy-0-3-0-released-i-gotta-right-to-swing/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 14:57:57 +0000</pubDate>
		<dc:creator>AQ</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Sammy]]></category>
		<category><![CDATA[Software/Scripts]]></category>

		<guid isPermaLink="false">http://www.quirkey.com/blog/?p=371</guid>
		<description><![CDATA[I&#8217;m very happy to announce the next major release of Sammy.js. I&#8217;ve been working on this for over a month and the result has been a lot more changes then I expected but over all a smaller, cleaner core code base. Here&#8217;s a quick run through of the biggest changes. See HISTORY or the Commits [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/blog/uploads/igottarighttoswing.jpg" alt="Sammy 0.3.0: I gotta right to swing!" /></p>


	<p>I&#8217;m very happy to announce the next major release of <a href="http://code.quirkey.com/sammy">Sammy.js.</a> I&#8217;ve been working on this for over a month and the result has been a lot more changes then I expected but over all a smaller, cleaner core code base. Here&#8217;s a quick run through of the biggest changes. See <a href="http://github.com/quirkey/sammy/blob/master/HISTORY"><span class="caps">HISTORY</span></a> or the <a href="http://github.com/quirkey/sammy/commits/master">Commits</a> for a full list and more detail.</p>
<span id="more-371"></span>
	<h3>Plugins</h3>

	<p>The biggest change, that resulted in a lot of little changes is <code>Sammy.Application#use()</code> which allows you to package and resuse application level code into &#8216;Plugins&#8217;. See the <a href="http://code.quirkey.com/sammy/docs/plugins.html">documentation on plugins for more detail.</a> This also marks the start of an official selection of plugins, with two as part of this release and more on the way.</p>

<p>The default template system that used $.srender internally has been extracted out into a plugin. To enable <em>almost</em> the exact same functionality:</p>

<pre class="textmate-source"><span class="source source_js source_js_jquery"><span class="comment comment_line comment_line_double-slash comment_line_double-slash_js"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_js">//</span> somewhere in your HTML (after sammy.js): 
</span><span class="comment comment_line comment_line_double-slash comment_line_double-slash_js"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_js">//</span> &lt;script src="plugins/sammy.template.js" type="text/javascript"&gt;&lt;/script&gt;
</span><span class="keyword keyword_operator keyword_operator_js">$</span><span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>sammy<span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span><span class="storage storage_type storage_type_js">function</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">()</span> <span class="meta meta_brace meta_brace_curly meta_brace_curly_js">{</span>
  <span class="comment comment_line comment_line_double-slash comment_line_double-slash_js"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_js">//</span> include the Sammy.Template plugin
</span>  <span class="variable variable_language variable_language_js">this</span><span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>use<span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span>Sammy<span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>Template<span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js">;</span>
  
<span class="meta meta_brace meta_brace_curly meta_brace_curly_js">}</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js">;</span></span></pre>

	<h3>Events</h3>

	<p>Sammy.Application&#8217;s bind() and trigger() methods now use jQuery&#8217;s namespacing to bind to Events. This means that Sammy.Application can now easily catch events that bubble to it like &#8216;click&#8217; or &#8216;focus&#8217;. The big awesomeness is that the callbacks for these bind() methods are always evaluated within a Sammy.EventContext so that even events triggered from outside the app can be handled in the same way as internal events.</p>

  <pre class="textmate-source"><span class="source source_js source_js_jquery"><span class="storage storage_type storage_type_js">var</span> app <span class="keyword keyword_operator keyword_operator_js">=</span> <span class="keyword keyword_operator keyword_operator_js">$</span><span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>sammy<span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span><span class="storage storage_type storage_type_js">function</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">()</span> <span class="meta meta_brace meta_brace_curly meta_brace_curly_js">{</span>

    <span class="variable variable_language variable_language_js">this</span><span class="support support_function support_function_js support_function_js_jquery">.bind</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span><span class="string string_quoted string_quoted_single string_quoted_single_js"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js">'</span>custom-event<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">'</span></span><span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js">, </span><span class="storage storage_type storage_type_js">function</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">()</span> <span class="meta meta_brace meta_brace_curly meta_brace_curly_js">{</span>
      <span class="comment comment_line comment_line_double-slash comment_line_double-slash_js"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_js">//</span> this == Sammy.EventContext
  </span>    <span class="support support_function support_function_js">alert</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span><span class="string string_quoted string_quoted_single string_quoted_single_js"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js">'</span>Custom Event<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">'</span></span> <span class="keyword keyword_operator keyword_operator_js">+</span> <span class="variable variable_language variable_language_js">this</span><span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>params<span class="meta meta_brace meta_brace_square meta_brace_square_js">[</span><span class="string string_quoted string_quoted_single string_quoted_single_js"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js">'</span>wha<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">'</span></span><span class="meta meta_brace meta_brace_square meta_brace_square_js">]</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js">;</span>
    <span class="meta meta_brace meta_brace_curly meta_brace_curly_js">}</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js">;</span>

  <span class="meta meta_brace meta_brace_curly meta_brace_curly_js">}</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js">;</span>

  <span class="comment comment_line comment_line_double-slash comment_line_double-slash_js"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_js">//</span> the app is by default bound to 'body'
  </span><span class="support support_class support_class_js support_class_js_jquery">$</span><span class="punctuation punctuation_section punctuation_section_class punctuation_section_class_js">(</span><span class="meta meta_selector meta_selector_jquery"><span class="punctuation punctuation_definition punctuation_definition_selector punctuation_definition_selector_begin punctuation_definition_selector_begin_js">'</span><span class="meta meta_selector meta_selector_css"><span class="entity entity_name entity_name_tag entity_name_tag_css">body</span></span><span class="punctuation punctuation_definition punctuation_definition_selector punctuation_definition_selector_end punctuation_definition_selector_end_js">'</span></span><span class="punctuation punctuation_section punctuation_section_class punctuation_section_class_js">)</span><span class="support support_function support_function_js support_function_js_jquery">.trigger</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span><span class="string string_quoted string_quoted_single string_quoted_single_js"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js">'</span>custom-event<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">'</span></span><span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js">, </span><span class="meta meta_brace meta_brace_curly meta_brace_curly_js">{</span>wha: <span class="string string_quoted string_quoted_single string_quoted_single_js"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js">'</span>ZUH?!<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">'</span></span><span class="meta meta_brace meta_brace_curly meta_brace_curly_js">}</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js">;</span>
  <span class="comment comment_line comment_line_double-slash comment_line_double-slash_js"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_js">//</span>=&gt; system alert ZUH?!
  </span></span></pre>

	<h3>Cleanup</h3>

	<p>With the advent of plugins, Sammy Core is now even smaller (8.9k minified). This is also possible because I&#8217;ve removed the former &#8216;classical&#8217; inheritence code in favor of prototypal inheritence, which is a big win in terms of cleanlieness and global scope leakage.</p>


	<h3>See Also</h3>


	<p>I mentioned this on twitter, but I&#8217;m working on some new tutorials and screencasts about Sammy. If you have ideas/suggestions, dont hesitate to let me know. The first one should be up next week. I&#8217;m going to try to do them bi-weekly, we&#8217;ll see how that goes <img src='http://www.quirkey.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>


	<p>Again, I&#8217;ve tried to be as thorough with inline <span class="caps">API</span> docs as I could so any changes should be in the clear. Thanks again to everyone who helped with this release and has supported Sammy recently!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.quirkey.com/blog/2009/09/30/sammy-0-3-0-released-i-gotta-right-to-swing/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Sammy.js, CouchDB, and the new web architecture</title>
		<link>http://www.quirkey.com/blog/2009/09/15/sammy-js-couchdb-and-the-new-web-architecture/</link>
		<comments>http://www.quirkey.com/blog/2009/09/15/sammy-js-couchdb-and-the-new-web-architecture/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 13:44:38 +0000</pubDate>
		<dc:creator>AQ</dc:creator>
				<category><![CDATA[CouchDB]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Sammy]]></category>

		<guid isPermaLink="false">http://www.quirkey.com/blog/?p=359</guid>
		<description><![CDATA[UPDATE: My slides and a protected instance (will open up for play soon) or swinger, available here I&#8217;ll be honest. When I created Sammy.js, It was more of an academic exercise then a means to an end. I had ideas for how it could be useful, and had some immediate uses for it, but the [...]]]></description>
			<content:encoded><![CDATA[	<p><em><span class="caps">UPDATE</span>: My slides and a protected instance (will open up for play soon) or swinger, available <a href="http://c.ixxr.net/swinger/_design/swinger/index.html#/preso/jqcon_09/display/1" title="">here</a> </em></p>

	<p>I&#8217;ll be honest. When I created <a href="http://code.quirkey.com/sammy" title="">Sammy.js,</a> It was more of an academic exercise then a means to an end. I had ideas for how it could be useful, and had some immediate uses for it, but the initial thought was &#8216;recreating Sinatra&#8217;s <span class="caps">API</span> in JavaScript&#8217;. Little did I know &#8211; with a little introduction and the work of some clever individuals, its real value would be revealed.</p>

	<p><span id="more-359"></span></p>

	<p>We&#8217;re at the dawn of a new age on the web, or maybe or horizon, or a precipice; the metaphor doesn&#8217;t matter, the point is, things are changing. Specifically, as browsers become more and more powerful, as developers we&#8217;re given new opportunities to rethink how we architect web applications. Whether or not some of the predictions of &#8216;the death of the traditional desktop&#8217; are correct &#8211; whether or not the near future desktop is just the browser &#8211; we now have the power, without proprietary technologies (flash, etc) to create truly desktop like experiences on the web. Thats nothing mind-blowing, we&#8217;ve seen it coming for a little while now.</p>

	<p>Ok, then: let me <em>blow your mind.</em></p>

	<p>Because of the great power that modern browsers provide us as Javascript developers a new paradigm of web development is arising. Lets take a look at the current/traditional model:</p>

	<p><img src="http://img.skitch.com/20090915-6xfj7cp1kx6w884tqw29yk2k4.jpg" alt="Old Way" /></p>

	<p>Here we have a traditional stack. The &#8216;power&#8217; of the application lies on the server: our development platform of choice (Rails, <span class="caps">PHP</span>, etc) sits on top of our database of choice (probably relational, probably <span class="caps">SQL</span>). This server platform renders finished <span class="caps">HTML</span> and maybe decorates those pages with the use of our JS library and our application specific code (Your $(hit)). In this model we&#8217;re using probably at least 3 different programming languages and almost fully on the speed and reliability of our servers for getting data to the user. There&#8217;s probably also at least 3 steps in either direction between data and the user:</p>

	<ul>
		<li>User clicks a link on a page or follows a <span class="caps">URL</span></li>
		<li>The request is sent to the server</li>
		<li>App receives request passes it on to Model/ORM layer</li>
		<li><span class="caps">ORM</span> requests the data from the Database</li>
		<li>Database returns the data to the <span class="caps">ORM</span></li>
		<li><span class="caps">ORM</span> returns the data in a parse-able form to the App</li>
		<li>App converts it into user-readable format and displays it to user</li>
	</ul>

	<p>Obviously, Rails and most other languages frameworks abstract a lot of this away, so we don&#8217;t really have to think in all these steps. They&#8217;re there, though.</p>

	<p><img src="http://img.skitch.com/20090915-c8trr5mh7ukbhg6eukptwsuq3r.jpg" alt="The New Way" /></p>

	<p>Welcome to the new world. <span class="caps">HTTP </span>Databases and <span class="caps">JSON </span>Storage. The simple act of making the database and the browser more powerful on either end has destroyed the need for the middle tier. In the new architecture, Our database (JSON/HTTP based: <a href="http://couchdb.org" title="">CouchDB</a>, <a href="http://getcloudkit.com" title="">Cloudkit</a>) serves data as <span class="caps">JSON</span> directly to the browser. On the browser side we create a much smaller/tighter &#8216;controller&#8217; layer with JavaScript. This handles the directing of the user to the right place, the displaying of the data to the user, and the conversion of user interaction into state + data. This middle piece is jQuery + Sammy.js.</p>

	<p>In my presentation at jQuery Conf this past weekend (<a href="http://c.ixxr.net/swinger/_design/swinger/index.html#/preso/jqcon_09/display/1" title="">slides available here</a>) I demonstrated this concept in a rather meta-tastic way. The presentation tool I used was called <a href="http://github.com/quirkey/swinger" title="">Swinger</a> and it was written using CouchDB, <a href="http://github.com/couchapp/couchapp" title="">CouchApp,</a> and Sammy.js. The application logic was contained in a single JS file that used a Sammy application to do all the routing, getting data in and out of CouchDB and displaying it in a particularly pretty way. The coolest part about this whole thing is that even beyond taking out the middle layer, this implementation removes the traditional static file serving model, too. With the power of CouchApp and _attachments, the javascript and <span class="caps">HTML</span> files needed to serve the application are served directly out of the database. Its like CouchDB and Sammy.js were made for each other. Think about the new steps for this architecture:</p>

	<ul>
		<li>User clicks a link on the page or follows a <span class="caps">URL</span></li>
		<li>Data is requested via <span class="caps">AJAX</span> from the server</li>
		<li>The server proxies to the database or processes the request directly</li>
		<li>The data is returned to Sammy.js as <span class="caps">JSON</span></li>
		<li>Sammy.js uses the data it needs and displays it to the user</li>
	</ul>

	<p>There are a number really amazing and exciting things to note here. First, notice how the application is written in JavaScript <span class="caps">AND</span> the data is JavaScript. The <span class="caps">JSON</span> store might actually be written in another language (CouchDB is Erlang, Cloudkit is Ruby) but we don&#8217;t really ever have to touch those. Personally, I really like JavaScript. Sure, I miss some of Ruby&#8217;s syntax and niceties, but I&#8217;ll give that up pretty quickly for something that still shares some of the similar good features (closures, loose typing) and has a ubiquitous deployment environment (the browser). Second, the end result is probably similar if not better to the end user, as we eliminate the need to reload the page at every request, resulting in a better perceived speed.</p>

	<p>One of the provisions I gave for my talk is that &#8220;I&#8217;m less concerned with speed than awesomeness&#8221;. That rings pretty true here. I don&#8217;t have an architecture like this running in production and getting hit like twitter. I can&#8217;t really speak yet to how well it &#8216;scales&#8217; or how it preforms under load. <span class="caps">I CAN</span> tell you about how awesome it is and how easy and fun it was to develop swinger with Sammy. That&#8217;s really all <em>I</em> need to know right now.</p>
 ]]></content:encoded>
			<wfw:commentRss>http://www.quirkey.com/blog/2009/09/15/sammy-js-couchdb-and-the-new-web-architecture/feed/</wfw:commentRss>
		<slash:comments>41</slash:comments>
		</item>
		<item>
		<title>jQueryConf 2009</title>
		<link>http://www.quirkey.com/blog/2009/09/14/jqueryconf-2009/</link>
		<comments>http://www.quirkey.com/blog/2009/09/14/jqueryconf-2009/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 22:32:33 +0000</pubDate>
		<dc:creator>AQ</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.quirkey.com/blog/?p=356</guid>
		<description><![CDATA[First of all jQueryConf was straight up awesome. The organizers did a great job and I met a staggering number of cool, intellegent people. I think the key (at least for me) of why it was so much fun, was it wasn&#8217;t a ruby conference. What I mean by that is it wasn&#8217;t just other [...]]]></description>
			<content:encoded><![CDATA[	<p>First of all jQueryConf was straight up awesome. The organizers did a great job and I met a staggering number of cool, intellegent people. I think the key (at least for me) of why it was so much fun, was it wasn&#8217;t a ruby conference. What I mean by that is it wasn&#8217;t just other Rubyists, with similar day jobs, and similar interests. Thats fun of course, but the thing with jQuery and JavaScript in general, is it is very few peoples&#8217; full time jobs. That means that there were devs from every neck of the web development woods. That meant for me, hearing a ton of new and different perspectives and getting a whiff of all the cool stuff going on <span class="caps">OUTSIDE</span> of the Ruby world.</p>

	<p>I think my talk was pretty successful and besides not getting through all my slides, it seems like I got a lot of people excited about CouchDB and Sammy.js. I&#8217;m going to write a pretty in-depth recap of the talk and post it soon.</p>

	<p>Also, It sounds like there will be a lot more jQuery and JavaScript conferences in the near future. I can&#8217;t wait.</p>
 ]]></content:encoded>
			<wfw:commentRss>http://www.quirkey.com/blog/2009/09/14/jqueryconf-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

