<?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"
	>

<channel>
	<title>InquiryLabs &#187; Life and Family</title>
	<atom:link href="http://blog.inquirylabs.com/category/life-and-family/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.inquirylabs.com</link>
	<description>Politics, Programming and Possibilities</description>
	<pubDate>Fri, 16 May 2008 03:23:20 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>What Makes jQuery a Good Choice?</title>
		<link>http://blog.inquirylabs.com/2008/04/29/what-makes-jquery-a-good-choice/</link>
		<comments>http://blog.inquirylabs.com/2008/04/29/what-makes-jquery-a-good-choice/#comments</comments>
		<pubDate>Wed, 30 Apr 2008 03:55:01 +0000</pubDate>
		<dc:creator>Duane Johnson</dc:creator>
		
		<category><![CDATA[Life and Family]]></category>

		<category><![CDATA[Software Engineering]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[jquery]]></category>

		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.inquirylabs.com/?p=273</guid>
		<description><![CDATA[jQuery has been around since January of 2006.  Since last year, many developers within the Ruby community have been embracing it as an alternative to Prototype and Scriptaculous.  Lately, I've been working on a browser-based application at a company in Chicago that needs a simple user interface and fairly powerful front-end.  I've advocated the use of jQuery, and thought it would be useful to set out the reasons for my preference here for others as well.]]></description>
			<content:encoded><![CDATA[<link rel="stylesheet" href="/mac_classic_code.css" type="text/css" charset="utf-8">
<p>I&#8217;ve been told that jQuery has been around since January of 2006.  At some point during the last year, many developers within the Ruby community began to embrace it as an alternative to Prototype and Scriptaculous.  Many of the programmer friends I look up to in the Merb community, specifically, are big advocates of jQuery.</p>
<p>So this post is an attempt at summarizing the strengths I&#8217;ve found in jQuery as opposed to the two other javascript libraries that I&#8217;ve worked closely with: <a href="http://mootools.net/">mooTools</a> and <a href="http://www.prototypejs.org/">Prototype</a> / <a href="http://script.aculo.us/">Scriptaculous</a>.  My motivation for this is a soon-to-be-made decision regarding the javascript library that will be used in a browser-based application that I&#8217;m working on at a company in Chicago.  The application needs a simple user interface and fairly powerful front-end.  I&#8217;ve advocated the use of jQuery, and thought it would be useful to set out the reasons for my preference here on the InquiryLabs blog.</p>
<h3>jQuery is well-documented</h3>
<p>There is a fine set of documentation at <a href="http://docs.jquery.com/Main_Page">jquery.com</a>.  Scriptaculous hasn&#8217;t seen much improvement in its documentation in over a year.  Prototype&#8217;s documentation is (in my opinion) pretty, but still lacking.</p>
<h3>jQuery is concise</h3>
<p>It uses as its central paradigm the idea of &#8220;querying&#8221; the DOM for the desired elements and returning a collection (like a dataset, but with DOM elements) and then acting on the result, or set of elements.  The reason it can be concise is that the element sets are chainable.  For example:</p>
<pre class="textmate-source mac_classic"><span class="source source_js"><span class="support support_class support_class_js">document</span><span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>ready<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="keyword keyword_control keyword_control_js">for</span> <span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span><span class="storage storage_type storage_type_js">var</span> i <span class="keyword keyword_operator keyword_operator_js">=</span> <span class="constant constant_numeric constant_numeric_js">0</span><span class="punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js">;</span> i <span class="keyword keyword_operator keyword_operator_js">&lt;=</span> <span class="constant constant_numeric constant_numeric_js">6</span><span class="punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js">;</span> i<span class="keyword keyword_operator keyword_operator_js">++</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span>
    <span class="keyword keyword_operator keyword_operator_js">$</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">&#8216;</span>h<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></span> <span class="keyword keyword_operator keyword_operator_js">+</span> i <span class="keyword keyword_operator keyword_operator_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">&#8216;</span> [@id]<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>each<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="keyword keyword_operator keyword_operator_js">$</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">&#8216;</span>&lt;a class=&#8221;anchorlink&#8221;&gt;<span class="constant constant_character constant_character_escape constant_character_escape_js">\u</span>00B6&lt;/a&gt;<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>
        attr<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">&#8216;</span>href<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></span><span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_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">&#8216;</span>#<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</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><span class="support support_constant support_constant_dom support_constant_dom_js">id</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>
        attr<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">&#8216;</span>title<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></span><span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_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">&#8216;</span>Permalink to this headline<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>
        appendTo<span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span><span class="variable variable_language variable_language_js">this</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></pre>
<p>(Hat tip, <a href="http://lucumr.pocoo.org/articles/why-jquery-is-the-answer">lucumr</a>)  In the above example, anchor tags are added to all headlines in the document.  Note the clever use of chaining which reduces the size of the code, yet retains its expressiveness.</p>
<h3>jQuery is easily extended</h3>
<p>Whether it&#8217;s a simple function or an entire plugin, jQuery is built for extending.  The ability to query for &#8220;element sets&#8221; and then act directly on those results is not limited by the core code.  Since it&#8217;s so easy to add custom functions to element sets, it becomes natural.  For example, I found that I often needed to add or subtract a value from a CSS property.  I solved this problem by extending the jQuery core element set, like so:</p>
<pre class="textmate-source mac_classic"><span class="source source_js"><span class="meta meta_function meta_function_js"><span class="support support_class support_class_js">jQuery.fn</span>.<span class="entity entity_name entity_name_function entity_name_function_js">cssDelta</span> = <span class="storage storage_type storage_type_function storage_type_function_js">function</span><span class="punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_begin punctuation_definition_parameters_begin_js">(</span><span class="variable variable_parameter variable_parameter_function variable_parameter_function_js">property, delta</span><span class="punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_end punctuation_definition_parameters_end_js">)</span></span> <span class="meta meta_brace meta_brace_curly meta_brace_curly_js">{</span>
  <span class="storage storage_type storage_type_js">var</span> value <span class="keyword keyword_operator keyword_operator_js">=</span> <span class="support support_function support_function_js">parseInt</span><span class="meta meta_brace meta_brace_round meta_brace_round_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>css<span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span>property<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="keyword keyword_control keyword_control_js">return</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>css<span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span>property<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_round meta_brace_round_js">(</span>value <span class="keyword keyword_operator keyword_operator_js">+</span> delta<span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span> <span class="keyword keyword_operator keyword_operator_js">+</span> <span class="string string_quoted string_quoted_double string_quoted_double_js"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js">&#8220;</span>px<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8220;</span></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="punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js">;</span>
</span></pre>
<p>Using the above code, I can query for a set of elements and adjust the height property (for example) in one fell swoop.  This will now add 5 pixels to the height of each &#8220;rack-item&#8221; element:</p>
<pre class="textmate-source mac_classic"><span class="source source_js"><span class="keyword keyword_operator keyword_operator_js">$</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">&#8216;</span>.rack-item<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>cssDelta<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">&#8216;</span>height<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></span><span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js">, </span><span class="constant constant_numeric constant_numeric_js">5</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>jQuery is small</h3>
<p>According to <a href="http://www.lullabot.com/audiocast/drupal_podast_no_21_jquery_author_john_resig">Jeff Robbins and John Resig</a>, the Drupal team chose it over Prototype because it is a mere 15k compared to Prototype&#8217;s 80k.  The Dojo library is even larger.</p>
<p><strong>Update:</strong>I decided to test this out myself to see what results I&#8217;d get.  Resig&#8217;s comment was probably from jQuery&#8217;s earlier days when it was a micro framework.  As far as I understand, it&#8217;s still possible to compress the jQuery library down to 18k or so, but that&#8217;s possible for Prototype, too.  In fact, my tests show that un-gzipped, compressed code gets both down to 51k using Dojo&#8217;s <a href="http://dante.dojotoolkit.org/shrinksafe/">ShrinkSafe</a> online app.</p>
<p><strong>Update 2:</strong>Thanks to Peter Higgins below for commenting on the size of Dojo.  For comparison, its compressed (but un-gzipped) size is 77k.</p>
<h3>jQuery has broad acceptance</h3>
<p>Feedburner, Technorati, Drupal, Edgewall Trac, etc.</p>
<h3>Contrasting Prototype</h3>
<p>Here are some examples of the concise nature of jQuery, taken from the <a href="http://jquery.com/blog/2006/08/20/why-jquerys-philosophy-is-better/">jQuery blog</a>:</p>
<pre class="textmate-source mac_classic"><span class="source source_js"><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> AJAX Updater in Prototype:
</span>
<span class="meta meta_class meta_class_instance meta_class_instance_constructor"><span class="keyword keyword_operator keyword_operator_new keyword_operator_new_js">new</span> <span class="entity entity_name entity_name_type entity_name_type_instance entity_name_type_instance_js">Ajax.Updater</span></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">&#8216;</span>placeholder<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></span><span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js">, </span>url<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> method: <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">&#8216;</span>get<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></span><span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js">, </span>parameters: par <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> AJAX Updater In jQuery:
</span>
<span class="keyword keyword_operator keyword_operator_js">$</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">&#8216;</span>#placeholder<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span><span class="support support_function support_function_js">load</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span>url <span class="keyword keyword_operator keyword_operator_js">+</span> par<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> Note: This example doesn’t deal with the obvious
</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> iteration benefits we get if we wanted to load the
</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> response into every &lt;p&gt; object, for instance.
</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> Adding a class to an element in Prototype:
</span>
Element<span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>addClassName<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">&#8216;</span>element<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></span><span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_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">&#8216;</span>className<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></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> Adding a class to an element in jQuery:
</span>
<span class="keyword keyword_operator keyword_operator_js">$</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">&#8216;</span>#element<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>addClass<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">&#8216;</span>className<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></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> Adding a class to a group of elements in Prototype:
</span>
<span class="keyword keyword_operator keyword_operator_js">$$</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">&#8216;</span>.element<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>each<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>node<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>
  Element<span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>addClassName<span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span>node<span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_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">&#8216;</span>className<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></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="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> Adding a class to a group of elements in jQuery:
</span>
<span class="keyword keyword_operator keyword_operator_js">$</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">&#8216;</span>.element<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>addClass<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">&#8216;</span>className<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">&#8216;</span></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>
<p>&#8220;That last one is the clearest example of the difference in methodology. Because jQuery is passing messages to jQuery objects, the code is barely changed. jQuery doesn’t care that we’re now adding a class to a group of objects instead of one object; the underlying code is the same (add the class to the set of elements in the object). Prototype, on the other hand, requires an iterator.&#8221;</p>
<p>&#8220;And as your code becomes more complex, jQuery’s scales easily, while nested loops become the norm in frameworks like Prototype.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inquirylabs.com/2008/04/29/what-makes-jquery-a-good-choice/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Hey, Graduate!  I Love You!</title>
		<link>http://blog.inquirylabs.com/2008/04/29/hey-graduate-i-love-you/</link>
		<comments>http://blog.inquirylabs.com/2008/04/29/hey-graduate-i-love-you/#comments</comments>
		<pubDate>Wed, 30 Apr 2008 00:57:25 +0000</pubDate>
		<dc:creator>Duane Johnson</dc:creator>
		
		<category><![CDATA[Life and Family]]></category>

		<guid isPermaLink="false">http://blog.inquirylabs.com/?p=272</guid>
		<description><![CDATA[Extraordinary as it may seem, my loving and persistent wife, Kelty, has finally graduated from BYU!  I&#8217;m so happy for her, and relieved to finally see her on the other side of the divide.  Now we just have to get me over there  
Here&#8217;s a 3-minute video I made for her.  [...]]]></description>
			<content:encoded><![CDATA[<p>Extraordinary as it may seem, my loving and persistent wife, Kelty, has <strong>finally graduated from BYU!</strong>  I&#8217;m so happy for her, and relieved to finally see her on the other side of the divide.  Now we just have to get me over there <img src='http://blog.inquirylabs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Here&#8217;s <a href="http://inquirylabs.com/downloads/ToKelty/">a 3-minute video</a> I made for her.  Feel free to share this moment with us and send her your thoughts!</p>
<p align="center">
<a href="http://inquirylabs.com/downloads/ToKelty/"><img src="http://inquirylabs.com/downloads/ToKelty/KeltyGradVideo.png"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inquirylabs.com/2008/04/29/hey-graduate-i-love-you/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Another Weekend Ride!</title>
		<link>http://blog.inquirylabs.com/2008/04/06/another-weekend-ride-2/</link>
		<comments>http://blog.inquirylabs.com/2008/04/06/another-weekend-ride-2/#comments</comments>
		<pubDate>Sun, 06 Apr 2008 15:59:04 +0000</pubDate>
		<dc:creator>Duane Johnson</dc:creator>
		
		<category><![CDATA[Life and Family]]></category>

		<guid isPermaLink="false">http://blog.inquirylabs.com/2008/04/06/another-weekend-ride-2/</guid>
		<description><![CDATA[
I just love being there to capture on video what Kelty does.  Watch for a segment in this clip when Pedro (Kelty&#8217;s horse) rears up, and she masterfully keeps everything under control.
]]></description>
			<content:encoded><![CDATA[<p><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/nnTEzFVw4Bk&#038;hl=en"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/nnTEzFVw4Bk&#038;hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></p>
<p>I just love being there to capture on video what Kelty does.  Watch for a segment in this clip when Pedro (Kelty&#8217;s horse) rears up, and she masterfully keeps everything under control.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inquirylabs.com/2008/04/06/another-weekend-ride-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Kelty and I Went Horseback Riding Today</title>
		<link>http://blog.inquirylabs.com/2008/01/05/kelty-and-i-went-horseback-riding-today/</link>
		<comments>http://blog.inquirylabs.com/2008/01/05/kelty-and-i-went-horseback-riding-today/#comments</comments>
		<pubDate>Sun, 06 Jan 2008 00:59:12 +0000</pubDate>
		<dc:creator>Duane Johnson</dc:creator>
		
		<category><![CDATA[Life and Family]]></category>

		<guid isPermaLink="false">http://blog.inquirylabs.com/2008/01/05/kelty-and-i-went-horseback-riding-today/</guid>
		<description><![CDATA[ 
Here&#8217;s a tribute to my wife that I made from our video footage.  You&#8217;re awesome, Kelty!  Thanks for teaching me a bit too  
P.S. The video is also available directly on youtube here.
]]></description>
			<content:encoded><![CDATA[<p><object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/y17GqXI5dBQ"></param> <embed src="http://www.youtube.com/v/y17GqXI5dBQ" type="application/x-shockwave-flash" width="425" height="350"></embed></object></p>
<p>Here&#8217;s a tribute to my wife that I made from our video footage.  You&#8217;re awesome, Kelty!  Thanks for teaching me a bit too <img src='http://blog.inquirylabs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>P.S. The video is also available <a href="http://www.youtube.com/watch?v=y17GqXI5dBQ">directly on youtube here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inquirylabs.com/2008/01/05/kelty-and-i-went-horseback-riding-today/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Kelty Dancers</title>
		<link>http://blog.inquirylabs.com/2007/09/03/kelty-dancers/</link>
		<comments>http://blog.inquirylabs.com/2007/09/03/kelty-dancers/#comments</comments>
		<pubDate>Tue, 04 Sep 2007 02:01:50 +0000</pubDate>
		<dc:creator>Duane Johnson</dc:creator>
		
		<category><![CDATA[Life and Family]]></category>

		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.inquirylabs.com/2007/09/03/kelty-dancers/</guid>
		<description><![CDATA[This was a song that my mother in law, Ginger, heard when she was younger.  She later named her last child and my wife, Kelty, after the reference in it:

oh the days of the kelty dancers
oh the ring of the piper&#8217;s tune
all for one of those hours of gladness
gone, alas, like my youth too [...]]]></description>
			<content:encoded><![CDATA[<p>This was a song that my mother in law, Ginger, heard when she was younger.  She later named her last child and my wife, Kelty, after the reference in it:</p>
<blockquote><p>
oh the days of the kelty dancers<br />
oh the ring of the piper&#8217;s tune<br />
all for one of those hours of gladness<br />
gone, alas, like my youth too soon</p>
<p>when the boys begin to gather in the glen of a summer&#8217;s night<br />
and the kelty dancers will be filled with joy and utter delight</p>
<p>oh to dream of it<br />
oh to think of it</p>
<p>oh to dream of it<br />
fills my heart with tears
</p></blockquote>
<p>It was a beautiful thing to hear Ginger sing this the other night.  I seem to be able to find the things I post here, so I&#8217;ve posted it since I never want to lose it <img src='http://blog.inquirylabs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inquirylabs.com/2007/09/03/kelty-dancers/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A Beautiful Day in Provo</title>
		<link>http://blog.inquirylabs.com/2007/03/31/a-beautiful-day-in-provo/</link>
		<comments>http://blog.inquirylabs.com/2007/03/31/a-beautiful-day-in-provo/#comments</comments>
		<pubDate>Sat, 31 Mar 2007 22:55:02 +0000</pubDate>
		<dc:creator>Duane Johnson</dc:creator>
		
		<category><![CDATA[Life and Family]]></category>

		<guid isPermaLink="false">http://blog.inquirylabs.com/2007/03/31/a-beautiful-day-in-provo/</guid>
		<description><![CDATA[It&#8217;s spring time and the weather is starting to beg me to go outside! I went for a bike ride this afternoon and quite enjoyed myself.  It was almost like I was 10 again&#8212;I biked through the now empty yard where a house once stood (it burned down about 6 months ago) and watched [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s spring time and the weather is starting to beg me to go outside! I went for a bike ride this afternoon and quite enjoyed myself.  It was almost like I was 10 again&#8212;I biked through the now empty yard where a house once stood (it burned down about 6 months ago) and watched kids playing in various parking lots (I live in an area with quite a few apartment complexes).  A couple of neighbor kids seem to have gotten their hands on a couple of gas-powered remote control race cars.  All of their friends were gathered around to watch the duel.  That looked like fun!</p>
<p>I hope this finds all of you well.  Good luck to those of you finishing off the semester at school.  Endure to the end, eh?  <img src='http://blog.inquirylabs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inquirylabs.com/2007/03/31/a-beautiful-day-in-provo/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Two Months Later</title>
		<link>http://blog.inquirylabs.com/2006/07/28/two-months-later/</link>
		<comments>http://blog.inquirylabs.com/2006/07/28/two-months-later/#comments</comments>
		<pubDate>Fri, 28 Jul 2006 15:03:04 +0000</pubDate>
		<dc:creator>Duane Johnson</dc:creator>
		
		<category><![CDATA[Life and Family]]></category>

		<category><![CDATA[Software Engineering]]></category>

		<guid isPermaLink="false">http://blog.inquirylabs.com/2006/07/28/two-months-later/</guid>
		<description><![CDATA[It&#8217;s been almost two months since my last post, and that makes it about time I wrote again.  I&#8217;ve been silent on this blog primarily for three reasons:

My recent work has required that I develop in PHP.  As of this week, I&#8217;m back on the Ruby on Rails track.
My brother passed away in [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been almost two months since my last post, and that makes it about time I wrote again.  I&#8217;ve been silent on this blog primarily for three reasons:</p>
<ol>
<li>My recent work has required that I develop in PHP.  As of this week, I&#8217;m back on the Ruby on Rails track.</li>
<li>My brother passed away in June, leaving this world unexpectedly.  It&#8217;s been a difficult time for me and my family.</li>
<li>My world view has changed significantly as a result of my findings in May, and it has taken some time to process the implications.</li>
</ol>
<p>I will post about each of these items separately.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inquirylabs.com/2006/07/28/two-months-later/feed/</wfw:commentRss>
		</item>
		<item>
		<title>When Life is Perfect</title>
		<link>http://blog.inquirylabs.com/2006/05/25/when-life-is-perfect/</link>
		<comments>http://blog.inquirylabs.com/2006/05/25/when-life-is-perfect/#comments</comments>
		<pubDate>Fri, 26 May 2006 01:25:12 +0000</pubDate>
		<dc:creator>Duane Johnson</dc:creator>
		
		<category><![CDATA[Life and Family]]></category>

		<guid isPermaLink="false">http://blog.inquirylabs.com/2006/05/25/when-life-is-perfect/</guid>
		<description><![CDATA[An old friend of mine, Kevin Yockey, and I were chatting about life, jobs and responsibility.  He mused that I hadn&#8217;t become a game programmer like we once thought.  Instead, I became a web developer.  Sometimes I feel the weight of responsibility as an income-earner, and realize it was probably for the [...]]]></description>
			<content:encoded><![CDATA[<p>An old friend of mine, Kevin Yockey, and I were chatting about life, jobs and responsibility.  He mused that I hadn&#8217;t become a game programmer like we once thought.  Instead, I became a web developer.  Sometimes I feel the weight of responsibility as an income-earner, and realize it was probably for the better that I travelled this path. Kevin&#8217;s wisdom (increasing with the years) shone through with his next remark:</p>
<blockquote><p>It&#8217;s a lot easier when you&#8217;re in school and don&#8217;t have to worry about making money.  But if you can make it doing something you enjoy then you&#8217;ve found the perfect line between responsibility and childhood.</p></blockquote>
<p>Isn&#8217;t that the case?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inquirylabs.com/2006/05/25/when-life-is-perfect/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Announcing FamilyAnywhere.com!</title>
		<link>http://blog.inquirylabs.com/2006/05/24/announcing-familyanywherecom/</link>
		<comments>http://blog.inquirylabs.com/2006/05/24/announcing-familyanywherecom/#comments</comments>
		<pubDate>Wed, 24 May 2006 20:05:27 +0000</pubDate>
		<dc:creator>Duane Johnson</dc:creator>
		
		<category><![CDATA[Life and Family]]></category>

		<category><![CDATA[Software Engineering]]></category>

		<guid isPermaLink="false">http://blog.inquirylabs.com/2006/05/24/announcing-familyanywherecom/</guid>
		<description><![CDATA[At the beginning of this year, I announced Family Connection, an open source, free, and easy-to-use family website built using Ruby on Rails.
Now it&#8217;s available as a hosted, very easy-to-set-up web app called Family Anywhere!  It has the same Family News and Address Book features as the original, plus a new Photo Album that [...]]]></description>
			<content:encoded><![CDATA[<p>At the beginning of this year, I announced <a href="http://familyconnect.rubyforge.org">Family Connection</a>, an open source, free, and easy-to-use family website built using <a href="http://rubyonrails.com">Ruby on Rails</a>.</p>
<p>Now it&#8217;s available as a hosted, very easy-to-set-up web app called <a href="http://familyanywhere.com">Family Anywhere</a>!  It has the same Family News and Address Book features as the original, plus a new Photo Album that lets you browse all of the photos you&#8217;ve shared with your family.  The hosted version is $9 per month, or less if you buy a year at a time.</p>
<p>For those who would like to just check out how it feels without going through the 2-minute sign-up process, log in to <a href="http://familyanywhere.com/test">FamilyAnywhere.com/test</a> and use &#8220;test&#8221; as the sign-in name and &#8220;password&#8221; as the password.</p>
<p>I&#8217;m proud to bring this program out in to the light of day, as it reflects some of my own desire to promote a better, more family-oriented world.  I hope you enjoy it as much as our family does!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inquirylabs.com/2006/05/24/announcing-familyanywherecom/feed/</wfw:commentRss>
		</item>
		<item>
		<title>(Past?) Time to Pay Attention to the Earth</title>
		<link>http://blog.inquirylabs.com/2006/04/06/past-time-to-pay-attention-to-the-earth/</link>
		<comments>http://blog.inquirylabs.com/2006/04/06/past-time-to-pay-attention-to-the-earth/#comments</comments>
		<pubDate>Thu, 06 Apr 2006 16:58:44 +0000</pubDate>
		<dc:creator>Duane Johnson</dc:creator>
		
		<category><![CDATA[Life and Family]]></category>

		<guid isPermaLink="false">http://blog.inquirylabs.com/2006/04/06/past-time-to-pay-attention-to-the-earth/</guid>
		<description><![CDATA[In January of this year, James Lovelock, author of the Gaia Theory announced that the earth has caught a fever manifest by irreversible global warming.
More recently, the BBC released an article confirming the alarming rate of increase of CO2 in the atmosphere. 
And now there is evidence that not only have our American governing officials [...]]]></description>
			<content:encoded><![CDATA[<p>In January of this year, <a href="http://www.ecolo.org/lovelock/">James Lovelock</a>, author of the <a href="http://james-lovelock.wikiverse.org/">Gaia Theory</a> announced that <a href="http://comment.independent.co.uk/commentators/article338830.ece">the earth has caught a fever</a> manifest by irreversible global warming.</p>
<p>More recently, the BBC released an article confirming the alarming <a href="http://news.bbc.co.uk/1/hi/sci/tech/4803460.stm">rate of increase of CO2 in the atmosphere</a>. </p>
<p>And now there is evidence that not only have our American governing officials been aware of it, but they have actively been <a href="http://www.washingtonpost.com/wp-dyn/content/article/2006/04/05/AR2006040502150_pf.html">censoring communication from those who can help us most</a>.  More information on this censorship <a href="http://pmbryant.typepad.com/b_and_b/2006/02/details_on_the_.html">here</a>.</p>
<p><a href="http://earthfamilyalpha.blogspot.com/2006/03/be-aware-right-now.html">Awareness</a> <a href="http://www.robertsilvey.com/notes/2006/03/hotter_than_bla.html">is</a> <a href="http://tingilinde.typepad.com/starstuff/2006/03/warnings_from_t.html">increasing</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inquirylabs.com/2006/04/06/past-time-to-pay-attention-to-the-earth/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
