<?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>Winn &#187; prototype</title>
	<atom:link href="http://winn.ws/archives/tag/prototype/feed" rel="self" type="application/rss+xml" />
	<link>http://winn.ws</link>
	<description>Standards-based design &#38; development</description>
	<lastBuildDate>Wed, 01 Feb 2012 05:30:15 +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>Google’s CDN links</title>
		<link>http://winn.ws/archives/762</link>
		<comments>http://winn.ws/archives/762#comments</comments>
		<pubDate>Tue, 30 Nov 2010 02:42:38 +0000</pubDate>
		<dc:creator>Greg Winn</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[web standards]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[prototype]]></category>
		<category><![CDATA[YUI]]></category>

		<guid isPermaLink="false">http://winn.ws/?p=762</guid>
		<description><![CDATA[Most of the websites I see, still host their JavaScript Library on their own server (Most, not all). Actually never have I ever seen any Web Development Blog hosting the library on their own server. They always use Google CDN, which is great because it has a number of advantages.]]></description>
			<content:encoded><![CDATA[<p>Most of the websites I see, still host their JavaScript Library on their own server (Most, not all). Actually never have I ever seen any Web Development Blog hosting the library on their own server. They always use Google CDN, which is great because it has a number of advantages:</p>
<p><span id="more-762"></span></p>
<ul>
<li>Google’s Content Distribution Network has libraries on their various servers across the world and if you use their CDN link, when a user’s browser resolves the URL, their browser will automatically download the file from the closest available server, which will be a much faster download than if you force a user to download the file from your host server in whichever country your website is hosted.</li>
<li>Google’s Content Distribution Network will save you a great deal of bandwidth if you have large traffic on your website and a limited bandwidth with your host.</li>
<li>There is a good chance that the Google hosted version of that library is already cached on the user’s browser cache, as lot of big websites and portals use Google’s CDN links including Google itself and Google’s servers instruct browsers to cache the file for one year if there are quite a few requests for the same hosted file.</li>
</ul>
<h3>How to use Google CDN</h3>
<p>Google’s CDN provides most of the popular, open source JavaScript Libraries with two ways of using each of them via the direct path in the script tags and via The Google AJAX Libraries API.</p>
<p>To use the Google AJAX Libraries API we need to include the Google “jsapi” script:</p>

<div class="wp_syntax"><div class="code"><pre class="jacascript" style="font-family:monospace;">&lt;script src=&quot;http://www.google.com/jsapi&quot;&gt;&lt;/script&gt;</pre></div></div>

<p>The Google AJAX Libraries API provides a simple and powerful google.load() method which accepts two arguments, the first argument to google.load is the name of a library. The second argument is the version of the library:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script<span style="color: #339933;">&gt;</span>
google<span style="color: #339933;">.</span>load<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;jquery&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;1.3.2&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
google<span style="color: #339933;">.</span>load<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;jqueryui&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;1.7.1&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    google<span style="color: #339933;">.</span>setOnLoadCallback<span style="color: #009900;">&#40;</span><span style="color: #000000; 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: #666666; font-style: italic;">// use this instead of:</span>
        <span style="color: #666666; font-style: italic;">/*
            $(document).ready(function(){  });
        */</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">&lt;/script&gt;</span></pre></div></div>

<p>But to use this API, there is a different approach for the ready functions of all the libraries. For example, in the above code, we use google.setOnLoadCallback(function(){ }); instead of jQuery’s ready function. In-fact we use google.setOnLoadCallback(function(){ }); instead of all different library’s ready functions. This can be seen as a drawback or a good feature; I see it as a good feature as it gives me a single ready function for all libraries.</p>
<p>The second method to use Google’s CDN links is by the direct paths of the libraries in the script tags</p>
<p>Below is a list of all the JavaScript Libraries Google CDN provides with the direct paths and google.load implementation:</p>
<h4>jQuery</h4>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">name<span style="color: #339933;">:</span> jquery
versions<span style="color: #339933;">:</span> 1<span style="color: #339933;">.</span>2<span style="color: #339933;">.</span>3<span style="color: #339933;">,</span> 1<span style="color: #339933;">.</span>2<span style="color: #339933;">.</span>6<span style="color: #339933;">,</span> 1<span style="color: #339933;">.</span>3<span style="color: #339933;">.</span>0<span style="color: #339933;">,</span> 1<span style="color: #339933;">.</span>3<span style="color: #339933;">.</span>1<span style="color: #339933;">,</span> 1<span style="color: #339933;">.</span>3<span style="color: #339933;">.</span>2
load request<span style="color: #339933;">:</span> google<span style="color: #339933;">.</span>load<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;jquery&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;1.3.2&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
extras<span style="color: #339933;">:</span> uncompressed<span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span> e<span style="color: #339933;">.</span>g<span style="color: #339933;">.,</span> google<span style="color: #339933;">.</span>load<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;jquery&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;1.3.2&quot;</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>uncompressed<span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
path<span style="color: #339933;">:</span> http<span style="color: #339933;">:</span><span style="color: #666666; font-style: italic;">//ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js</span>
path<span style="color: #009900;">&#40;</span>u<span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> http<span style="color: #339933;">:</span><span style="color: #666666; font-style: italic;">//ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js</span></pre></div></div>

<h4>jQuery UI</h4>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">name<span style="color: #339933;">:</span> jqueryui
versions<span style="color: #339933;">:</span> 1<span style="color: #339933;">.</span>5<span style="color: #339933;">.</span>2<span style="color: #339933;">,</span> 1<span style="color: #339933;">.</span>5<span style="color: #339933;">.</span>3<span style="color: #339933;">,</span> <span style="color:#800080;">1.6</span><span style="color: #339933;">,</span> 1<span style="color: #339933;">.</span>7<span style="color: #339933;">.</span>0<span style="color: #339933;">,</span> 1<span style="color: #339933;">.</span>7<span style="color: #339933;">.</span>1
load request<span style="color: #339933;">:</span> google<span style="color: #339933;">.</span>load<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;jqueryui&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;1.7.1&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
extras<span style="color: #339933;">:</span> uncompressed<span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span> e<span style="color: #339933;">.</span>g<span style="color: #339933;">.,</span> google<span style="color: #339933;">.</span>load<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;jqueryui&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;1.7.1&quot;</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>uncompressed<span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
path<span style="color: #339933;">:</span> http<span style="color: #339933;">:</span><span style="color: #666666; font-style: italic;">//ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/jquery-ui.min.js</span>
path<span style="color: #009900;">&#40;</span>u<span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> http<span style="color: #339933;">:</span><span style="color: #666666; font-style: italic;">//ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/jquery-ui.js</span>
note<span style="color: #339933;">:</span> This library depends on jquery<span style="color: #339933;">.</span> Before loading this module<span style="color: #339933;">,</span> you must load jquery<span style="color: #339933;">.</span> e<span style="color: #339933;">.</span>g<span style="color: #339933;">.:</span>
        google<span style="color: #339933;">.</span>load<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;jquery&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;1.3.2&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        google<span style="color: #339933;">.</span>load<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;jqueryui&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;1.7.1&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h4>Prototype</h4>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">name<span style="color: #339933;">:</span> prototype
versions<span style="color: #339933;">:</span> 1<span style="color: #339933;">.</span>6<span style="color: #339933;">.</span>0<span style="color: #339933;">.</span>2<span style="color: #339933;">,</span> 1<span style="color: #339933;">.</span>6<span style="color: #339933;">.</span>0<span style="color: #339933;">.</span>3
load request<span style="color: #339933;">:</span> google<span style="color: #339933;">.</span>load<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;prototype&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;1.6.0.3&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
path<span style="color: #339933;">:</span> http<span style="color: #339933;">:</span><span style="color: #666666; font-style: italic;">//ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js</span></pre></div></div>

<h4>script.aculo.us</h4>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">name<span style="color: #339933;">:</span> scriptaculous
versions<span style="color: #339933;">:</span> 1<span style="color: #339933;">.</span>8<span style="color: #339933;">.</span>1<span style="color: #339933;">,</span> 1<span style="color: #339933;">.</span>8<span style="color: #339933;">.</span>2
load request<span style="color: #339933;">:</span> google<span style="color: #339933;">.</span>load<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;scriptaculous&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;1.8.2&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
path<span style="color: #339933;">:</span> http<span style="color: #339933;">:</span><span style="color: #666666; font-style: italic;">//ajax.googleapis.com/ajax/libs/scriptaculous/1.8.2/scriptaculous.js</span>
note<span style="color: #339933;">:</span> This library depends on Prototype<span style="color: #339933;">.</span> Before loading this module<span style="color: #339933;">,</span> you must load Prototype<span style="color: #339933;">.</span> e<span style="color: #339933;">.</span>g<span style="color: #339933;">.:</span>
        google<span style="color: #339933;">.</span>load<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;prototype&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;1.6&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        google<span style="color: #339933;">.</span>load<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;scriptaculous&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;1.8.2&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h4>SWFObject</h4>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">name<span style="color: #339933;">:</span> swfobject
versions<span style="color: #339933;">:</span> <span style="color:#800080;">2.1</span>
load request<span style="color: #339933;">:</span> google<span style="color: #339933;">.</span>load<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;swfobject&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;2.1&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
extras<span style="color: #339933;">:</span> uncompressed<span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span> e<span style="color: #339933;">.</span>g<span style="color: #339933;">.,</span> google<span style="color: #339933;">.</span>load<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;swfobject&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;2.1&quot;</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>uncompressed<span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
path<span style="color: #339933;">:</span> http<span style="color: #339933;">:</span><span style="color: #666666; font-style: italic;">//ajax.googleapis.com/ajax/libs/swfobject/2.1/swfobject.js</span>
path<span style="color: #009900;">&#40;</span>u<span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> http<span style="color: #339933;">:</span><span style="color: #666666; font-style: italic;">//ajax.googleapis.com/ajax/libs/swfobject/2.1/swfobject_src.js</span></pre></div></div>

<h4>Yahoo! User Interface Library (YUI)</h4>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">name<span style="color: #339933;">:</span> yui
versions<span style="color: #339933;">:</span> 2<span style="color: #339933;">.</span>6<span style="color: #339933;">.</span>0<span style="color: #339933;">,</span> 2<span style="color: #339933;">.</span>7<span style="color: #339933;">.</span>0
load request<span style="color: #339933;">:</span> load request<span style="color: #339933;">:</span> google<span style="color: #339933;">.</span>load<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;yui&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;2.7.0&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
extras<span style="color: #339933;">:</span> uncompressed<span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span> e<span style="color: #339933;">.</span>g<span style="color: #339933;">.,</span> google<span style="color: #339933;">.</span>load<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;yui&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;2.7.0&quot;</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>uncompressed<span style="color: #339933;">:</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
path<span style="color: #339933;">:</span> http<span style="color: #339933;">:</span><span style="color: #666666; font-style: italic;">//ajax.googleapis.com/ajax/libs/yui/2.7.0/build/yuiloader/yuiloader-min.js</span>
path<span style="color: #009900;">&#40;</span>u<span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> http<span style="color: #339933;">:</span><span style="color: #666666; font-style: italic;">//ajax.googleapis.com/ajax/libs/yui/2.7.0/build/yuiloader/yuiloader.js</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://winn.ws/archives/762/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Winn Scriptatype: 1.7</title>
		<link>http://winn.ws/archives/169</link>
		<comments>http://winn.ws/archives/169#comments</comments>
		<pubDate>Wed, 15 Oct 2008 02:17:58 +0000</pubDate>
		<dc:creator>Greg Winn</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[WinnScriptatype]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[prototype]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.winn.ws/?p=169</guid>
		<description><![CDATA[I wanted to re-cap the new adds in 1.7 for rails. The new method calls are as listed: # Added V1.7b textlink_do_fade textlink_do_puff textlink_do_blindup textlink_do_dropout You can build any of the above calls with: textlink_do_fade&#40;'Link Text','divYouWantToUpdate',&#123;***&#125;,&#123;****&#125;&#41; Visit the project for more info on how to use the latest methods and more. Winn Scriptatype project home [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to re-cap the new adds in 1.7 for rails. The new method calls are as listed:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;"># Added V1.7b</span>
textlink_do_fade
textlink_do_puff
textlink_do_blindup
textlink_do_dropout</pre></div></div>

<p>You can build any of the above calls with:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">textlink_do_fade<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'Link Text'</span>,<span style="color:#996600;">'divYouWantToUpdate'</span>,<span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#006600; font-weight:bold;">***</span><span style="color:#006600; font-weight:bold;">&#125;</span>,<span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#006600; font-weight:bold;">****</span><span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>

<p>Visit the project for more info on how to use the latest methods and more. <a href="http://rubyonrailsrailway.com/winnscriptatype">Winn Scriptatype project home page.</a> at <a href="http://rubyonrailsrailway.com/">Ruby On Rails Railway</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://winn.ws/archives/169/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Product: Winn Tracker</title>
		<link>http://winn.ws/archives/128</link>
		<comments>http://winn.ws/archives/128#comments</comments>
		<pubDate>Tue, 25 Mar 2008 14:25:32 +0000</pubDate>
		<dc:creator>Greg Winn</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Winn Tracker]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[prototype]]></category>

		<guid isPermaLink="false">http://www.winn.ws/archives/128</guid>
		<description><![CDATA[Something i have been working on for about three or four weeks now is something called &#8220;Winn Tracker&#8221;. This new product will have the ability to track page views, downloads and user information in your own custom application or website. Winn Tracker will allow you to make a call to the database to track info [...]]]></description>
			<content:encoded><![CDATA[<p>Something i have been working on for about three or four weeks now is something called &#8220;Winn Tracker&#8221;. This new product will have the ability to track page views, downloads and user information in your own custom application or website. Winn Tracker will allow you to make a call to the database to track info 3 ways.</p>
<blockquote>
<p>1. Direct Link (http://your domain.tld/pathto/tracker&#8230;)</p>
<p>2. PHP Class link ($a->hit(&#8216;info to send&#8217;,['userName' => 'Bob']);)</p>
<p>3. Ajax link, out of the three this is the preferred method of communication. I have build a new Javascript function on top of prototype to build the call and then use the Ajax.Request function. (Winnjs.Hit(&#8216;send info&#8217;,['username:Bob']))</p>
</blockquote>
<p>The first launch of this will be in just a few short days and then the full release will be in about a month. The first release of this will not have a backend tool for the admin area. Version 2 will have a full admin area where you can create the three above calls with options, with little programing experience.</p>
<p>This system will come light with only about 1.5 megs of files and only 3 tables to install to your mysql database. Version 2 will come with a full install script along with many more options for non developers to use.</p>
<p><strong>I will keep you posted on new changes to this and when it will launch.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://winn.ws/archives/128/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Database Caching 1/13 queries in 0.033 seconds using disk: basic
Object Caching 355/375 objects using disk: basic
Content Delivery Network via Amazon Web Services: CloudFront: d45jz936mo8n8.cloudfront.net

Served from: winn.ws @ 2012-02-05 05:50:43 -->
