<?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>Dwight Jack Diary &#187; ajax framework</title>
	<atom:link href="http://www.dwightjack.com/diary/tag/ajax-framework/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dwightjack.com/diary</link>
	<description>Diary of music, design and code</description>
	<lastBuildDate>Tue, 13 Jul 2010 20:46:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Introducing Bicycle 1.2: a lightweight JavaScript library</title>
		<link>http://www.dwightjack.com/diary/2009/06/15/bicycle-12-a-lightweight-javascript-library/</link>
		<comments>http://www.dwightjack.com/diary/2009/06/15/bicycle-12-a-lightweight-javascript-library/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 20:53:05 +0000</pubDate>
		<dc:creator>Dwight Jack</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[ajax framework]]></category>
		<category><![CDATA[javascript framework]]></category>
		<category><![CDATA[javascript library]]></category>
		<category><![CDATA[javascript shortcuts]]></category>

		<guid isPermaLink="false">http://www.dwightjack.com/diary/?p=175</guid>
		<description><![CDATA[Bicycle is a lightweight and efficient small library for JavaScript development featuring basic shortcuts and a full wrapper for events, AJAX and form handling]]></description>
			<content:encoded><![CDATA[<p>When i first stepped into JavaScript i found that one of web developers&#8217; common practice  was collecting  snippets of code (in form of prototypes, functions and shortcuts) to overcome both known JavaScript missing features and language&#8217;s verboseness.</p>
<p>Day by day, i&#8217;ve understood why so many developers use libraries (or frameworks) such as <strong>Mootools</strong> or <strong>jQuery:</strong> It&#8217;s a <em>matter of typing</em>.</p>
<pre><code>document.getElementById("test"); //native Javascript
$("#test"); // with jQuery</code></pre>
<p>At the same time i&#8217;ve learnt that <strong>libraries aren&#8217;t always worth their weight</strong>. Small projects don&#8217;t need them, and just writing a shortcut like:</p>
<pre><code>function id(string) {
   return document.getElementById(string);
}</code></pre>
<p>can make your life better (and more lightweight).</p>
<h3>Introducing Bicycle 1.2</h3>
<p><img class="size-full wp-image-184" align="right" style="margin-left:15px;" title="Bicycle 1.2" src="http://www.dwightjack.com/diary/wp-content/uploads/2009/06/bicyclelogo.png" alt="Bicycle 1.2" width="200" height="108" />That said, here is a new version of <strong>Bicycle</strong>, my little &#8220;JavaScript Collection&#8221;. As from the name, it&#8217;s a lightweight and load-cost-effective library (about <strong>9Kb minified</strong>) with everything is needed to <strong>keep your code simple and cross-browser</strong>. Here is a sample code:</p>
<pre><code>var el = $getEls("test");  // get the element with id "test"
var input = $TN("nametext");  // get the first element with name "nametext"</code></pre>
<h3>Chainability</h3>
<p>Anyway, if you need something more, since this new version Bicycle features a convenient <strong>chainability wrapper</strong>, with even new methods such as <strong>mouse and DOM-ready events</strong> and <strong>AJAX handling</strong>.</p>
<p>The chainable structure is bound to the <code>$b</code> namespace, so that you can use it along with other libraries. Here is a sample code:</p>
<pre><code>$b("#test").css("color","red").txt("New text!");</code></pre>
<p>See the <strong><a href="http://www.dwightjack.com/projects/bicycle/symbols/chain_chain-addons.html" target="_blank">documentation</a></strong> for more methods.</p>
<h3>Form Handling</h3>
<p>Finally, as a bonus, i&#8217;ve added a smart piece of code called <strong>Telegraph</strong>, which is basically a<strong> form handling library</strong> to quickly get and manipulate form inputs:</p>
<pre><code>$b.getForm("myForm").value("testinput"); // get an input value
$b.getForm("myForm").serialize(); // serialize form data in a JavaScript object</code></pre>
<h3>Grab a copy</h3>
<p>At last, <em>more code</em> can&#8217;t mean <em>same weight</em>, but i suppose you won&#8217;t mind it, &#8217;cause  Bicycle core + chainability + new methods + Telegraph is just <strong>22Kb minified</strong>.</p>
<p>Head to the main <a title="Bicycle JavaScript library" href="http://www.dwightjack.com/projects/bicycle/about.html" target="_blank"><strong>project page</strong></a> to get more infos and <a href="http://www.dwightjack.com/projects/bicycle/index.html" target="_blank">documentation</a>, or <strong><a title="Download Bicycle 1.2" href="http://www.dwightjack.com/diary/wp-content/plugins/download-monitor/download.php?id=11" target="_blank">grab a copy</a></strong> of the source code and &#8220;<em>take a ride</em>&#8221; with your brand new Bicycle.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dwightjack.com/diary/2009/06/15/bicycle-12-a-lightweight-javascript-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
