<?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>Steve Reynolds Blog &#187; Javascript</title>
	<atom:link href="http://www.reynoldsftw.com/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.reynoldsftw.com</link>
	<description>Being Generalist.</description>
	<lastBuildDate>Wed, 28 Jul 2010 20:36:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Clicky Web Analytics as a Desktop App</title>
		<link>http://www.reynoldsftw.com/2009/09/clicky-web-analytics-as-a-desktop-app/</link>
		<comments>http://www.reynoldsftw.com/2009/09/clicky-web-analytics-as-a-desktop-app/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 14:05:31 +0000</pubDate>
		<dc:creator>Steve Reynolds</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[chatterbloc]]></category>
		<category><![CDATA[clicky]]></category>
		<category><![CDATA[fluid.app]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Leopard]]></category>
		<category><![CDATA[web analytics]]></category>

		<guid isPermaLink="false">http://www.reynoldsftw.com/?p=1374</guid>
		<description><![CDATA[
			
				
			
		
I&#8217;m a big fan of Clicky Web Analytics &#8211; Why? Well mostly because of their excellent Spy feature which I&#8217;ve previously discussed here and here. A few weeks back I emailed the developers asking them:
&#8220;Something has just occured to me as I stare at the tab with Spy opened &#8211; could you add the current [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.reynoldsftw.com%2F2009%2F09%2Fclicky-web-analytics-as-a-desktop-app%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.reynoldsftw.com%2F2009%2F09%2Fclicky-web-analytics-as-a-desktop-app%2F&amp;source=SteveReynolds&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>I&#8217;m a big fan of <a href="http://getclicky.com/68264" target="_blank">Clicky Web Analytics</a> &#8211; Why? Well mostly because of their excellent Spy feature which I&#8217;ve previously discussed <a href="http://www.reynoldsftw.com/2009/08/getclicky-web-analytics-spy-review/" target="_self">here</a> and <a href="http://www.reynoldsftw.com/2009/03/review-new-mega-spy-realtime-analytics-with-clicky/" target="_self">here</a>. A few weeks back I emailed the developers asking them:</p>
<p style="text-align: center;"><em>&#8220;Something has just occured to me as I stare at the tab with Spy opened &#8211; could you add the current active user numbers into the title dynamically everytime that number changes?&#8221;</em></p>
<p style="text-align: left;">I was thinking something along the lines of Twitter search, or Campfire (and <a href="http://www.chatterbloc.com" target="_blank">Chatterbloc</a>) which display an unread message count in the title field which is also seen in your browser tab menu:</p>
<p style="text-align: left;"><img class="aligncenter size-full wp-image-1375" title="twitter-search" src="http://www.reynoldsftw.com/wp-content/uploads/2009/09/twitter-search.png" alt="twitter-search" width="265" height="31" />Why is this helpful to me? Well like most people I use multiple tabs and it really bugs me to have to flip from one to the other all the time to refresh or view updates that have appeared via ajax. Anyway, long story short &#8211; <a href="http://getclicky.com/68264" target="_blank">Clicky</a> implemented the change within about an hour of my email (which was also awesome btw).</p>
<h3>Fluid</h3>
<p style="text-align: left;">So that&#8217;s great, my tabs now show me my current active live user count on reynoldsftw.com. But then I started to think&#8230; I&#8217;m using multiple <strong><em>applications</em></strong>, not just multiple tabs &#8211; so when my focus is elsewhere &#8211; I can&#8217;t quickly see the latest user count without going back to my browser and checking out the tab!</p>
<p style="text-align: left;"><img class="alignright size-full wp-image-1377" title="fluid" src="http://www.reynoldsftw.com/wp-content/uploads/2009/09/fluid.png" alt="fluid" width="75" height="76" /><strong>Enter Fluid.app</strong>. <a href="http://fluidapp.com/" target="_blank">Fluid</a> is a browser-type application which goes one step further &#8211; allowing you to build site specific Mac OSX applications based on websites. What do I mean by this? Well basically &#8211; I can create a brand new desktop application out of any website. It will have a lovely icon, and launch in exactly the same way as any other desktop application.</p>
<p style="text-align: left;">Fluid isn&#8217;t just that though. It also gives you added scripting ability in the name of <a href="https://addons.mozilla.org/en-US/firefox/addon/748" target="_blank">Greasemonkey</a>. What this allows me to do as a user is write a small script (javascript) to interact with the page, and do something with the results. In this case, I am going to create a script which reads the &lt;TITLE&gt; HTML element, looking for the user count in brackets &#8220;(10)&#8221;, and display a nice badge over the dock icon:</p>
<p style="text-align: left;"><img class="aligncenter size-full wp-image-1486" title="dock-clicky" src="http://www.reynoldsftw.com/wp-content/uploads/2009/09/dock-clicky.png" alt="dock-clicky" width="240" height="68" /></p>
<p style="text-align: left;">Once complete, I now only have to peer down to my dock for the latest user count &#8211; and if I want to dive into the Spy page, I just click the icon, and my web application is open. Awesome work &#8211; so how did I do it?</p>
<p style="text-align: left;"><span id="more-1374"></span></p>
<h3>Clicky Desktop Application</h3>
<p style="text-align: left;">So the first step is to make a nice desktop application out of my Clicky Spy page. Download Fluid.app from <a href="http://fluidapp.com/" target="_blank">their website</a> and install (OS X 10.5 upwards). Run Fluid &#8211; you will be prompted with a couple of questions around what web page you want to make an application. Enter the URL of the chosen site (this could be Clicky Spy, Twitter Search, GMail &#8211; whatever), a name for your app, where you want to save it (Applications folder probably) and what icon you want to use.</p>
<p><center><script type="text/javascript"><!--
google_ad_client = "pub-6415056921376217";
google_ad_channel = "in-ad-unit-hor";
google_ui_features = "rc:0";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "0066CC";
google_color_text = "";
google_color_url = "0066CC";

//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</center></p>
<p style="text-align: left;">Icon wise you have two options, use the favicon (which I used &#8211; but doesn&#8217;t scale well), or use a nice PNG file. Up to you.</p>
<p style="text-align: left;">Click &#8220;Create&#8221; and you&#8217;re done. Launch your newly created application. It doesn&#8217;t look much different to a browser huh?</p>
<h3><img class="aligncenter size-full wp-image-1380" title="twitter-search-fluid" src="http://www.reynoldsftw.com/wp-content/uploads/2009/09/twitter-search-fluid.png" alt="twitter-search-fluid" width="450" height="262" /></h3>
<h3>GreaseMonkey</h3>
<p>So next we need to create the script to infiltrate the &lt;TITLE&gt; HTML element, and extract the count from between the brackets. This is pretty easy &#8211; goto the script icon and choose &#8220;New Userscript&#8230;&#8221;:</p>
<p><img class="aligncenter size-full wp-image-1381" title="fluid-scripts" src="http://www.reynoldsftw.com/wp-content/uploads/2009/09/fluid-scripts.png" alt="fluid-scripts" width="267" height="175" />This will prompt you for a name for the script, and also open up a empty script for you to manipulate in your favourite code editor.</p>
<p>Finally, its time to enter some code. Here is the script I am using to extract the user count (ie &#8220;3&#8243;) from &#8220;(3) Blah Blah&#8221;:</p>
<pre class="brush: jscript;">
// ==UserScript==
// @name        LiveStats
// @namespace   http://fluidapp.com
// @description What does this do?
// @include     *
// @author      SteveReynolds
// ==/UserScript==

(function() {
if (!window.fluid) {
return;
}
function updateDockBadge() {
var badgeString = &quot;&quot;;
var title = document.title;

if (title &amp;&amp; title.length) {
var start = title.indexOf(&quot;(&quot;);
var end = title.indexOf(&quot;)&quot;);
if (start &gt; -1 &amp;&amp; end &gt; -1) {
start++;
badgeString = title.substring(start, end);
if (badgeString == &quot;0&quot;) {
badgeString = &quot;&quot;;
}
}
}

window.fluid.setDockBadge(badgeString);
}
setInterval(function(){updateDockBadge();}, 3000);
})();
</pre>
<p>Job Done! Just enable the script by clicking its name in the script menu, and reload all scripts. Sometimes this doesn&#8217;t work so you might need to restart the app.
<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.reynoldsftw.com%2F2009%2F09%2Fclicky-web-analytics-as-a-desktop-app%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.reynoldsftw.com%2F2009%2F09%2Fclicky-web-analytics-as-a-desktop-app%2F&amp;source=SteveReynolds&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
]]></content:encoded>
			<wfw:commentRss>http://www.reynoldsftw.com/2009/09/clicky-web-analytics-as-a-desktop-app/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Top 10 jQuery Plugins (according to reynoldsftw.com)</title>
		<link>http://www.reynoldsftw.com/2009/08/top-10-jquery-plugins-according-to-reynoldsftw-com/</link>
		<comments>http://www.reynoldsftw.com/2009/08/top-10-jquery-plugins-according-to-reynoldsftw-com/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 08:00:21 +0000</pubDate>
		<dc:creator>Steve Reynolds</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Chart]]></category>
		<category><![CDATA[Charts]]></category>
		<category><![CDATA[Graph]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Plugins]]></category>

		<guid isPermaLink="false">http://www.reynoldsftw.com/?p=1236</guid>
		<description><![CDATA[
			
				
			
		
So over the past 6 months I&#8217;ve taken a look at many jQuery plugins via this website. After some time I thought it would be interesting to see out of all of the plugins I&#8217;ve looked at, which ones are getting the most interest. Well the results are in:

Here&#8217;s that list:
1. Flot : http://code.google.com/p/flot/
2. Google [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.reynoldsftw.com%2F2009%2F08%2Ftop-10-jquery-plugins-according-to-reynoldsftw-com%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.reynoldsftw.com%2F2009%2F08%2Ftop-10-jquery-plugins-according-to-reynoldsftw-com%2F&amp;source=SteveReynolds&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>So over the past 6 months I&#8217;ve taken a look at many jQuery plugins via this website. After some time I thought it would be interesting to see out of all of the plugins I&#8217;ve looked at, which ones are getting the most interest. Well the results are in:</p>
<p><img class="aligncenter size-full wp-image-1238" title="jq-plugin-chart" src="http://www.reynoldsftw.com/wp-content/uploads/2009/08/jq-plugin-chart.png" alt="jq-plugin-chart" width="500" height="291" /></p>
<p><span id="more-1236"></span>Here&#8217;s that list:</p>
<p>1. Flot : <a href="http://code.google.com/p/flot/" target="_blank">http://code.google.com/p/flot/</a></p>
<div id="attachment_673" class="wp-caption aligncenter" style="width: 435px"><img class="size-full wp-image-673" title="flot" src="http://www.reynoldsftw.com/wp-content/uploads/2009/02/flot.png" alt="flot" width="425" height="86" /><p class="wp-caption-text">Flot</p></div>
<p>2. Google Charts : <a href="http://maxb.net/scripts/jgcharts/include/demo/" target="_blank">http://maxb.net/scripts/jgcharts/include/demo/</a></p>
<div id="attachment_578" class="wp-caption aligncenter" style="width: 324px"><a href="http://maxb.net/scripts/jgcharts/include/demo/"><img class="size-full wp-image-578" title="googlecharts" src="http://www.reynoldsftw.com/wp-content/uploads/2009/02/googlecharts.png" alt="Google Charts" width="314" height="130" /></a><p class="wp-caption-text">Google Charts</p></div>
<p>3. Sexy-Combo : <a href="http://vladimir-k.blogspot.com/2009/02/sexy-combo-jquery-plugin.html" target="_blank">http://vladimir-k.blogspot&#8230;jquery-plugin.html</a></p>
<div id="attachment_1135" class="wp-caption aligncenter" style="width: 167px"><img class="size-full wp-image-1135" title="sexy-combo" src="http://www.reynoldsftw.com/wp-content/uploads/2009/03/sexy-combo.png" alt="Sexy-Combo Plugin Preview" width="157" height="47" /><p class="wp-caption-text">Sexy-Combo Plugin Preview</p></div>
<p>4. Sparkline : <a href="http://omnipotent.net/jquery.sparkline/" target="_blank">http://omnipotent.net/jquery.sparkline/</a></p>
<div id="attachment_676" class="wp-caption aligncenter" style="width: 224px"><img class="size-full wp-image-676 " title="sparklines" src="http://www.reynoldsftw.com/wp-content/uploads/2009/02/sparklines.png" alt="Sparklines" width="214" height="62" /><p class="wp-caption-text">Sparklines</p></div>
<p>5. (mb)ToolTip : <a href="http://pupunzi.wordpress.com/2009/02/07/mbtooltip/" target="_blank">http://pupunzi.wordpress.com/&#8230;/mbtooltip/</a></p>
<div id="attachment_810" class="wp-caption aligncenter" style="width: 410px"><img class="size-full wp-image-810 " title="mbtooltip3" src="http://www.reynoldsftw.com/wp-content/uploads/2009/03/mbtooltip3.png" alt="(mb)ToolTip" width="400" height="80" /><p class="wp-caption-text">(mb)ToolTip</p></div>
<p><center><script type="text/javascript"><!--
google_ad_client = "pub-6415056921376217";
google_ad_channel = "in-ad-unit-hor";
google_ui_features = "rc:0";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "0066CC";
google_color_text = "";
google_color_url = "0066CC";

//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</center></p>
<p>6. jqchart : <a href="http://jsgt.org/lib/jquery/plugin/jqchart/sample/v003/test-use-gradient.html" target="_blank">http://jsgt.org/lib/jquery/&#8230;/test-use-gradient.html</a></p>
<div id="attachment_674" class="wp-caption aligncenter" style="width: 410px"><img class="size-full wp-image-674 " title="jqchart" src="http://www.reynoldsftw.com/wp-content/uploads/2009/02/jqchart.png" alt="jqchart" width="400" height="149" /><p class="wp-caption-text">jqchart</p></div>
<p>7. Raphaeljs : <a href="http://raphaeljs.com/" target="_blank">http://raphaeljs.com/</a></p>
<div id="attachment_862" class="wp-caption aligncenter" style="width: 410px"><img class="size-full wp-image-862" title="raphael" src="http://www.reynoldsftw.com/wp-content/uploads/2009/03/raphael.png" alt="raphael" width="400" height="80" /><p class="wp-caption-text">Raphaeljs</p></div>
<p style="text-align: left;">8. Smart Google Map: <a href="http://code.google.com/p/jquery-googlemap/" target="_blank">http://code.google.com/p/jquery-googlemap/</a></p>
<p>9. Alphanumeric : <a href="http://itgroup.com.ph/alphanumeric/" target="_blank">http://itgroup.com.ph/alphanumeric/</a></p>
<div id="attachment_219" class="wp-caption aligncenter" style="width: 398px"><img class="size-full wp-image-219" title="Alphanumeric" src="http://www.reynoldsftw.com/wp-content/uploads/2009/01/alphanumeric.png" alt="Alphanumeric" width="388" height="86" /><p class="wp-caption-text">Alphanumeric</p></div>
<p style="text-align: left;">10. Bluff : <a href="http://bluff.jcoglan.com/" target="_blank">http://bluff.jcoglan.com/</a></p>
<p style="text-align: left;">
<div id="attachment_861" class="wp-caption aligncenter" style="width: 410px"><img class="size-full wp-image-861" title="bluff" src="http://www.reynoldsftw.com/wp-content/uploads/2009/03/bluff.png" alt="Bluff" width="400" height="80" /><p class="wp-caption-text">Bluff</p></div>
<p>Admittedly, a couple of these are not jQuery plugins after all, but never-the-less, they&#8217;re doing pretty well.</p>
<h3>Observations</h3>
<ul>
<li>Alot of these are around charting or graphing.</li>
<li>Sexy-Combo is right up there, see <a href="http://www.reynoldsftw.com/2009/04/sexy-sells-i-have-the-stats-to-prove-it/" target="_self">this post</a> for more on that. Although this should be high up due to the nature of the popularity of that article around how <a href="http://www.reynoldsftw.com/2009/04/sexy-sells-i-have-the-stats-to-prove-it/" target="_self">&#8220;Sexy Sells&#8221;</a></li>
<li>Interestingly, the Top 10 articles where I reviewed the charting plugins isn&#8217;t way way up there in the stats Vs other Top 10s.</li>
<li>I hope the developers of these plugins appreciate the traffic I am driving to their sites <img src='http://www.reynoldsftw.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </li>
</ul>
<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.reynoldsftw.com%2F2009%2F08%2Ftop-10-jquery-plugins-according-to-reynoldsftw-com%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.reynoldsftw.com%2F2009%2F08%2Ftop-10-jquery-plugins-according-to-reynoldsftw-com%2F&amp;source=SteveReynolds&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
]]></content:encoded>
			<wfw:commentRss>http://www.reynoldsftw.com/2009/08/top-10-jquery-plugins-according-to-reynoldsftw-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript and DOM Load Time Tester with jQuery</title>
		<link>http://www.reynoldsftw.com/2009/08/javascript-jquery-and-dom-load-time-tester/</link>
		<comments>http://www.reynoldsftw.com/2009/08/javascript-jquery-and-dom-load-time-tester/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 08:24:15 +0000</pubDate>
		<dc:creator>Steve Reynolds</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Load]]></category>
		<category><![CDATA[Tester]]></category>
		<category><![CDATA[Timer]]></category>

		<guid isPermaLink="false">http://www.reynoldsftw.com/?p=1225</guid>
		<description><![CDATA[
			
				
			
		
So I have been trying to figure out a really simple, easy way to test the load times of my Javascript in the page, and have ended up creating a simple load time tester using jQuery called jQTester.
This assumes you are using jQuery, and are running using version 1.3.1 &#8211; however it should work on [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.reynoldsftw.com%2F2009%2F08%2Fjavascript-jquery-and-dom-load-time-tester%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.reynoldsftw.com%2F2009%2F08%2Fjavascript-jquery-and-dom-load-time-tester%2F&amp;source=SteveReynolds&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>So I have been trying to figure out a really simple, easy way to test the load times of my Javascript in the page, and have ended up creating a simple load time tester using jQuery called <a href="#jqtester">jQTester</a>.</p>
<div id="attachment_1226" class="wp-caption aligncenter" style="width: 392px"><img class="size-full wp-image-1226" title="jQTester" src="http://www.reynoldsftw.com/wp-content/uploads/2009/08/jQTester.png" alt="jQTester" width="382" height="150" /><p class="wp-caption-text">jQTester Displaying its results</p></div>
<p style="text-align: left;">This assumes you are using <a href="http://www.jquery.com" target="_blank">jQuery</a>, and are running using version 1.3.1 &#8211; however it should work on most versions as the jQuery I am using is pretty lightweight.</p>
<p style="text-align: left;">The concept is simple &#8211; you have 2 files called <em>start.js</em> and <em>end.js</em>. Place <em>start.js</em> at the top, just after your &lt;HEAD&gt; tag, and place <em>end.js</em> just before &lt;/body&gt;. Using javascript timers I am capturing the length of time between start.js loading, and the <a href="http://docs.jquery.com/Events/ready#fn" target="_blank">document.ready</a> jQuery function running (when, all javascript and DOM elements should be loaded and ready to use).</p>
<p style="text-align: left;"><span id="more-1225"></span></p>
<h3>Why place end.js before &lt;/body&gt; ?</h3>
<p>So, ideally you are placing your javascript calls at the end of the HTML document. Why? because javascript file downloads block parallel downloads in the browser. Browsers can only download 2 files per hostname at any one time, so by placing them in the &lt;HEAD&gt; you are in theory stopping anything else from loading within the page whilst all your javascript is being loaded. By placing them at the end of the HTML document, images etc have the chance to load first, so the perception for the user is faster load times.</p>
<p><center><script type="text/javascript"><!--
google_ad_client = "pub-6415056921376217";
google_ad_channel = "in-ad-unit-hor";
google_ui_features = "rc:0";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "0066CC";
google_color_text = "";
google_color_url = "0066CC";

//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</center></p>
<p>So the browser will load your HTML document top to bottom. Based on the assumption that no other javascript needs to load after &lt;/body&gt; is called, the best place to stop the timer is at that last point. That&#8217;s when the clock stops, and we assume we&#8217;re all loaded.</p>
<p><a name="jqtester"></a></p>
<h3>jQTester 0.1</h3>
<p>So I&#8217;m not really 100% sure if this is the right way to go about this, but anyway &#8211; I&#8217;ve packaged this up as &#8220;jQTester&#8221; and am attaching version 0.1 for your perusal. It would be good to get some feedback on how I can move forward with this, as I am keen to develop a tool or plugin that can sit within the page code, rather than being a browser add-on etc.</p>
<div id="attachment_86" class="wp-caption alignleft" style="width: 70px"><a href="http://www.reynoldsftw.com/wp-content/uploads/2009/08/jQTester-0.1.zip"><img class="size-full wp-image-86 " title="Download Icon" src="http://www.reynoldsftw.com/wp-content/uploads/2009/01/drop-box-icon.png" alt="jQTester 0.1" width="60" height="60" /></a><p class="wp-caption-text">Download jQTester 0.1</p></div>
<p><strong>Install instructions:</strong> Use jQuery, place start.js after the &lt;head&gt; tag and place end.js before the &lt;/body&gt; tag.</p>
<p>Add your comments below on ways to improve jQTester.
<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.reynoldsftw.com%2F2009%2F08%2Fjavascript-jquery-and-dom-load-time-tester%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.reynoldsftw.com%2F2009%2F08%2Fjavascript-jquery-and-dom-load-time-tester%2F&amp;source=SteveReynolds&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
]]></content:encoded>
			<wfw:commentRss>http://www.reynoldsftw.com/2009/08/javascript-jquery-and-dom-load-time-tester/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Improving Javascript Load Performance?</title>
		<link>http://www.reynoldsftw.com/2009/03/improving-javascript-load-performance/</link>
		<comments>http://www.reynoldsftw.com/2009/03/improving-javascript-load-performance/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 13:09:21 +0000</pubDate>
		<dc:creator>Steve Reynolds</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://www.reynoldsftw.com/?p=1104</guid>
		<description><![CDATA[
			
				
			
		
Had an interesting comment posted on my blog overnight which suggested the following: To place all javascript code at the end of your HTML page, rather than in your &#60;HEAD&#62; tag to improve performance. On face value this doesn&#8217;t really tell me much, so hopefully within this article I can clarify a few approaches that [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.reynoldsftw.com%2F2009%2F03%2Fimproving-javascript-load-performance%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.reynoldsftw.com%2F2009%2F03%2Fimproving-javascript-load-performance%2F&amp;source=SteveReynolds&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>Had an interesting comment posted on my blog overnight which suggested the following: <em><strong>To place all javascript code at the end of your HTML page, rather than in your &lt;HEAD&gt; tag to improve performance</strong></em>. On face value this doesn&#8217;t really tell me much, so hopefully within this article I can clarify a few approaches that can apparently improve <strong><em>page load</em></strong> performance.</p>
<h3>Don&#8217;t write inline code if possible</h3>
<p>The first approach is less obvious but can have a detrimental affect to page loading times. By writing javascript code inline, ie within the HTML document itself, the browser downloads and reads that chunk every time. By hosting your script in an external file, local or outside of your domain, the browser can better cache this, enabling faster read access, as well as allowing the browser to ignore it if necessary and continue downloading other assets that are new.</p>
<p><span id="more-1104"></span></p>
<h3>Placing scripts at the bottom of the HTML document</h3>
<p>It turns out its actually better to place scripts at the bottom of the HTML document. But why is this? It appears that the <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html#sec8.1.4" target="_blank">HTTP 1.1 specification</a> is the culprit. According to the document, whilst a browser can download only 2 resources from any 1 hostname at one time (2 images for example), when downloading scripts, the browser cannot download anything else at all.</p>
<p>One immediate work around that you may think is possible is to host the content externally, say for example referencing the jQuery library on the Google code repository. The trouble is, even if the script is on an external hostname, the browser still cannot download anything else when it accesses it. Whilst this approach is still good from a bandwidth and caching perspective, it doesn&#8217;t really help our page load times if that document hasn&#8217;t previously been cached.</p>
<p>Anyway, therefore, there is in theory a period of time where the browser is downloading your scripts one at a time, and doing nothing else. Depending on the size of your scripts this could be quite a significant lag. The answer to this is to place the scripts at the bottom of the HTML document.</p>
<p>So by moving your scripts to the bottom it therefore enables the browser to deal with the HTML document and its remaining assets in as faster time as possible. This obviously has its drawbacks, especially if you are writing your HTML document with javascript &#8211; however you can get around this.</p>
<p>Let the document download as is, and use a library like jQuery to manage the document manipulation with its $(document).ready() function. Place your code within the function to manipulate your HTML document before it is presented to the user.</p>
<p><center><script type="text/javascript"><!--
google_ad_client = "pub-6415056921376217";
google_ad_channel = "in-ad-unit-hor";
google_ui_features = "rc:0";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "0066CC";
google_color_text = "";
google_color_url = "0066CC";

//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</center></p>
<h3>Why aren&#8217;t people doing it?</h3>
<p>This is where this all gets confusing for me&#8230; Alot of the big guys just aren&#8217;t doing it. For example, the <a href="http://jquery.com/" target="_blank">jQuery official website</a> has everything in their &lt;HEAD&gt; tag:</p>
<pre class="brush: jscript;">&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js&quot;&gt;&lt;/script&gt;

&lt;script type=&quot;text/javascript&quot; src=&quot;http://static.jquery.com/files/rocker/scripts/custom.js&quot;&gt;&lt;/script&gt;</pre>
<p>I would have thought that being so focussed on performance, they would have done something like this, so why aren&#8217;t they? Perhaps the code in their custom.js has to be in the &lt;HEAD&gt; for whatever reason, or maybe I am misunderstanding the benefits to putting your scripts at the bottom of the HTML document?</p>
<h3>Tools to help you learn&#8230;</h3>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<thead></thead>
<tbody>
<tr>
<td width="33%" align="center" valign="top">
<div id="attachment_613" class="wp-caption aligncenter" style="width: 111px"><a href="http://www.amazon.com/gp/product/1847196705?ie=UTF8&amp;tag=stereyblo-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1847196705"><img class="size-full wp-image-613" title="jquery13" src="http://www.reynoldsftw.com/wp-content/uploads/2009/02/jquery13.jpg" alt="Learning jQuery 1.3" width="101" height="132" /></a><p class="wp-caption-text">Learning jQuery 1.3</p></div>
<p><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=stereyblo-20&amp;l=as2&amp;o=1&amp;a=1847196705" border="0" alt="" width="1" height="1" /></td>
<td width="33%" align="center" valign="top">
<div id="attachment_770" class="wp-caption aligncenter" style="width: 111px"><a href="http://www.amazon.com/gp/product/B00154JDAI?ie=UTF8&amp;tag=stereyblo-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B00154JDAI"><img class="size-full wp-image-770" title="kindle" src="http://www.reynoldsftw.com/wp-content/uploads/2009/03/kindle.jpg" alt="Amazon Kindle 2" width="101" height="132" /></a><p class="wp-caption-text">Amazon Kindle 2</p></div>
<p><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=stereyblo-20&amp;l=as2&amp;o=1&amp;a=B00154JDAI" border="0" alt="" width="1" height="1" /></td>
<td width="33%" align="center" valign="top">
<div id="attachment_612" class="wp-caption aligncenter" style="width: 111px"><a href="http://www.amazon.com/gp/product/1847195121?ie=UTF8&amp;tag=stereyblo-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1847195121"><img class="size-full wp-image-612" title="jquery-ui" src="http://www.reynoldsftw.com/wp-content/uploads/2009/02/jquery-ui.jpg" alt="jQuery UI 1.6" width="101" height="132" /></a><p class="wp-caption-text">jQuery UI 1.6</p></div>
<p><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=stereyblo-20&amp;l=as2&amp;o=1&amp;a=1847195121" border="0" alt="" width="1" height="1" /></td>
</tr>
</tbody>
</table>
<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.reynoldsftw.com%2F2009%2F03%2Fimproving-javascript-load-performance%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.reynoldsftw.com%2F2009%2F03%2Fimproving-javascript-load-performance%2F&amp;source=SteveReynolds&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
]]></content:encoded>
			<wfw:commentRss>http://www.reynoldsftw.com/2009/03/improving-javascript-load-performance/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Top 10 Developer Top 10s</title>
		<link>http://www.reynoldsftw.com/2009/03/top-10-developer-top-10s/</link>
		<comments>http://www.reynoldsftw.com/2009/03/top-10-developer-top-10s/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 10:22:46 +0000</pubDate>
		<dc:creator>Steve Reynolds</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[MooTools]]></category>
		<category><![CDATA[UI]]></category>

		<guid isPermaLink="false">http://www.reynoldsftw.com/?p=983</guid>
		<description><![CDATA[
			
				
			
		

Okay, so these aren&#8217;t all strictly Top 10 articles, but they&#8217;re definitely all articles that have either helped me implement cool features into my site, or spurred my brain into motion. We&#8217;ve got UI, icons, tutorials, frameworks &#8211; some cracking stuff, take it away!
1. 10 Smart Javascript Techniques to Improve Your UI

Some great techniques here on [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.reynoldsftw.com%2F2009%2F03%2Ftop-10-developer-top-10s%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.reynoldsftw.com%2F2009%2F03%2Ftop-10-developer-top-10s%2F&amp;source=SteveReynolds&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<div style="float: left; margin-right: 5px;"><script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div>
<p>Okay, so these aren&#8217;t all strictly Top 10 articles, but they&#8217;re definitely all articles that have either helped me implement cool features into my site, or spurred my brain into motion. We&#8217;ve got UI, icons, tutorials, frameworks &#8211; some cracking stuff, take it away!</p>
<h3><a href="http://nettuts.com/javascript-ajax/10-rare-but-clever-javascript-techniques/" target="_blank">1. 10 Smart Javascript Techniques to Improve Your UI</a></h3>
<p><a href="http://nettuts.com/javascript-ajax/10-rare-but-clever-javascript-techniques/" target="_blank"><img class="aligncenter size-full wp-image-984" title="top-10-1" src="http://www.reynoldsftw.com/wp-content/uploads/2009/03/top-10-1.png" alt="top-10-1" width="450" height="120" /></a></p>
<p>Some great techniques here <a href="http://nettuts.com/javascript-ajax/10-rare-but-clever-javascript-techniques/" target="_blank">on nettus</a>, from slide-down menus to the likes of the hover over effects, slide down menus and image manipulation (as above). Worth a look!</p>
<h3><a href="http://woork.blogspot.com/2008/09/10-beautiful-icons-set-for-web_18.html" target="_blank">2. 10 Beautiful icons set for web developers and designers</a></h3>
<p><a href="http://woork.blogspot.com/2008/09/10-beautiful-icons-set-for-web_18.html" target="_blank"><img class="aligncenter size-full wp-image-985" title="top-10-2" src="http://www.reynoldsftw.com/wp-content/uploads/2009/03/top-10-2.png" alt="top-10-2" width="377" height="116" /></a></p>
<p><span id="more-983"></span></p>
<p>Some great icon sets <a href="http://woork.blogspot.com/2008/09/10-beautiful-icons-set-for-web_18.html" target="_blank">here from woork</a>. I&#8217;ve used this article over and over for various projects, even in powerpoint presentations. An awesome collection of icons that&#8217;ll spice up any application.</p>
<h3><a href="http://sixrevisions.com/web_design/30_beautifully_blue_web_designs/" target="_blank">3. 30 Beautifully Blue Web Designs</a></h3>
<p><a href="http://sixrevisions.com/web_design/30_beautifully_blue_web_designs/" target="_blank"><img class="aligncenter size-full wp-image-986" title="top-10-3" src="http://www.reynoldsftw.com/wp-content/uploads/2009/03/top-10-3.png" alt="top-10-3" width="436" height="129" /></a></p>
<p>As you guys can tell, I like Blue &#8211; and <a href="http://sixrevisions.com/web_design/30_beautifully_blue_web_designs/" target="_blank">this article from Six Revisions</a> was a great inspiration to me for various projects. There is something about a blue UI that makes me feel good inside, and this article is a great collection of some solid designs around that theme&#8230;</p>
<h3><a href="http://nettuts.com/web-roundups/20-excellent-ajax-effects-you-should-know/" target="_blank">4. 20 Excellent AJAX Effects You Should Know</a></h3>
<p style="text-align: center;"><a href="http://nettuts.com/web-roundups/20-excellent-ajax-effects-you-should-know/" target="_blank"><img class="size-full wp-image-987 aligncenter" title="top-10-4" src="http://www.reynoldsftw.com/wp-content/uploads/2009/03/top-10-4.png" alt="top-10-4" width="340" height="94" /></a></p>
<p><a href="http://nettuts.com/web-roundups/20-excellent-ajax-effects-you-should-know/" target="_blank">Nettus strikes again</a> with this great collection of Ajax effects. IM applications, Live Validation, Email applications, heat maps &#8211; some really cool (and some crazy) implementations.</p>
<h3><a href="http://www.smashingapps.com/2008/09/26/17-online-free-web-based-applications-that-you-probably-love-to-use.html" target="_blank">5. 17 Online Free Web Based Applications</a></h3>
<p><a href="http://www.smashingapps.com/2008/09/26/17-online-free-web-based-applications-that-you-probably-love-to-use.html" target="_blank"><img class="aligncenter size-full wp-image-988" title="zapproved" src="http://www.reynoldsftw.com/wp-content/uploads/2009/03/zapproved.jpeg" alt="zapproved" width="500" height="128" /></a></p>
<p style="text-align: left;"><a href="http://www.smashingapps.com/2008/09/26/17-online-free-web-based-applications-that-you-probably-love-to-use.html" target="_blank">SmashingApps.com</a> provide a good collection of online applications that will help any development lifecycle. Concentrating around project management mostly around tasks and scheduling, but useful none the less (and free).</p>
<p><center><script type="text/javascript"><!--
google_ad_client = "pub-6415056921376217";
google_ad_channel = "in-ad-unit-sq";
google_ui_features = "rc:0";
google_ad_width = 336;
google_ad_height = 280;
google_ad_format = "336x280_as";
google_ad_type = "text_image";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "0066CC";
google_color_text = "";
google_color_url = "0066CC";

//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</center></p>
<h3><a href="http://www.smashingapps.com/2008/10/20/27-best-places-you-should-visit-to-get-incredible-web-design-inspiration.html" target="_blank">6. 27 Best Places You Should Visit To Get Incredible Web Design Inspiration!</a></h3>
<p><a href="http://www.smashingapps.com/2008/10/20/27-best-places-you-should-visit-to-get-incredible-web-design-inspiration.html" target="_blank"><img class="aligncenter size-full wp-image-989" title="top-10-6" src="http://www.reynoldsftw.com/wp-content/uploads/2009/03/top-10-6.png" alt="top-10-6" width="583" height="111" /></a></p>
<p><a href="http://www.smashingapps.com/2008/10/20/27-best-places-you-should-visit-to-get-incredible-web-design-inspiration.html" target="_blank">SmashingApps.com</a> strikes again with this article focussing purely on how you can get inspiration. Some really cool showcase websites featured such as <a href="http://www.designsnack.com/" target="_blank">http://www.designsnack.com/</a> and <a href="http://bestwebgallery.com/" target="_blank">http://bestwebgallery.com/</a></p>
<h3><a href="http://sixrevisions.com/resources/40-beautiful-free-icon-sets/" target="_blank">7. 40 Beautiful Free Icon Sets</a></h3>
<p><a href="http://sixrevisions.com/resources/40-beautiful-free-icon-sets/" target="_blank"><img class="aligncenter size-full wp-image-990" title="clip" src="http://www.reynoldsftw.com/wp-content/uploads/2009/03/clip.png" alt="clip" width="450" height="139" /></a></p>
<p>Another cool icon set article from <a href="http://sixrevisions.com/resources/40-beautiful-free-icon-sets/" target="_blank">Six Revisions</a> this time. Some great examples here, I love the paperclip above <a href="http://cgink.deviantart.com/art/Paper-Clip-86613348" target="_blank">from cgink</a>, just for being plain and simple &#8211; a paperclip.</p>
<h3><a href="http://www.smashingmagazine.com/2009/03/08/70-new-useful-ajax-and-javascript-techniques/" target="_blank">8. 70 New, Useful AJAX And JavaScript Techniques</a></h3>
<p style="text-align: center;"><a href="http://www.smashingmagazine.com/2009/03/08/70-new-useful-ajax-and-javascript-techniques/" target="_blank"><img class="aligncenter size-full wp-image-992" title="ajax-js-techniques32jpg" src="http://www.reynoldsftw.com/wp-content/uploads/2009/03/ajax-js-techniques32jpg.jpeg" alt="ajax-js-techniques32jpg" width="400" height="214" /></a></p>
<p style="text-align: left;"><a href="http://www.smashingmagazine.com/2009/03/08/70-new-useful-ajax-and-javascript-techniques/" target="_blank">Smashing Magazine</a> tear it up with this amazing collection of ajax implementations. There are so many crazy ideas here it really gets the brain cogs moving. This article covers all sorts of things from menus, tooltips, calendar functionality, form validation methods &#8211; the lot. I dare you to not find inspiration form this article&#8230; <strong>I dare you</strong>.</p>
<h3><a href="http://www.noupe.com/tutorial/51-best-of-jquery-tutorials-and-examples.html" target="_blank">9. 51+ Best of jQuery Tutorials and Examples</a></h3>
<p><a href="http://www.noupe.com/tutorial/51-best-of-jquery-tutorials-and-examples.html" target="_blank"><img class="aligncenter size-full wp-image-993" title="top-10-9" src="http://www.reynoldsftw.com/wp-content/uploads/2009/03/top-10-9.png" alt="top-10-9" width="416" height="82" /></a></p>
<p>If you&#8217;re learning jQuery, look no further for a quick win article on the top tutorials around than <a href="http://www.noupe.com/tutorial/51-best-of-jquery-tutorials-and-examples.html" target="_blank">at noupe</a>. It&#8217;s a little disorganized but you can find some good gems in the mix here (if slightly outdated).</p>
<h3><a href="http://woork.blogspot.com/2009/01/10-beautiful-web-ui-libraries.html" target="_blank">10. 10 Beautiful Web UI libraries</a></h3>
<p><a href="http://woork.blogspot.com/2009/01/10-beautiful-web-ui-libraries.html" target="_blank"><img class="aligncenter size-full wp-image-994" title="top-10-10" src="http://www.reynoldsftw.com/wp-content/uploads/2009/03/top-10-10.png" alt="top-10-10" width="332" height="187" /></a></p>
<p>Last up is a great collection of UI frameworks/libraries <a href="http://woork.blogspot.com/2009/01/10-beautiful-web-ui-libraries.html" target="_blank">from woork</a>. Most are built on top javascript or in the case of <a href="http://mochaui.com/" target="_blank">MochaUI</a> (above) on top of MooTools. You have to check out some of the demos on these libraries coz they will probably blow your mind!! &#8230; Yeah, that <span style="text-decoration: underline;">just</span> happened!</p>
<h3>Tools to help you learn&#8230;</h3>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<thead></thead>
<tbody>
<tr>
<td width="33%" align="center" valign="top">
<div id="attachment_613" class="wp-caption aligncenter" style="width: 111px"><a href="http://www.amazon.com/gp/product/1847196705?ie=UTF8&amp;tag=stereyblo-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1847196705"><img class="size-full wp-image-613" title="jquery13" src="http://www.reynoldsftw.com/wp-content/uploads/2009/02/jquery13.jpg" alt="Learning jQuery 1.3" width="101" height="132" /></a><p class="wp-caption-text">Learning jQuery 1.3</p></div>
<p><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=stereyblo-20&amp;l=as2&amp;o=1&amp;a=1847196705" border="0" alt="" width="1" height="1" /></td>
<td width="33%" align="center" valign="top">
<div id="attachment_966" class="wp-caption aligncenter" style="width: 111px"><a href="http://www.amazon.com/gp/product/0672329166?ie=UTF8&amp;tag=stereyblo-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0672329166"><img class="size-full wp-image-966" title="phpmysql" src="http://www.reynoldsftw.com/wp-content/uploads/2009/03/phpmysql.jpeg" alt="PHP MySQL Development" width="101" height="132" /></a><p class="wp-caption-text">PHP MySQL Development</p></div>
<p><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=stereyblo-20&amp;l=as2&amp;o=1&amp;a=0672329166" border="0" alt="" width="1" height="1" /></td>
<td width="33%" align="center" valign="top">
<div id="attachment_612" class="wp-caption aligncenter" style="width: 111px"><a href="http://www.amazon.com/gp/product/1847195121?ie=UTF8&amp;tag=stereyblo-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1847195121"><img class="size-full wp-image-612" title="jquery-ui" src="http://www.reynoldsftw.com/wp-content/uploads/2009/02/jquery-ui.jpg" alt="jQuery UI 1.6" width="101" height="132" /></a><p class="wp-caption-text">jQuery UI 1.6</p></div>
<p><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=stereyblo-20&amp;l=as2&amp;o=1&amp;a=1847195121" border="0" alt="" width="1" height="1" /></td>
</tr>
</tbody>
</table>
<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.reynoldsftw.com%2F2009%2F03%2Ftop-10-developer-top-10s%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.reynoldsftw.com%2F2009%2F03%2Ftop-10-developer-top-10s%2F&amp;source=SteveReynolds&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
]]></content:encoded>
			<wfw:commentRss>http://www.reynoldsftw.com/2009/03/top-10-developer-top-10s/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>5 Javascript Chart Alternatives</title>
		<link>http://www.reynoldsftw.com/2009/03/javascript-chart-alternatives/</link>
		<comments>http://www.reynoldsftw.com/2009/03/javascript-chart-alternatives/#comments</comments>
		<pubDate>Sat, 07 Mar 2009 10:15:39 +0000</pubDate>
		<dc:creator>Steve Reynolds</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Chart]]></category>
		<category><![CDATA[Graph]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.reynoldsftw.com/?p=859</guid>
		<description><![CDATA[
			
				
			
		
Last week I did a review of 6 jQuery plugins that were great for implementing charts. Since then, I&#8217;ve had the opportunity to work with a couple more alternatives that are outside of the jQuery realm, and arguably look like they could be real contenders for removing Flash&#8217;s dominance in this area, so let&#8217;s check [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.reynoldsftw.com%2F2009%2F03%2Fjavascript-chart-alternatives%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.reynoldsftw.com%2F2009%2F03%2Fjavascript-chart-alternatives%2F&amp;source=SteveReynolds&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>Last week I did a review of <a href="http://www.reynoldsftw.com/2009/02/6-jquery-chart-plugins-reviewed/">6 jQuery plugins</a> that were great for implementing charts. Since then, I&#8217;ve had the opportunity to work with a couple more alternatives that are outside of the jQuery realm, and arguably look like they could be real contenders for removing Flash&#8217;s dominance in this area, so let&#8217;s check them out:</p>
<h3>1) Emprise Javascript Charts</h3>
<p><a href="http://www.ejschart.com/" target="_blank"><img class="aligncenter size-full wp-image-860" title="emprise" src="http://www.reynoldsftw.com/wp-content/uploads/2009/03/emprise.png" alt="emprise" width="400" height="80" /></a></p>
<p><strong>Chart Types:</strong> Line, Bar, Pie, Function, Area, Scatter, Trend, Analogue Gauge, Candlestick, Floating Bars, Stacked Bars.</p>
<p><a href="http://www.ejschart.com/" target="_blank">Emprise</a> is a really great pure javascript solution to charting. Features include zoom, interactive charts, stackable, as well as having ajax capabilites built right in. Out of all the charting jQuery and Javascript alternatives to Flash that I have seen this is by far the most advanced. But alas, with quality comes a price. Emprise is free for personal use (with restrictions) and scales up to a $1000 license for unlimited use.</p>
<p><span id="more-859"></span></p>
<h3>2) Bluff Graphs</h3>
<p><a href="http://bluff.jcoglan.com/" target="_blank"><img class="aligncenter size-full wp-image-861" title="bluff" src="http://www.reynoldsftw.com/wp-content/uploads/2009/03/bluff.png" alt="bluff" width="400" height="80" /></a></p>
<p><strong>Chart Types: </strong>Accumulator, Area, Bar, Line, Mini Bar, Mini Pie, Mini Sidebar, Pie, Net, Sidebar, Spider, Stacked</p>
<p>Back when <a href="http://bluff.jcoglan.com/" target="_blank">Bluff</a> was released I was extremely impressed by the ease of implementation and great built in options to make charts on any site a quick reality. Bluff also comes with a number of pre-defined themes for your charts that you can use &#8220;out of the box&#8221; and they look pretty darn good. I&#8217;ve used Bluff on many occasions to drive stats engines, and it&#8217;s never failed me.</p>
<p>Implementation wise <a href="http://bluff.jcoglan.com/api.html" target="_blank">you have two choices</a>, feed the data into javascript variables, or tell the class to read from an HTML table of data. Both work extremely well.</p>
<h3>3) Raphaël&#8217;s Javascript Library</h3>
<p><a href="http://raphaeljs.com/" target="_blank"><img class="aligncenter size-full wp-image-862" title="raphael" src="http://www.reynoldsftw.com/wp-content/uploads/2009/03/raphael.png" alt="raphael" width="400" height="80" /></a></p>
<p><strong>Chart Types</strong>: Your imagination.</p>
<p>I was equally impressed by <a href="http://raphaeljs.com/" target="_blank">Raphaël&#8217;s Javascript Library</a> when I was introduced to it last week. The library used SVG and VML to create stunning animated charts and pretty much anything else you can think of.</p>
<p><a href="http://raphaeljs.com/analytics.html" target="_blank"><img class="aligncenter size-full wp-image-863" title="picture-6" src="http://www.reynoldsftw.com/wp-content/uploads/2009/03/picture-6.png" alt="picture-6" width="400" height="113" /></a></p>
<p>There are some stunning demonstrations on display as to the power of this library, interactive charts working just like Google Analytics Flash alternatives for example. The library isn&#8217;t built predominantly for charting applications, so you need to put some work in to create your charts so be warned. This out of any shows the most promise with where javascript and vector graphics are going in the near future.</p>
<h3>4) JSChart</h3>
<p><a href="http://www.jscharts.com/" target="_blank"><img class="aligncenter size-full wp-image-864" title="jschart" src="http://www.reynoldsftw.com/wp-content/uploads/2009/03/jschart.png" alt="jschart" width="400" height="80" /></a></p>
<p><strong>Chart Types:</strong> Bar, Line or Pie</p>
<p><a href="http://www.jscharts.com/" target="_blank">JSChart</a> is another pretty decent javascript alternative to flat charting. The results are actually very nice to look at, and the developers promise a very simple implementation. Data sources can either come from javascript arrays or a valid XML file. The only other things you need to do are tell the script which chart type to draw, and tell it where to draw it. Pretty good stuff for a quick win.</p>
<p><center><script type="text/javascript"><!--
google_ad_client = "pub-6415056921376217";
google_ad_channel = "in-ad-unit-hor";
google_ui_features = "rc:0";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "0066CC";
google_color_text = "";
google_color_url = "0066CC";

//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</center></p>
<h3>5) Graph-It</h3>
<p><a href="http://javascriptkit.com/script/script2/graphit.shtml" target="_blank"><img class="aligncenter size-full wp-image-865" title="graphit" src="http://www.reynoldsftw.com/wp-content/uploads/2009/03/graphit.png" alt="graphit" width="235" height="75" /></a></p>
<p><strong>Chart Types:</strong> Mini-Bar</p>
<p>I only mention <a href="http://javascriptkit.com/script/script2/graphit.shtml" target="_blank">Graph-It</a> for one reason, its ability to create mini bar graphs in a similar vein to the sparklines plugin I discussed last week. It doesn&#8217;t look that great admittedly, but you can fix that yourself.</p>
<h3>Conclusion</h3>
<p>One of the great things I&#8217;ve learned with this exercise is that there are some great viable javascript alternatives out there and that progress is happening all around us. I am really starting to question how long Flash&#8217;s dominance in this area will last, based on the kind of demos we are seeing from Raphaël it looks like their days are numbered. Some awesome work here, and look forward to seeing more!</p>
<h3>Tools to help you learn&#8230;</h3>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<thead></thead>
<tbody>
<tr>
<td width="33%" align="center" valign="top">
<div id="attachment_613" class="wp-caption aligncenter" style="width: 111px"><a href="http://www.amazon.com/gp/product/1847196705?ie=UTF8&amp;tag=stereyblo-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1847196705"><img class="size-full wp-image-613" title="jquery13" src="http://www.reynoldsftw.com/wp-content/uploads/2009/02/jquery13.jpg" alt="Learning jQuery 1.3" width="101" height="132" /></a><p class="wp-caption-text">Learning jQuery 1.3</p></div>
<p><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=stereyblo-20&amp;l=as2&amp;o=1&amp;a=1847196705" border="0" alt="" width="1" height="1" /></td>
<td width="33%" align="center" valign="top">
<div id="attachment_770" class="wp-caption aligncenter" style="width: 111px"><a href="http://www.amazon.com/gp/product/B00154JDAI?ie=UTF8&amp;tag=stereyblo-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B00154JDAI"><img class="size-full wp-image-770" title="kindle" src="http://www.reynoldsftw.com/wp-content/uploads/2009/03/kindle.jpg" alt="Amazon Kindle 2" width="101" height="132" /></a><p class="wp-caption-text">Amazon Kindle 2</p></div>
<p><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=stereyblo-20&amp;l=as2&amp;o=1&amp;a=B00154JDAI" border="0" alt="" width="1" height="1" /></td>
<td width="33%" align="center" valign="top">
<div id="attachment_612" class="wp-caption aligncenter" style="width: 111px"><a href="http://www.amazon.com/gp/product/1847195121?ie=UTF8&amp;tag=stereyblo-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1847195121"><img class="size-full wp-image-612" title="jquery-ui" src="http://www.reynoldsftw.com/wp-content/uploads/2009/02/jquery-ui.jpg" alt="jQuery UI 1.6" width="101" height="132" /></a><p class="wp-caption-text">jQuery UI 1.6</p></div>
<p><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=stereyblo-20&amp;l=as2&amp;o=1&amp;a=1847195121" border="0" alt="" width="1" height="1" /></td>
</tr>
</tbody>
</table>
<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.reynoldsftw.com%2F2009%2F03%2Fjavascript-chart-alternatives%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.reynoldsftw.com%2F2009%2F03%2Fjavascript-chart-alternatives%2F&amp;source=SteveReynolds&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
]]></content:encoded>
			<wfw:commentRss>http://www.reynoldsftw.com/2009/03/javascript-chart-alternatives/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Reformat URLs with Javascript and Regular Expressions</title>
		<link>http://www.reynoldsftw.com/2009/03/reformat-urls-with-javascript-and-regular-expressions/</link>
		<comments>http://www.reynoldsftw.com/2009/03/reformat-urls-with-javascript-and-regular-expressions/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 12:52:47 +0000</pubDate>
		<dc:creator>Steve Reynolds</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[RegExp]]></category>
		<category><![CDATA[Regular Expressions]]></category>

		<guid isPermaLink="false">http://www.reynoldsftw.com/?p=839</guid>
		<description><![CDATA[
			
				
			
		
As part of the Chatterbloc project we had a requirement to do a couple of things:

Reformat www. links with http://www.
Replace http:// strings with an HTML A link equivalent

Surprisingly I found it pretty hard to find a hard and fast solution for this that had already been done, so I either wasn&#8217;t looking properly, or it [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.reynoldsftw.com%2F2009%2F03%2Freformat-urls-with-javascript-and-regular-expressions%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.reynoldsftw.com%2F2009%2F03%2Freformat-urls-with-javascript-and-regular-expressions%2F&amp;source=SteveReynolds&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>As part of the <a href="http://www.chatterbloc.com" target="_blank">Chatterbloc project</a> we had a requirement to do a couple of things:</p>
<ol>
<li>Reformat www. links with http://www.</li>
<li>Replace http:// strings with an HTML A link equivalent</li>
</ol>
<p>Surprisingly I found it pretty hard to find a hard and fast solution for this that had already been done, so I either wasn&#8217;t looking properly, or it doesn&#8217;t exist. Anyway, I created two functions for this piece of work, I&#8217;ll show you those, and also how to use them.</p>
<p><span id="more-839"></span></p>
<h3>Convert www to http://www</h3>
<p>So my first problem was to change <em>www.google.com</em> to <em>http://www.google.com</em>. I came up with the solution below as a function:</p>
<pre class="brush: jscript;">function replacewww(text) {

var start = (text.indexOf(&quot;www&quot;))-7;
var match = text.substr(start,7);
if(match != &quot;http://&quot; &amp;&amp; match != &quot;ttps://&quot;)
{
text = text.replace(&quot;www&quot;, &quot;http://www&quot;);
}

return text;
}</pre>
<p>This is quite a basic string manipulation &#8211; literally looking for an index of www in my text string, and taking out the match -7 characters. That will tell me whether there is <strong>http://</strong> or <strong>https://</strong> in front of the <strong>www</strong>. If there isn&#8217;t, the function replaces the www with http://. What this function doesn&#8217;t do is know whether it should be http:// or https://, it assumes http:// is the more likely candidate.</p>
<p><center><script type="text/javascript"><!--
google_ad_client = "pub-6415056921376217";
google_ad_channel = "in-ad-unit-hor";
google_ui_features = "rc:0";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "0066CC";
google_color_text = "";
google_color_url = "0066CC";

//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</center></p>
<h3>Convert links to HTML A HREFs</h3>
<p>The next part is where I needed a regular expression to hunt down the start and end of a URL, and replace it with the HTML equivalent, ie</p>
<pre class="brush: xml;">&lt;a href=&quot;http://www.google.com&quot;&gt;http://www.google.com&lt;/a&gt;</pre>
<p>The reason why I used a regular expression was that it was increasingly difficult to find the end of a url using string manipulation, it was never guaranteed (you could argue the same with regular expressions), however I found that I had much more success with using a regular expression match to make it happen:</p>
<pre class="brush: jscript;">function replaceURLWithHTMLLinks(text) {
var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&amp;@#\/%?=~_|!:,.;]*[-A-Z0-9+&amp;@#\/%=~_|])/ig;
return text.replace(exp,&quot;&lt;a href='$1' target='_blank'&gt;$1&lt;/a&gt;&quot;);
}</pre>
<p>This function simply does a string replace based on a regular expression match. The $1 part is obviously the matched element, ie the URL which is placed where necessary within the HTML tags.</p>
<h3>Making it happen</h3>
<p>So, the reason why I separated these two functions was because I would actually not always require both of them at the same time, so it made sense in my implementation to keep them as two. You could however, push them all into one function for ease of use.</p>
<p>Anyway, I&#8217;m sure its obvious on how to make this work, however I&#8217;ll show you so it&#8217;s quite clear.</p>
<pre class="brush: jscript;">var newHTML;
var stringInput = &quot;Check out this link www.google.com&quot;;

newHTML = replacewww(stringInput);
newHTML = replaceURLWithHTMLLinks(newHTML);

document.write(newHTML);
}</pre>
<h3>Conclusion</h3>
<p>I hope you found this basic tutorial helpful&#8230; As I like to mention &#8211; I&#8217;m here to help the common man/woman, more than the über nerd, so I hope this article was a nice fit for what you needed. Look forward to hearing from you as always&#8230;</p>
<h3>Tools to help you learn&#8230;</h3>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<thead></thead>
<tbody>
<tr>
<td width="33%" align="center" valign="top">
<div id="attachment_613" class="wp-caption aligncenter" style="width: 111px"><a href="http://www.amazon.com/gp/product/1847196705?ie=UTF8&amp;tag=stereyblo-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1847196705"><img class="size-full wp-image-613" title="jquery13" src="http://www.reynoldsftw.com/wp-content/uploads/2009/02/jquery13.jpg" alt="Learning jQuery 1.3" width="101" height="132" /></a><p class="wp-caption-text">Learning jQuery 1.3</p></div>
<p><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=stereyblo-20&amp;l=as2&amp;o=1&amp;a=1847196705" border="0" alt="" width="1" height="1" /></td>
<td width="33%" align="center" valign="top">
<div id="attachment_770" class="wp-caption aligncenter" style="width: 111px"><a href="http://www.amazon.com/gp/product/B00154JDAI?ie=UTF8&amp;tag=stereyblo-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B00154JDAI"><img class="size-full wp-image-770" title="kindle" src="http://www.reynoldsftw.com/wp-content/uploads/2009/03/kindle.jpg" alt="Amazon Kindle 2" width="101" height="132" /></a><p class="wp-caption-text">Amazon Kindle 2</p></div>
<p><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=stereyblo-20&amp;l=as2&amp;o=1&amp;a=B00154JDAI" border="0" alt="" width="1" height="1" /></td>
<td width="33%" align="center" valign="top">
<div id="attachment_612" class="wp-caption aligncenter" style="width: 111px"><a href="http://www.amazon.com/gp/product/1847195121?ie=UTF8&amp;tag=stereyblo-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1847195121"><img class="size-full wp-image-612" title="jquery-ui" src="http://www.reynoldsftw.com/wp-content/uploads/2009/02/jquery-ui.jpg" alt="jQuery UI 1.6" width="101" height="132" /></a><p class="wp-caption-text">jQuery UI 1.6</p></div>
<p><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=stereyblo-20&amp;l=as2&amp;o=1&amp;a=1847195121" border="0" alt="" width="1" height="1" /></td>
</tr>
</tbody>
</table>
<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.reynoldsftw.com%2F2009%2F03%2Freformat-urls-with-javascript-and-regular-expressions%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.reynoldsftw.com%2F2009%2F03%2Freformat-urls-with-javascript-and-regular-expressions%2F&amp;source=SteveReynolds&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
]]></content:encoded>
			<wfw:commentRss>http://www.reynoldsftw.com/2009/03/reformat-urls-with-javascript-and-regular-expressions/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

