<?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>Clayton McIlrath &#187; AJAX</title> <atom:link href="http://thinkclay.com/tag/ajax/feed" rel="self" type="application/rss+xml" /><link>http://thinkclay.com</link> <description>Creative Media Design, Powered by Wordpress</description> <lastBuildDate>Sat, 15 Oct 2011 19:40:31 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.2.1</generator> <item><title>JavaScript Libraries</title><link>http://thinkclay.com/technology/javascript-libraries</link> <comments>http://thinkclay.com/technology/javascript-libraries#comments</comments> <pubDate>Tue, 02 Dec 2008 05:51:55 +0000</pubDate> <dc:creator>Clay McIlrath</dc:creator> <category><![CDATA[Technology]]></category> <category><![CDATA[AJAX]]></category> <category><![CDATA[best practices]]></category> <category><![CDATA[developer tools]]></category> <category><![CDATA[front-end]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[JS]]></category> <guid
isPermaLink="false">http://www.new-age-design.com/?p=354</guid> <description><![CDATA[There is so much to be said about Javascript Libraries (JavaScript Toolkits or JavaScript Frameworks, if you prefer those terms, they&#8217;re all pretty much the same thing in regards to what I&#8217;m writing about). What is a JavaScript Library JavaScript Libraries were born as demands for JavaScript rose to create more interactive and dynamic websites. [...]]]></description> <content:encoded><![CDATA[<p><a
href="http://thinkclay.com/wp-content/uploads/2008/12/jquery_logo_color_onwhite.png"><img
src="http://thinkclay.com/wp-content/uploads/2008/12/jquery_logo_color_onwhite-490x120.png" alt="jquery_logo_color_onwhite" title="jquery_logo_color_onwhite" width="490" height="120" class="alignnone size-large wp-image-1107" /></a><br
/> There is so much to be said about Javascript Libraries (JavaScript Toolkits or JavaScript Frameworks, if you prefer those terms, they&#8217;re all pretty much the same thing in regards to what I&#8217;m writing about).</p><h3>What is a JavaScript Library</h3><p>JavaScript Libraries were born as demands for JavaScript rose to create more interactive and dynamic websites. Some developers wanted more movement and animation in their applications to enhance the user experience, and others wanted a library focused around quicker and easier XMLHttpRequests (coined AJAX) to make their applications faster and more responsive.</p><blockquote><p>A <strong>JavaScript Library</strong> is a library of pre-written JavaScript code, such as functions and classes, which allow for more efficient development of JavaScript-based applications.</p></blockquote><p>Some of the first libraries to emerge to meet these needs were <a
title="Go to the Prototype Library Website" href="http://www.prototypejs.org/"><strong>Prototype</strong></a>, developed by Sam Stephenson, and <a
title="Scriptaculous JavaScript Framework Website" href="http://script.aculo.us"><strong>Scriptaculous</strong></a> by <a
title="Go to Thomas Fuchs' Website" href="http://mir.aculo.us/">Thomas Fuchs</a>. In later years, JavaScript libraries such as <a
title="JQuery Library Website" href="http://jquery.com"><strong>jQuery</strong></a>, <a
title="Mootools Library Website" href="http://mootools.net"><strong>MooTools</strong></a>, and <a
title="Mochikit Framework Website" href="http://mochikit.com"><strong>MochiKit</strong></a> and JavaScript widget libraries such as <a
title="Ext Javascript Library" href="http://extjs.com"><strong>Ext JS</strong></a> and <a
title="Dojo Toolkit Website" href="http://http://dojotoolkit.org"><strong>Dojo Toolkit</strong></a> have emerged, each meeting a specific developer need and specializing in meeting that need in a unique way.</p><p>Following this trend, major companies have developed their own libraries to meet their specific needs. Some of the more popular ones are the <a
title="Google Web Toolkit Website" href="http://code.google.com/webtoolkit/">Google Web Toolkit (GWT)</a>, <a
title="Yahoo User Interface Framework Website" href="http://developer.yahoo.com/yui/">Yahoo User Interface Library (YUI)</a>, and <a
title="Microsoft ASP.NET AJAX Framework Website" href="http://www.asp.net/ajax/">ASP.NET AJAX</a>.</p><h3>What are JavaScript Libraries for</h3><p>JavaScript Libraries allow for easier development between JavaScript and other languages, such as CSS, PHP, Python and Java. This allows not only for a developer to read and write code in a style that they are more familiar with, but it also helps in developing seamless applications across different languages and environments.</p><h3>JavaScript Libraries in Front-End Web Development</h3><p>While there may be arguments for different libraries and different advantages and disadvantages of each, I&#8217;m am going to focus on these libraries from MY perspective which is in Front-end development across many platforms, applications and programs, and my views are bias to my experience in those settings. If you have an opinion or contribution of your own feel free to add them in the comments in a constructive and informative manner please!</p><h4>jQuery</h4><p>My absolute favorite library is jQuery. JQuery is a very lightweight and modular JavaScript Framework that weighs in at only 15k for the compressed core. Some of the great features of jquery for front-end web developers are its ease of use and learning. The library targets the Document Object Model (DOM) in the same way that CSS does, using selectors such as ID&#8217;s and classes as well as the standard nodes (element, text, and attribute). I also like that the framework is modular, which means you can get down and dirty with the core with little bandwidth eaten up, but extend it as far as needed with plug-ins.</p><h4>YUI</h4><p>YUI is another really lightweight library that separates its modules so that you can simply use the utilities needed without bloated code. While there are probably better candidates for this second slot as far as extensibility and compression (many would probably argue that MooTools belongs here), what I particularly like about Yahoo&#8217;s library is their documentation for it. When you get deep into code and complex structures, you test the limits of your framework. When your code breaks the framework (and it WILL at some point), it&#8217;s good to be able to reference well documented and explained code that way you can identify the problem and work towards a solution. That&#8217;s my reason for replacing MooTools with YUI in my faves.</p><h4>Prototype &amp; Scriptaculous</h4><p>I used to love these frameworks, but as jQuery has grown and become more efficient, I&#8217;ve moved away from the bloated code that was once a part of my utility belt. I would like to hear anyone&#8217;s feedback that still primarily uses these libraries and see if there are any advantages that these veterans have over the new ones.</p> ]]></content:encoded> <wfw:commentRss>http://thinkclay.com/technology/javascript-libraries/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Automate to save time and money!</title><link>http://thinkclay.com/technology/automate-to-save-time-and-money</link> <comments>http://thinkclay.com/technology/automate-to-save-time-and-money#comments</comments> <pubDate>Wed, 13 Aug 2008 19:41:56 +0000</pubDate> <dc:creator>Clay McIlrath</dc:creator> <category><![CDATA[Technology]]></category> <category><![CDATA[AJAX]]></category> <category><![CDATA[automate]]></category> <category><![CDATA[best practices]]></category> <category><![CDATA[freelance]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[JS]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[web 2.0]]></category> <guid
isPermaLink="false">http://www.new-age-design.com/?p=14</guid> <description><![CDATA[The guys over at Chosen Creative have given us yet another awesome way to make are lives easier! This script generates a list of all files in a directory using a PHP function to read the directory files starting with the underscore _ character, and then it outputs them into a JQuery styled accordion menu! [...]]]></description> <content:encoded><![CDATA[<p>The guys over at <a
title="Chosen Creative Advertising" href="http://chosencreative.com">Chosen Creative</a> have given us yet another awesome way to make are lives easier! This script generates a list of all files in a directory using a PHP function to read the directory files starting with the underscore _ character, and then it outputs them into a JQuery styled accordion menu!</p><p><strong>Here&#8217;s the JQ </strong></p><div
class="wp_syntax"><div
class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;li.child:visible&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;li.parent&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">children</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hasClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;selected&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">children</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">removeClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'selected'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">next</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">toggle</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;slow&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">children</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'selected'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">next</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">load</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">children</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;href&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">toggle</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;medium&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p><strong>Here&#8217;s the PHP</strong></p><div
class="wp_syntax"><div
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$handle</span> <span style="color: #339933;">=</span> <span style="color: #990000;">opendir</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'./'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">false</span> <span style="color: #339933;">!==</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span> <span style="color: #339933;">=</span> <span style="color: #990000;">readdir</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$handle</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/^\_/&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$file</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$filename</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/\_/'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">' '</span><span style="color: #339933;">,</span> <span style="color: #000088;">$file</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;
	&lt;li class=&quot;</span>\<span style="color: #339933;">&amp;</span>quot<span style="color: #339933;">;</span>parent\<span style="color: #339933;">&amp;</span>quot<span style="color: #339933;">;</span><span style="color: #0000ff;">&quot;&gt;&lt;a href=&quot;</span>\<span style="color: #0000ff;">&quot;&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$filename</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/a&gt;&lt;/li&gt;
<span style="color: #000099; font-weight: bold;">\n</span>
	&lt;li class=&quot;</span>\<span style="color: #339933;">&amp;</span>quot<span style="color: #339933;">;</span>child\<span style="color: #339933;">&amp;</span>quot<span style="color: #339933;">;</span><span style="color: #0000ff;">&quot;&gt;&lt;/li&gt;
&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #990000;">closedir</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$handle</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div> ]]></content:encoded> <wfw:commentRss>http://thinkclay.com/technology/automate-to-save-time-and-money/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
