<?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>Ajax Tutorial &#187; Prototype</title>
	<atom:link href="http://tutorialajax.com/web/prototype/feed" rel="self" type="application/rss+xml" />
	<link>http://tutorialajax.com</link>
	<description>Prototype, jQuery and another Ajax tutorials</description>
	<lastBuildDate>Tue, 11 Nov 2008 14:24:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Compress JavaScript with Gzip</title>
		<link>http://tutorialajax.com/compress-javascript-with-gzip.html</link>
		<comments>http://tutorialajax.com/compress-javascript-with-gzip.html#comments</comments>
		<pubDate>Fri, 07 Nov 2008 18:45:16 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Optimization]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[compress]]></category>
		<category><![CDATA[gzip]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[Prototype]]></category>

		<guid isPermaLink="false">http://tutorialajax.com/?p=25</guid>
		<description><![CDATA[The main problem when we are using ajax framework is because of their big size. Of course, it will extremely slow down the sites load time. For example, if we use the standard jQuery, it&#8217;s almost 100Kb. It&#8217;s even more if we use the complete Prototype and Scriptaculous that will cost around 150Kb.
This is really [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>The main problem when we are using <a href="http://tutorialajax.com/ajax-framework-basic.html">ajax framework</a> is because of their big size. Of course, it will extremely slow down the sites load time. For example, if we use the standard <a href="http://tutorialajax.com/framework/library/jquery" target="_blank">jQuery</a>, it&#8217;s almost 100Kb. It&#8217;s even more if we use the complete <a href="http://tutorialajax.com/framework/library/prototype">Prototype</a> and <a href="http://script.aculo.us/" target="_blank">Scriptaculous</a> that will cost around 150Kb.</p>
<p>This is really nightmare for people who still use <strong>GPRS</strong> or the old <strong>56kbps Dial-Up</strong> internet connection. It will takes minutes to load the sites or maybe it will takes forever because the browser usually won&#8217;t download it. Unfortunately, it&#8217;s very easy to solve this problem. Do you know that we can compress those files and reduce the size by half or more?<span id="more-25"></span></p>
<p>There are several method to <strong>compress javascript</strong> and I think one of the most efficient method is using <a href="http://www.gzip.org/" target="_blank">Gzip</a> Compression.</p>
<p style="text-align: center;"><img class="aligncenter size-medium wp-image-26" title="gzip" src="http://tutorialajax.com/wp-content/uploads/2008/11/gzip3d.png" alt="Gzip" width="299" height="198" /></p>
<p>To implement the <strong>gzip compression</strong> for websites, first we need to <em>gzip</em> the Javascript files. For that purpose, we will need a gzip-compatible archiver / compressor. <a href="http://www.7-zip.org/" target="_blank">7-zip</a> is my favorite because it&#8217;s small, very fast and it&#8217;s completely free.</p>
<p>Gzip the JavaScript file, change the &#8220;<strong>gz</strong>&#8221; extension to &#8220;<strong>jgz</strong>&#8221; for <strong><em>safari compatibility</em></strong> and upload it to the same location together with the original script. Then next, we must ask apache to get the compressed version if there is available and finally tell the browser to un-compress the file before it can be used.</p>
<p>To do that, we add these following code in our <strong>.htaccess</strong></p>
<p><code>RewriteEngine on<br />
RewriteCond %{HTTP:Accept-Encoding} gzip<br />
RewriteCond %{REQUEST_FILENAME}.jgz -f<br />
RewriteRule (.*)\.js$ $1\.js.jgz [L]<br />
AddType "text/javascript" .js.jgz<br />
AddEncoding gzip .jgz<br />
</code><br />
That&#8217;s all. Yeah.. And if you want to look for another method this is it.:</p>
<ul>
<li><a href="http://joseph.randomnetworks.com/archives/2006/07/13/compressed-javascript/" target="_blank">Joseph Scott’s Blog</a> &#8211; Compressed JavaScript</li>
<li><a href="http://rakaz.nl/item/make_your_pages_load_faster_by_combining_and_compressing_javascript_and_css_files" target="_blank">rakaz</a> &#8211; Make your pages load faster by combining and compressing javascript and css files</li>
<li><a href="http://www.addedbytes.com/php/php-gzip-and-htaccess/" target="_blank">Added Bytes</a> &#8211; PHP, Gzip and htaccess</li>
<li><a href="http://letmehaveblog.blogspot.com/2007/09/using-gzip-compression-in-web-servers.html" target="_blank">Let me have a blog</a> &#8211; Using GZIP compression in web servers using .HTACCESS</li>
<li><a href="http://httpd.apache.org/docs/2.0/mod/mod_deflate.html" target="_blank">Apache Module</a> &#8211; mod_deflate</li>
<li><a href="http://sourceforge.net/projects/mod-gzip/" target="_blank">mod_gzip</a> &#8211; Internet Content Acceleration module for the popular Apache Web Server</li>
</ul>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://tutorialajax.com/compress-javascript-with-gzip.html/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Using Prototype</title>
		<link>http://tutorialajax.com/using-prototype.html</link>
		<comments>http://tutorialajax.com/using-prototype.html#comments</comments>
		<pubDate>Sat, 02 Aug 2008 19:09:25 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Prototype]]></category>
		<category><![CDATA[basic]]></category>
		<category><![CDATA[hello world]]></category>
		<category><![CDATA[using]]></category>

		<guid isPermaLink="false">http://localhost/ajax-framework/?p=6</guid>
		<description><![CDATA[To using prototype, first we must download it. It&#8217;s only 1 file named &#8216;prototype.js&#8216;. It is about 120kb, a bit too large for a website. but don&#8217;t worry, because the 120kb will do more&#8230;   besides that, we can compress it using any packer. I won&#8217;t describe how to compress the file here. If [...]


Related posts:<ol><li><a href='http://tutorialajax.com/prototype.html' rel='bookmark' title='Permanent Link: Prototype'>Prototype</a></li>
<li><a href='http://tutorialajax.com/the-prototype-function.html' rel='bookmark' title='Permanent Link: The Prototype $() function'>The Prototype $() function</a></li>
<li><a href='http://tutorialajax.com/start-using-jquery.html' rel='bookmark' title='Permanent Link: Start Using jQuery'>Start Using jQuery</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>To using prototype, first we must download it. It&#8217;s only 1 file named &#8216;<em>prototype.js</em>&#8216;. It is about 120kb, a bit too large for a website. but don&#8217;t worry, because the 120kb will do more&#8230; <img src='http://tutorialajax.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  besides that, we can compress it using any packer. I won&#8217;t describe how to compress the file here. If you wanna compress the file, you can learn it on &#8220;Compressing JavaScript&#8221;.</p>
<p>To use the prototype, first refer to the <em>&#8216;prototype.js&#8217;</em> as shown below<br />
<code>&lt;script type="text/javascript" src="prototype.js"&gt;<br />
&lt;/script&gt;</code></p>
<p>Place it at the &lt;head&gt; tags of your html. Actually you can place it anywhere  to use prototype, but It always be good to place it on the head because your pages will look cleaner.</p>
<p>And the main function in prototype is</p>
<p><code>document.observe('dom:loaded' , function() {<br />
... -&gt; script code here<br />
});</code></p>
<p>it&#8217;s not necessary to include the function if we want to use prototype, but this function guarantee that all the DOM structure has been loaded before the script run. That is a good habid to always use this function.</p>
<p><strong>The Hello World</strong></p>
<p>It&#8217;s a good idea to start every programming with the &#8216;hello world&#8217;.</p>
<p><code>document.observe('dom:loaded' , function() {<br />
$(document).update("Hello World!!");<br />
});</code></p>
<p>note that we call the sexy function &#8216;<em>$(document).update</em>&#8216; to pop out the text. about further of this function, we will learn it together later&#8230; by now, this is only &#8216;<strong>Using Prototype</strong>&#8216;</p>


<p>Related posts:<ol><li><a href='http://tutorialajax.com/prototype.html' rel='bookmark' title='Permanent Link: Prototype'>Prototype</a></li>
<li><a href='http://tutorialajax.com/the-prototype-function.html' rel='bookmark' title='Permanent Link: The Prototype $() function'>The Prototype $() function</a></li>
<li><a href='http://tutorialajax.com/start-using-jquery.html' rel='bookmark' title='Permanent Link: Start Using jQuery'>Start Using jQuery</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://tutorialajax.com/using-prototype.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Prototype-CSS $$() function</title>
		<link>http://tutorialajax.com/the-prototype-css-function.html</link>
		<comments>http://tutorialajax.com/the-prototype-css-function.html#comments</comments>
		<pubDate>Sat, 26 Jul 2008 19:35:37 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Prototype]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[dollar]]></category>
		<category><![CDATA[function]]></category>

		<guid isPermaLink="false">http://localhost/ajax-framework/?p=8</guid>
		<description><![CDATA[The dollar dollar function is Prototype&#8217;s CSS Selector Engine. The &#8216;$$()&#8217; function returns all css match elements. It was used quite same as the CSS selector. For example, to get all tags with the class &#8220;myclass&#8221;, we use the following:
$$(".myclass")
This function will return the array of elements match the selector string. And We can make [...]


Related posts:<ol><li><a href='http://tutorialajax.com/the-prototype-function.html' rel='bookmark' title='Permanent Link: The Prototype $() function'>The Prototype $() function</a></li>
<li><a href='http://tutorialajax.com/the-form-f-function.html' rel='bookmark' title='Permanent Link: The Form $F() function'>The Form $F() function</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>The dollar dollar function is Prototype&#8217;s CSS Selector Engine. The &#8216;$$()&#8217; function returns all css match elements. It was used quite same as the CSS selector. For example, to get all tags with the class &#8220;myclass&#8221;, we use the following:</p>
<p><code>$$(".myclass")</code></p>
<p>This function will return the array of elements match the selector string. And We can make the returned elements bold like this:</p>
<p><code>$$(".myclass").invoke('setStyle', { fontWeight: bold; })</code></p>
<p>Easy as pie&#8230;</p>


<p>Related posts:<ol><li><a href='http://tutorialajax.com/the-prototype-function.html' rel='bookmark' title='Permanent Link: The Prototype $() function'>The Prototype $() function</a></li>
<li><a href='http://tutorialajax.com/the-form-f-function.html' rel='bookmark' title='Permanent Link: The Form $F() function'>The Form $F() function</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://tutorialajax.com/the-prototype-css-function.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Form $F() function</title>
		<link>http://tutorialajax.com/the-form-f-function.html</link>
		<comments>http://tutorialajax.com/the-form-f-function.html#comments</comments>
		<pubDate>Fri, 25 Jul 2008 19:41:57 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Prototype]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[function]]></category>

		<guid isPermaLink="false">http://localhost/ajax-framework/?p=9</guid>
		<description><![CDATA[the $F() function will returns the value of form element.
$F("form_element_id")
Does it need a description anymore??


Related posts:The Prototype-CSS $$() function
The Prototype $() function



Related posts:<ol><li><a href='http://tutorialajax.com/the-prototype-css-function.html' rel='bookmark' title='Permanent Link: The Prototype-CSS $$() function'>The Prototype-CSS $$() function</a></li>
<li><a href='http://tutorialajax.com/the-prototype-function.html' rel='bookmark' title='Permanent Link: The Prototype $() function'>The Prototype $() function</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>the <em>$F()</em> function will returns the value of form element.</p>
<p><code>$F("form_element_id")</code></p>
<p>Does it need a description anymore??</p>


<p>Related posts:<ol><li><a href='http://tutorialajax.com/the-prototype-css-function.html' rel='bookmark' title='Permanent Link: The Prototype-CSS $$() function'>The Prototype-CSS $$() function</a></li>
<li><a href='http://tutorialajax.com/the-prototype-function.html' rel='bookmark' title='Permanent Link: The Prototype $() function'>The Prototype $() function</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://tutorialajax.com/the-form-f-function.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Prototype $() function</title>
		<link>http://tutorialajax.com/the-prototype-function.html</link>
		<comments>http://tutorialajax.com/the-prototype-function.html#comments</comments>
		<pubDate>Sun, 20 Jul 2008 19:23:58 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Prototype]]></category>
		<category><![CDATA[dollar]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[utility]]></category>

		<guid isPermaLink="false">http://localhost/ajax-framework/?p=7</guid>
		<description><![CDATA[The dollar function is one of the Prototype Utility Function. $() is the most frequently used prototype&#8217;s function. basically it was used to refer an element in the HTML page. The function is quickly shorthand for getElementById.
The usual function identifying an element is:
document.getElementById("element_id")
The $() function reduces the code to:
$("element_id")
For example, you can set the CSS [...]


Related posts:<ol><li><a href='http://tutorialajax.com/the-prototype-css-function.html' rel='bookmark' title='Permanent Link: The Prototype-CSS $$() function'>The Prototype-CSS $$() function</a></li>
<li><a href='http://tutorialajax.com/font-zoomer-javascript.html' rel='bookmark' title='Permanent Link: Font Zoomer JavaScript'>Font Zoomer JavaScript</a></li>
<li><a href='http://tutorialajax.com/using-prototype.html' rel='bookmark' title='Permanent Link: Using Prototype'>Using Prototype</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>The dollar function is one of the <strong>Prototype Utility Function</strong>. <em>$()</em> is the most frequently used prototype&#8217;s function. basically it was used to refer an element in the HTML page. The function is quickly shorthand for <em>getElementById</em>.</p>
<p>The usual function identifying an element is:<br />
<code>document.getElementById("element_id")</code></p>
<p>The $() function reduces the code to:<br />
<code>$("element_id")</code></p>
<p>For example, you can set the CSS text color with this code:<br />
<code>$("element_id").style.color = "#ffffff";</code></p>
<p>Or, the &#8220;Prototype way&#8221;:<br />
<code>$("id_of_element").setStyle({color: '#ffffff'});</code></p>


<p>Related posts:<ol><li><a href='http://tutorialajax.com/the-prototype-css-function.html' rel='bookmark' title='Permanent Link: The Prototype-CSS $$() function'>The Prototype-CSS $$() function</a></li>
<li><a href='http://tutorialajax.com/font-zoomer-javascript.html' rel='bookmark' title='Permanent Link: Font Zoomer JavaScript'>Font Zoomer JavaScript</a></li>
<li><a href='http://tutorialajax.com/using-prototype.html' rel='bookmark' title='Permanent Link: Using Prototype'>Using Prototype</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://tutorialajax.com/the-prototype-function.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Prototype</title>
		<link>http://tutorialajax.com/prototype.html</link>
		<comments>http://tutorialajax.com/prototype.html#comments</comments>
		<pubDate>Tue, 20 May 2008 18:24:59 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Prototype]]></category>

		<guid isPermaLink="false">http://localhost/ajax-framework/?p=5</guid>
		<description><![CDATA[Prototype is the most popular Ajax framework. It used by many giant-website such : Apple, Gucci, etc&#8230; The Prototype JavaScript Framework is a JavaScript framework created by Sam Stephenson. Prorotype is implemented as a single file of JavaScript code &#8220;prototype.js&#8221;.
Prototype is also used as the low layer for many framework, for example: script.aculo.us, Rico, ExtJS, [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><strong>Prototype</strong> is the most popular Ajax framework. It used by many giant-website such : Apple, Gucci, etc&#8230; The Prototype JavaScript Framework is a JavaScript framework created by <em>Sam Stephenson</em>. Prorotype is implemented as a single file of JavaScript code &#8220;<em>prototype.js&#8221;</em>.</p>
<p>Prototype is also used as the low layer for many framework, for example: <a title="Script.Aculo.Us Effects" href="http://script.aculo.us/" target="_blank">script.aculo.us</a>, <a title="Rico Open Source JavaScript" href="http://openrico.org" target="_blank">Rico</a>, <a title="Ext JS" href="http://extjs.com" target="_blank">ExtJS</a>, <a title="Moo.fx" href="http://moofx.mad4milk.net" target="_blank">Moo.fx</a>, etc. Prototype provides many functions for developing JavaScript web applications. The prorotype features programming shortcuts for accessing element, events, and major functions to deal with Ajax.</p>
<p>Prototype also feature library functions to support object oriented programming that use classes and ojects, something the JavaScript language hard to implement.</p>
<p>You can find and download <a title="Prototype JS" href="http://www.prototypejs.org/" target="_blank">prototype</a> on their site.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://tutorialajax.com/prototype.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

