<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>VJ's Warez</title>
	<atom:link href="http://vjayblog.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://vjayblog.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Sat, 03 Jan 2009 08:52:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='vjayblog.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>VJ's Warez</title>
		<link>http://vjayblog.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://vjayblog.wordpress.com/osd.xml" title="VJ&#039;s Warez" />
	<atom:link rel='hub' href='http://vjayblog.wordpress.com/?pushpress=hub'/>
		<item>
		<title>PHP for Microsoft Ajax Library</title>
		<link>http://vjayblog.wordpress.com/2009/01/03/php-for-microsoft-ajax-library/</link>
		<comments>http://vjayblog.wordpress.com/2009/01/03/php-for-microsoft-ajax-library/#comments</comments>
		<pubDate>Sat, 03 Jan 2009 08:52:16 +0000</pubDate>
		<dc:creator>vjayblog</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://vjayblog.wordpress.com/?p=27</guid>
		<description><![CDATA[Steve Marx has created a PHP library for the Microsoft Ajax 1.0 release that uses the JavaScript piece in PHP land. The Microsoft AJAX Library is a pure-JavaScript library that&#8217;s used by ASP.NET AJAX but is also available as a separate download. Because it&#8217;s pure JavaScript, it&#8217;s not tied to ASP.NET on the backend. PHP [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vjayblog.wordpress.com&amp;blog=6034814&amp;post=27&amp;subd=vjayblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Steve Marx has created a <a href="http://smarx.com/posts/php-for-microsoft-ajax-library.aspx">PHP library for the Microsoft Ajax 1.0 release</a> that uses the JavaScript piece in PHP land.</p>
<p>The Microsoft AJAX Library is a pure-JavaScript library that&#8217;s used by ASP.NET AJAX but is also available as a separate download. Because it&#8217;s pure JavaScript, it&#8217;s not tied to ASP.NET on the backend. PHP for MS AJAX is code to help you make use of the Microsoft AJAX Library from PHP applications. With this first Alpha release, it simply supports exposing PHP classes as AJAX-enabled web services, just as in ASP.NET applications. In fact, the generated proxies are identical to what you get from ASP.NET, meaning you can have full interoperability.</p>
<p><strong>Hello World</strong></p>
<p>The service on the backend so to speak:</p>
<ol>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#009900;"><span style="color:#000000;font-weight:bold;">&lt;</span>?php</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;">require_once <span style="color:#ff0000;">&#8216;../../dist/MSAjaxService.php&#8217;</span>;</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#000066;">class</span> HelloService extends MSAjaxService</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#006600;font-weight:bold;">{</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;">function SayHello<span style="color:#006600;font-weight:bold;">(</span>$name<span style="color:#006600;font-weight:bold;">)</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#006600;font-weight:bold;">{</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;">return <span style="color:#ff0000;">&#8220;Hello, &#8220;</span> . $name . <span style="color:#ff0000;">&#8220;!&#8221;</span>;</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#006600;font-weight:bold;">}</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#006600;font-weight:bold;">}</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;">$h = new HelloService<span style="color:#006600;font-weight:bold;">(</span><span style="color:#006600;font-weight:bold;">)</span>;</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;">$h-<span style="color:#000000;font-weight:bold;">&gt;</span>ProcessRequest();</div>
</li>
</ol>
<p>And the front end that will talk to it:</p>
<ol>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#009900;"><a href="http://december.com/html/4/element/html.html"><span style="color:#000000;font-weight:bold;">&lt;html&gt;</span></a></span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#009900;"><a href="http://december.com/html/4/element/head.html"><span style="color:#000000;font-weight:bold;">&lt;head&gt;</span></a></span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#009900;"><a href="http://december.com/html/4/element/title.html"><span style="color:#000000;font-weight:bold;">&lt;title&gt;</span></a></span>Hello, World!<span style="color:#009900;"><span style="color:#000000;font-weight:bold;">&lt;/title&gt;</span></span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#009900;"><a href="http://december.com/html/4/element/script.html"><span style="color:#000000;font-weight:bold;">&lt;script</span></a> <span style="color:#000066;">type</span>=<span style="color:#ff0000;">&#8220;text/javascript&#8221;</span> <span style="color:#000066;">src</span>=<span style="color:#ff0000;">&#8220;../../MicrosoftAjaxLibrary/MicrosoftAjax.js&#8221;</span><span style="color:#000000;font-weight:bold;">&gt;</span></span><span style="color:#009900;"><span style="color:#000000;font-weight:bold;">&lt;/script&gt;</span></span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#009900;"><a href="http://december.com/html/4/element/script.html"><span style="color:#000000;font-weight:bold;">&lt;script</span></a> <span style="color:#000066;">type</span>=<span style="color:#ff0000;">&#8220;text/javascript&#8221;</span> <span style="color:#000066;">src</span>=<span style="color:#ff0000;">&#8220;HelloService.php/js&#8221;</span><span style="color:#000000;font-weight:bold;">&gt;</span></span><span style="color:#009900;"><span style="color:#000000;font-weight:bold;">&lt;/script&gt;</span></span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#009900;"><span style="color:#000000;font-weight:bold;">&lt;/head&gt;</span></span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#009900;"><a href="http://december.com/html/4/element/body.html"><span style="color:#000000;font-weight:bold;">&lt;body&gt;</span></a></span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;">Name: <span style="color:#009900;"><a href="http://december.com/html/4/element/input.html"><span style="color:#000000;font-weight:bold;">&lt;input</span></a> <span style="color:#000066;">id</span>=<span style="color:#ff0000;">&#8220;name&#8221;</span> <span style="color:#000066;">type</span>=<span style="color:#ff0000;">&#8220;text&#8221;</span> /<span style="color:#000000;font-weight:bold;">&gt;</span></span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#009900;"><a href="http://december.com/html/4/element/input.html"><span style="color:#000000;font-weight:bold;">&lt;input</span></a> <span style="color:#000066;">type</span>=<span style="color:#ff0000;">&#8220;button&#8221;</span> <span style="color:#000066;">value</span>=<span style="color:#ff0000;">&#8220;Say Hello&#8221;</span> <span style="color:#000066;">onclick</span>=<span style="color:#ff0000;">&#8220;button_click(); return false;&#8221;</span> /<span style="color:#000000;font-weight:bold;">&gt;</span></span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#009900;"><a href="http://december.com/html/4/element/br.html"><span style="color:#000000;font-weight:bold;">&lt;br</span></a> /<span style="color:#000000;font-weight:bold;">&gt;</span></span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;">Response from server: <span style="color:#009900;"><a href="http://december.com/html/4/element/span.html"><span style="color:#000000;font-weight:bold;">&lt;span</span></a> <span style="color:#000066;">id</span>=<span style="color:#ff0000;">&#8220;response&#8221;</span><span style="color:#000000;font-weight:bold;">&gt;</span></span><span style="color:#009900;"><span style="color:#000000;font-weight:bold;">&lt;/span&gt;</span></span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#009900;"><span style="color:#000000;font-weight:bold;">&lt;/body&gt;</span></span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#009900;"><a href="http://december.com/html/4/element/script.html"><span style="color:#000000;font-weight:bold;">&lt;script</span></a> <span style="color:#000066;">type</span>=<span style="color:#ff0000;">&#8220;text/javascript&#8221;</span><span style="color:#000000;font-weight:bold;">&gt;</span></span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;">function button_click() {</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;">HelloService.SayHello($get(&#8216;name&#8217;).value, function (result) {</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;">$get(&#8216;response&#8217;).innerHTML = result;</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;">});</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;">}</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#009900;"><span style="color:#000000;font-weight:bold;">&lt;/script&gt;</span></span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#009900;"><span style="color:#000000;font-weight:bold;">&lt;/html&gt;</span></span></div>
</li>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vjayblog.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vjayblog.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vjayblog.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vjayblog.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vjayblog.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vjayblog.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vjayblog.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vjayblog.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vjayblog.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vjayblog.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vjayblog.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vjayblog.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vjayblog.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vjayblog.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vjayblog.wordpress.com&amp;blog=6034814&amp;post=27&amp;subd=vjayblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vjayblog.wordpress.com/2009/01/03/php-for-microsoft-ajax-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/661e92c3cee302e518b80d18df52bf34?s=96&#38;d=identicon" medium="image">
			<media:title type="html">vjayblog</media:title>
		</media:content>
	</item>
		<item>
		<title>Ruby on jQuery and Closures</title>
		<link>http://vjayblog.wordpress.com/2009/01/03/ruby-on-jquery-and-closures/</link>
		<comments>http://vjayblog.wordpress.com/2009/01/03/ruby-on-jquery-and-closures/#comments</comments>
		<pubDate>Sat, 03 Jan 2009 08:49:20 +0000</pubDate>
		<dc:creator>vjayblog</dc:creator>
				<category><![CDATA[JAVASCRIPT]]></category>
		<category><![CDATA[JSON]]></category>

		<guid isPermaLink="false">http://vjayblog.wordpress.com/?p=25</guid>
		<description><![CDATA[Sam Ruby has that way about him that sees things very clearly. He just took a peak at jQuery for the first time and was able to really put into words what I think jQuery enthusiasts like about the library: The notable thing about this is that despite all of the asynchronous events taking place, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vjayblog.wordpress.com&amp;blog=6034814&amp;post=25&amp;subd=vjayblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Sam Ruby has that way about him that sees things very clearly. He just took a peak at jQuery for the first time and was able to <a href="http://intertwingly.net/blog/2008/10/12/jQuery-and-Closures">really put into words</a> what I think jQuery enthusiasts like about the library:</p>
<p>The notable thing about this is that despite all of the asynchronous events taking place, the code is sequential (nested, but sequential), and that the JSON results of the AJAX call is immediately available to the function that is invoked when the selection changes.</p>
<p>This is based on the following code that he wrote:</p>
<div id="javascript-1">
<div class="javascript">
<ol>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;">$<span style="color:#006600;font-weight:bold;">(</span><span style="color:#3366cc;">&#8220;#archive&#8221;</span><span style="color:#006600;font-weight:bold;">)</span>.<span style="color:#006600;">click</span><span style="color:#006600;font-weight:bold;">(</span><span style="color:#003366;font-weight:bold;">function</span><span style="color:#006600;font-weight:bold;">(</span><span style="color:#006600;font-weight:bold;">)</span> <span style="color:#006600;font-weight:bold;">{</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;">$.<span style="color:#006600;">getJSON</span><span style="color:#006600;font-weight:bold;">(</span><span style="color:#3366cc;">&#8216;unscanned.cgi&#8217;</span>, <span style="color:#006600;font-weight:bold;">{</span><span style="color:#006600;font-weight:bold;">}</span>, <span style="color:#003366;font-weight:bold;">function</span><span style="color:#006600;font-weight:bold;">(</span>unscanned<span style="color:#006600;font-weight:bold;">)</span> <span style="color:#006600;font-weight:bold;">{</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#009900;font-style:italic;">// replace realname input field with a selection list</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#003366;font-weight:bold;">var</span> select = $<span style="color:#006600;font-weight:bold;">(</span><span style="color:#3366cc;">&#8216;&lt;select name=&#8221;realname&#8221; id=&#8221;realname&#8221;/&gt;&#8217;</span><span style="color:#006600;font-weight:bold;">)</span><span style="color:#006600;font-weight:bold;">[</span><span style="color:#800000;">0</span><span style="color:#006600;font-weight:bold;">]</span>;</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#000066;font-weight:bold;">for</span> <span style="color:#006600;font-weight:bold;">(</span><span style="color:#003366;font-weight:bold;">var</span> i=<span style="color:#800000;">0</span>; i&lt;unscanned .<span style="color:#006600;">length</span>; i++<span style="color:#006600;font-weight:bold;">)</span> <span style="color:#006600;font-weight:bold;">{</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;">select.<span style="color:#006600;">options</span><span style="color:#006600;font-weight:bold;">[</span>i<span style="color:#006600;font-weight:bold;">]</span> = <span style="color:#003366;font-weight:bold;">new</span> Option<span style="color:#006600;font-weight:bold;">(</span>unscanned<span style="color:#006600;font-weight:bold;">[</span>i<span style="color:#006600;font-weight:bold;">]</span><span style="color:#006600;font-weight:bold;">[</span><span style="color:#800000;">1</span><span style="color:#006600;font-weight:bold;">]</span>, i<span style="color:#006600;font-weight:bold;">)</span>;</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#006600;font-weight:bold;">}</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;">$<span style="color:#006600;font-weight:bold;">(</span><span style="color:#3366cc;">&#8216;#realname&#8217;</span><span style="color:#006600;font-weight:bold;">)</span>.<span style="color:#006600;">before</span><span style="color:#006600;font-weight:bold;">(</span>select<span style="color:#006600;font-weight:bold;">)</span>.<span style="color:#006600;">remove</span><span style="color:#006600;font-weight:bold;">(</span><span style="color:#006600;font-weight:bold;">)</span>;</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;">$<span style="color:#006600;font-weight:bold;">(</span><span style="color:#3366cc;">&#8220;#archive&#8221;</span><span style="color:#006600;font-weight:bold;">)</span>.<span style="color:#006600;">attr</span><span style="color:#006600;font-weight:bold;">(</span><span style="color:#3366cc;">&#8220;disabled&#8221;</span>,<span style="color:#3366cc;">&#8220;disabled&#8221;</span><span style="color:#006600;font-weight:bold;">)</span>;</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#009900;font-style:italic;">// process selection</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;">$<span style="color:#006600;font-weight:bold;">(</span><span style="color:#3366cc;">&#8216;#realname&#8217;</span><span style="color:#006600;font-weight:bold;">)</span>.<span style="color:#006600;">focus</span><span style="color:#006600;font-weight:bold;">(</span><span style="color:#006600;font-weight:bold;">)</span>.<span style="color:#006600;">change</span><span style="color:#006600;font-weight:bold;">(</span><span style="color:#003366;font-weight:bold;">function</span><span style="color:#006600;font-weight:bold;">(</span><span style="color:#006600;font-weight:bold;">)</span> <span style="color:#006600;font-weight:bold;">{</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#003366;font-weight:bold;">var</span> icla = unscanned<span style="color:#006600;font-weight:bold;">[</span>$<span style="color:#006600;font-weight:bold;">(</span><span style="color:#3366cc;">"#realname option:selected"</span><span style="color:#006600;font-weight:bold;">)</span>.<span style="color:#006600;">val</span><span style="color:#006600;font-weight:bold;">(</span><span style="color:#006600;font-weight:bold;">)</span><span style="color:#006600;font-weight:bold;">]</span>;</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;">$<span style="color:#006600;font-weight:bold;">(</span><span style="color:#3366cc;">&#8220;#realname&#8221;</span><span style="color:#006600;font-weight:bold;">)</span>.<span style="color:#006600;">before</span><span style="color:#006600;font-weight:bold;">(</span><span style="color:#3366cc;">&#8216;&lt;input type=&#8221;text&#8221; &#8216;</span> +</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">&#8216;id=&#8221;realname&#8221; name=&#8221;realname&#8221;/&gt;&#8217;</span><span style="color:#006600;font-weight:bold;">)</span>.<span style="color:#006600;">remove</span><span style="color:#006600;font-weight:bold;">(</span><span style="color:#006600;font-weight:bold;">)</span>;</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;">$<span style="color:#006600;font-weight:bold;">(</span><span style="color:#3366cc;">&#8220;#realname&#8221;</span><span style="color:#006600;font-weight:bold;">)</span>.<span style="color:#006600;">val</span><span style="color:#006600;font-weight:bold;">(</span>icla<span style="color:#006600;font-weight:bold;">[</span><span style="color:#800000;">1</span><span style="color:#006600;font-weight:bold;">]</span><span style="color:#006600;font-weight:bold;">)</span>;</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;">$<span style="color:#006600;font-weight:bold;">(</span><span style="color:#3366cc;">&#8220;#pubname&#8221;</span><span style="color:#006600;font-weight:bold;">)</span>.<span style="color:#006600;">val</span><span style="color:#006600;font-weight:bold;">(</span>icla<span style="color:#006600;font-weight:bold;">[</span><span style="color:#800000;">2</span><span style="color:#006600;font-weight:bold;">]</span><span style="color:#006600;font-weight:bold;">)</span>;</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;">$<span style="color:#006600;font-weight:bold;">(</span><span style="color:#3366cc;">&#8220;#email&#8221;</span><span style="color:#006600;font-weight:bold;">)</span>.<span style="color:#006600;">val</span><span style="color:#006600;font-weight:bold;">(</span>icla<span style="color:#006600;font-weight:bold;">[</span><span style="color:#800000;">3</span><span style="color:#006600;font-weight:bold;">]</span><span style="color:#006600;font-weight:bold;">)</span>;</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;">$<span style="color:#006600;font-weight:bold;">(</span><span style="color:#3366cc;">&#8220;#replaces&#8221;</span><span style="color:#006600;font-weight:bold;">)</span>.<span style="color:#006600;">val</span><span style="color:#006600;font-weight:bold;">(</span>icla<span style="color:#006600;font-weight:bold;">[</span><span style="color:#800000;">0</span><span style="color:#006600;font-weight:bold;">]</span> + <span style="color:#3366cc;">&#8216;:&#8217;</span> + icla<span style="color:#006600;font-weight:bold;">[</span><span style="color:#800000;">3</span><span style="color:#006600;font-weight:bold;">]</span><span style="color:#006600;font-weight:bold;">)</span>;</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;">$<span style="color:#006600;font-weight:bold;">(</span><span style="color:#3366cc;">&#8220;#filename&#8221;</span><span style="color:#006600;font-weight:bold;">)</span>.<span style="color:#006600;">val</span><span style="color:#006600;font-weight:bold;">(</span><span style="color:#3366cc;">&#8221;</span><span style="color:#006600;font-weight:bold;">)</span>.<span style="color:#006600;">focus</span><span style="color:#006600;font-weight:bold;">(</span><span style="color:#006600;font-weight:bold;">)</span>;</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;">$<span style="color:#006600;font-weight:bold;">(</span><span style="color:#3366cc;">&#8220;#archive&#8221;</span><span style="color:#006600;font-weight:bold;">)</span>.<span style="color:#006600;">removeAttr</span><span style="color:#006600;font-weight:bold;">(</span><span style="color:#3366cc;">&#8220;disabled&#8221;</span><span style="color:#006600;font-weight:bold;">)</span>;</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#006600;font-weight:bold;">}</span><span style="color:#006600;font-weight:bold;">)</span>;</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#006600;font-weight:bold;">}</span><span style="color:#006600;font-weight:bold;">)</span>;</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#000066;font-weight:bold;">return</span> <span style="color:#003366;font-weight:bold;">false</span>;</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#006600;font-weight:bold;">}</span><span style="color:#006600;font-weight:bold;">)</span>;</div>
</li>
</ol>
<p>Those that love jQuery, love the API.</p>
<p>John himself had an example in the comments:</p>
<ol>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;">$<span style="color:#006600;font-weight:bold;">(</span><span style="color:#3366cc;">&#8216;:radio[name=is_user]&#8216;</span><span style="color:#006600;font-weight:bold;">)</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;">.<span style="color:#006600;">change</span><span style="color:#006600;font-weight:bold;">(</span><span style="color:#003366;font-weight:bold;">function</span><span style="color:#006600;font-weight:bold;">(</span><span style="color:#006600;font-weight:bold;">)</span><span style="color:#006600;font-weight:bold;">{</span> $<span style="color:#006600;font-weight:bold;">(</span><span style="color:#3366cc;">&#8216;.depends-isuser&#8217;</span><span style="color:#006600;font-weight:bold;">)</span><span style="color:#006600;font-weight:bold;">[</span> <span style="color:#000066;font-weight:bold;">this</span>.<span style="color:#006600;">value</span> == <span style="color:#800000;">1</span> ? ‘show’ : ‘hide’ <span style="color:#006600;font-weight:bold;">]</span><span style="color:#006600;font-weight:bold;">(</span><span style="color:#006600;font-weight:bold;">)</span>; <span style="color:#006600;font-weight:bold;">}</span><span style="color:#006600;font-weight:bold;">)</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;">.<span style="color:#006600;">change</span><span style="color:#006600;font-weight:bold;">(</span><span style="color:#006600;font-weight:bold;">)</span>;</div>
</li>
</ol>
</div>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vjayblog.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vjayblog.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vjayblog.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vjayblog.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vjayblog.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vjayblog.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vjayblog.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vjayblog.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vjayblog.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vjayblog.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vjayblog.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vjayblog.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vjayblog.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vjayblog.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vjayblog.wordpress.com&amp;blog=6034814&amp;post=25&amp;subd=vjayblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vjayblog.wordpress.com/2009/01/03/ruby-on-jquery-and-closures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/661e92c3cee302e518b80d18df52bf34?s=96&#38;d=identicon" medium="image">
			<media:title type="html">vjayblog</media:title>
		</media:content>
	</item>
		<item>
		<title>jQuery 1.3 beta: Sizzling and feature testing</title>
		<link>http://vjayblog.wordpress.com/2009/01/03/jquery-13-beta-sizzling-and-feature-testing/</link>
		<comments>http://vjayblog.wordpress.com/2009/01/03/jquery-13-beta-sizzling-and-feature-testing/#comments</comments>
		<pubDate>Sat, 03 Jan 2009 08:45:36 +0000</pubDate>
		<dc:creator>vjayblog</dc:creator>
				<category><![CDATA[JAVASCRIPT]]></category>
		<category><![CDATA[Jquery]]></category>

		<guid isPermaLink="false">http://vjayblog.wordpress.com/?p=22</guid>
		<description><![CDATA[jQuery 1.3 beta 1 has been released with John and the team asking for testing help. This is a big release as a lot has been changed: Sizzle has been integrated No more browser testing: For example, no more if ( jQuery.browser.msie &#38;&#38; !jQuery.isXMLDoc(this) ) { which is replaced with if ( !jQuery.support.noCloneEvent &#38;&#38; !jQuery.isXMLDoc(this) [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vjayblog.wordpress.com&amp;blog=6034814&amp;post=22&amp;subd=vjayblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.jquery.com/2008/12/22/help-test-jquery-13-beta-1/">jQuery 1.3 beta 1 has been released</a> with John and the team asking for testing help.</p>
<p>This is a big release as a lot has been changed:</p>
<ul>
<li><a href="http://github.com/jeresig/sizzle/tree/master">Sizzle has been integrated</a></li>
<li><a href="http://dev.jquery.com/changeset/5985">No more browser testing</a>: For example, no more <code>if ( jQuery.browser.msie &amp;&amp; !jQuery.isXMLDoc(this) ) {</code> which is replaced with <code>if ( !jQuery.support.noCloneEvent &amp;&amp; !jQuery.isXMLDoc(this) ) {</code></li>
<li>Live event delegration: Reglib’s claim to fame was how event delegation was “live” meaning that if you added elements later on, they would also fall into the same delegations. With <code>$("#foo &gt; div").live("click", someFn);</code> you get the same in jQuery</li>
<li><code>$(this).closest("div");</code>: Returns this or closest ancestor that matches selector</li>
<li>.offset() rewrite &#8211; significantly faster, uses no browser sniffing.</li>
<li>.hide()/.show() rewrite &#8211; 50% &#8211; 200% faster.</li>
<li>.append/prepend/before/after rewrite &#8211; 10-15x faster.</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vjayblog.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vjayblog.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vjayblog.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vjayblog.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vjayblog.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vjayblog.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vjayblog.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vjayblog.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vjayblog.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vjayblog.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vjayblog.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vjayblog.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vjayblog.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vjayblog.wordpress.com/22/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vjayblog.wordpress.com&amp;blog=6034814&amp;post=22&amp;subd=vjayblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vjayblog.wordpress.com/2009/01/03/jquery-13-beta-sizzling-and-feature-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/661e92c3cee302e518b80d18df52bf34?s=96&#38;d=identicon" medium="image">
			<media:title type="html">vjayblog</media:title>
		</media:content>
	</item>
		<item>
		<title>YQL &#8211; converting the web to JSON with mock SQL</title>
		<link>http://vjayblog.wordpress.com/2009/01/03/yql-converting-the-web-to-json-with-mock-sql/</link>
		<comments>http://vjayblog.wordpress.com/2009/01/03/yql-converting-the-web-to-json-with-mock-sql/#comments</comments>
		<pubDate>Sat, 03 Jan 2009 08:43:47 +0000</pubDate>
		<dc:creator>vjayblog</dc:creator>
				<category><![CDATA[JAVASCRIPT]]></category>

		<guid isPermaLink="false">http://vjayblog.wordpress.com/?p=20</guid>
		<description><![CDATA[I like getting data from the web and I love JSON &#8211; as it is easy to use. The issue is that not many things on the web come as JSON from the get-go. Hence we need converters. You can use cURL and beautiful soup or roll your own hell of regular expressions. Alternatively you [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vjayblog.wordpress.com&amp;blog=6034814&amp;post=20&amp;subd=vjayblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I like getting data from the web and I love JSON &#8211; as it is easy to use. The issue is that not many things on the web come as JSON from the get-go. Hence we need converters. You can use <a href="http://curl.haxx.se/">cURL</a> and <a href="http://www.crummy.com/software/BeautifulSoup/">beautiful soup</a> or  roll your own hell of regular expressions. Alternatively you can use <a href="http://pipes.yahoo.com/">Yahoo Pipes</a> to build your converter. Pipes is the bomb but a lot of people complained that there is no version control and that you need to use the very graphical interface to get to your data (which was the point of Pipes but let&#8217;s not go there).</p>
<p><del>Alas</del><ins>Rejoice for</ins> there is a solution now available and it is called <a href="http://developer.yahoo.com/yql">YQL</a>. YQL is a SQL-style language to get information from all kind of web services, and &#8211; <a href="http://developer.yahoo.com/social/php_guide/getting_started-creating_oauth_app.html">using oAuth &#8211; even Yahoo&#8217;s social graph</a>. There is a <a href="http://developer.yahoo.com/yql/console/">test console</a> available for you to get to grips with all the information it gives you access to (which is a lot!):</p>
<p><a href="http://developer.yahoo.com/yql/console"><img class="aligncenter size-full wp-image-5381" src="http://ajaxian.com/wp-content/uploads/console.jpg" alt="The YQL console" width="500" height="246" /></a></p>
<p>Here comes the kicker though: for all the open services that don&#8217;t need authentication you can use these YQL statements as a REST API with JSON output and an optional callback function for JSON-P by adding it to http://query.yahooapis.com/v1/public/yql?. For example to get the latest three headlines from Ajaxian&#8217;s RSS feed as JSON and wrap it in a function called leechajaxian do the following:<span id="more-20"></span></p>
<p><a href="http://query.yahooapis.com/v1/public/yql?q=select%20title%20from%20rss%20where%20url%3D%22http%3A%2F%2Ffeeds.feedburner.com%2Fajaxian%22%20limit%203&amp;format=json&amp;callback=leechajaxian">http://query.yahooapis.com/v1/public/yql?select title from rss where url=&#8221;http://feeds.feedburner.com/ajaxian&#8221; limit 3</a></p>
<p>The result is:</p>
<ol>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;">leechajaxian<span style="color:#006600;font-weight:bold;">(</span><span style="color:#006600;font-weight:bold;">{</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">&#8220;query&#8221;</span>: <span style="color:#006600;font-weight:bold;">{</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">&#8220;count&#8221;</span>: <span style="color:#3366cc;">&#8220;3&#8243;</span>,</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">&#8220;created&#8221;</span>: <span style="color:#3366cc;">&#8220;2008-12-12T09:01:13Z&#8221;</span>,</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">&#8220;lang&#8221;</span>: <span style="color:#3366cc;">&#8220;en-US&#8221;</span>,</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">&#8220;updated&#8221;</span>: <span style="color:#3366cc;">&#8220;2008-12-12T09:01:13Z&#8221;</span>,</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">&#8220;uri&#8221;</span>: <span style="color:#3366cc;">&#8220;http://query.yahooapis.com/v1/yql?q=select+title+from+rss+where+url%3D%22http%3A%2F%2Ffeeds.feedburner.com%2Fajaxian%22+limit+3&#8243;</span>,</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">&#8220;diagnostics&#8221;</span>: <span style="color:#006600;font-weight:bold;">{</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">&#8220;url&#8221;</span>: <span style="color:#006600;font-weight:bold;">{</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">&#8220;execution-time&#8221;</span>: <span style="color:#3366cc;">&#8220;17&#8243;</span>,</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">&#8220;content&#8221;</span>: <span style="color:#3366cc;">&#8220;http://feeds.feedburner.com/ajaxian&#8221;</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#006600;font-weight:bold;">}</span>,</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">&#8220;user-time&#8221;</span>: <span style="color:#3366cc;">&#8220;22&#8243;</span>,</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">&#8220;service-time&#8221;</span>: <span style="color:#3366cc;">&#8220;17&#8243;</span>,</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">&#8220;build-version&#8221;</span>: <span style="color:#3366cc;">&#8220;2008.12.03.14:01&#8243;</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#006600;font-weight:bold;">}</span>,</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">&#8220;results&#8221;</span>: <span style="color:#006600;font-weight:bold;">{</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">&#8220;item&#8221;</span>: <span style="color:#006600;font-weight:bold;">[</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#006600;font-weight:bold;">{</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">"title"</span>: <span style="color:#3366cc;">"Travians: Sims meets Cultures, with Ajax"</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#006600;font-weight:bold;">}</span>,</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#006600;font-weight:bold;">{</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">"title"</span>: <span style="color:#3366cc;">"Cappuccino 0.6 Released"</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#006600;font-weight:bold;">}</span>,</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#006600;font-weight:bold;">{</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">"title"</span>: <span style="color:#3366cc;">"The fundamental problems with CSS3"</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#006600;font-weight:bold;">}</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#006600;font-weight:bold;">]</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#006600;font-weight:bold;">}</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#006600;font-weight:bold;">}</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#006600;font-weight:bold;">}</span><span style="color:#006600;font-weight:bold;">)</span>;<br />
You can also search the web with YQL: <a href="http://query.yahooapis.com/v1/public/yql?q=select%20title%2Cabstract%2Curl%20from%20search.web%20where%20query%3D%22json%22%20limit%203&amp;format=json&amp;callback=leechajaxian">http://query.yahooapis.com/v1/public/yql?q=select title,abstract,url from search.web where query=&#8221;json&#8221; limit 3&amp;format=json&amp;callback=leechajaxian</a></div>
</li>
</ol>
<ol>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;">leechajaxian<span style="color:#006600;font-weight:bold;">(</span><span style="color:#006600;font-weight:bold;">{</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">&#8220;query&#8221;</span>: <span style="color:#006600;font-weight:bold;">{</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">&#8220;count&#8221;</span>: <span style="color:#3366cc;">&#8220;3&#8243;</span>,</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">&#8220;created&#8221;</span>: <span style="color:#3366cc;">&#8220;2008-12-12T09:06:41Z&#8221;</span>,</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">&#8220;lang&#8221;</span>: <span style="color:#3366cc;">&#8220;en-US&#8221;</span>,</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">&#8220;updated&#8221;</span>: <span style="color:#3366cc;">&#8220;2008-12-12T09:06:41Z&#8221;</span>,</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">&#8220;uri&#8221;</span>: <span style="color:#3366cc;">&#8220;http://query.yahooapis.com/v1/yql?q=select+title%2Cabstract%2Curl+from+search.web+where+query%3D%22json%22+limit+3&#8243;</span>,</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">&#8220;diagnostics&#8221;</span>: <span style="color:#006600;font-weight:bold;">{</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">&#8220;url&#8221;</span>: <span style="color:#006600;font-weight:bold;">{</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">&#8220;execution-time&#8221;</span>: <span style="color:#3366cc;">&#8220;43&#8243;</span>,</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">&#8220;content&#8221;</span>: <span style="color:#3366cc;">&#8220;http://boss.yahooapis.com/ysearch/web/v1/json?count=10&amp;start=0&amp;format=xml&#8221;</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#006600;font-weight:bold;">}</span>,</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">&#8220;user-time&#8221;</span>: <span style="color:#3366cc;">&#8220;45&#8243;</span>,</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">&#8220;service-time&#8221;</span>: <span style="color:#3366cc;">&#8220;43&#8243;</span>,</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">&#8220;build-version&#8221;</span>: <span style="color:#3366cc;">&#8220;2008.12.03.14:01&#8243;</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#006600;font-weight:bold;">}</span>,</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">&#8220;results&#8221;</span>: <span style="color:#006600;font-weight:bold;">{</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">&#8220;result&#8221;</span>: <span style="color:#006600;font-weight:bold;">[</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#006600;font-weight:bold;">{</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">"abstract"</span>: <span style="color:#3366cc;">"Introducing &lt;b&gt;JSON&lt;/b&gt; &lt;b&gt;...&lt;/b&gt; &lt;b&gt;JSON&lt;/b&gt; (JavaScript Object Notation) is a lightweight data-interchange format. &lt;b&gt;...&lt;/b&gt; &lt;b&gt;JSON&lt;/b&gt; is a text format that is completely language &lt;b&gt;...&lt;/b&gt;"</span>,</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">"title"</span>: <span style="color:#3366cc;">"&lt;b&gt;JSON&lt;/b&gt;"</span>,</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">"url"</span>: <span style="color:#3366cc;">"http://www.json.org/"</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#006600;font-weight:bold;">}</span>,</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#006600;font-weight:bold;">{</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">"abstract"</span>: <span style="color:#3366cc;">"The &lt;b&gt;JSON&lt;/b&gt; format is specified in RFC 4627 by Douglas Crockford. &lt;b&gt;...&lt;/b&gt; Although &lt;b&gt;JSON&lt;/b&gt; was based on a subset of the JavaScript programming language &lt;b&gt;...&lt;/b&gt;"</span>,</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">"title"</span>: <span style="color:#3366cc;">"&lt;b&gt;JSON&lt;/b&gt; - Wikipedia, the free encyclopedia"</span>,</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">"url"</span>: <span style="color:#3366cc;">"http://en.wikipedia.org/wiki/JSON"</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#006600;font-weight:bold;">}</span>,</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#006600;font-weight:bold;">{</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">"abstract"</span>: <span style="color:#3366cc;">"Matthew Morley has posted his PHP library for &lt;b&gt;JSON&lt;/b&gt;-RPC 2.0. &lt;b&gt;...&lt;/b&gt; I am think it is great to see the expanding &lt;b&gt;JSON&lt;/b&gt; toolset available in JavaScript libraries. &lt;b&gt;...&lt;/b&gt;"</span>,</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">"title"</span>: <span style="color:#3366cc;">"&lt;b&gt;JSON&lt;/b&gt;"</span>,</div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#3366cc;">"url"</span>: <span style="color:#3366cc;">"http://www.json.com/"</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#006600;font-weight:bold;">}</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#006600;font-weight:bold;">]</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#006600;font-weight:bold;">}</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#006600;font-weight:bold;">}</span></div>
</li>
<li>
<div style="color:#000000;font-family:'Courier New',Courier,monospace;font-weight:normal;"><span style="color:#006600;font-weight:bold;">}</span><span style="color:#006600;font-weight:bold;">)</span>;</div>
</li>
</ol>
<p>What about screenscraping? You can get data from any valid HTML document using XPATH with select * from html. For example to get the first 3 tag links on my blog you can do the following:</p>
<p><a href="http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url%3D%22http%3A%2F%2Fwait-till-i.com%22%20and%20xpath%3D%27%2F%2Fa%5B%40rel%3D%22tag%22%5D%27%20limit%203&amp;format=json&amp;callback=leechajaxian">http://query.yahooapis.com/v1/public/yql?q=select * from html where url=&#8221;http://wait-till-i.com&#8221; and xpath=&#8217;//a[@rel="tag"]&#8216; limit 3&amp;format=json&amp;callback=leechajaxian</a></p>
<p>The team is working on making this easier &#8211; while we run every page that is indexed through tidy there is still a lot of choking going on (if people wrote valid HTML that wouldn&#8217;t happen).</p>
<p>YQL is a pretty easy but also versatile language. You can even use complex aggregation and filtering by for example hosting a lot of URLs in a spreadsheet and loading them one by one before aggregating. The example given in the console is &#8220;select * from rss where url in (select title from atom where url=&#8221;http://spreadsheets.google.com/feeds/list/pg_T0Mv3iBwIJoc82J1G8aQ/od6/public/basic&#8221;) and description like &#8220;Wall Street&#8221; LIMIT 10 | unique(field=&#8221;title&#8221;)&#8221;</p>
<p>Happy converting!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vjayblog.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vjayblog.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vjayblog.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vjayblog.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vjayblog.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vjayblog.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vjayblog.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vjayblog.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vjayblog.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vjayblog.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vjayblog.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vjayblog.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vjayblog.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vjayblog.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vjayblog.wordpress.com&amp;blog=6034814&amp;post=20&amp;subd=vjayblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vjayblog.wordpress.com/2009/01/03/yql-converting-the-web-to-json-with-mock-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/661e92c3cee302e518b80d18df52bf34?s=96&#38;d=identicon" medium="image">
			<media:title type="html">vjayblog</media:title>
		</media:content>

		<media:content url="http://ajaxian.com/wp-content/uploads/console.jpg" medium="image">
			<media:title type="html">The YQL console</media:title>
		</media:content>
	</item>
		<item>
		<title>Why Load Testing Ajax is Hard</title>
		<link>http://vjayblog.wordpress.com/2009/01/03/why-load-testing-ajax-is-hard/</link>
		<comments>http://vjayblog.wordpress.com/2009/01/03/why-load-testing-ajax-is-hard/#comments</comments>
		<pubDate>Sat, 03 Jan 2009 08:38:36 +0000</pubDate>
		<dc:creator>vjayblog</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://vjayblog.wordpress.com/?p=18</guid>
		<description><![CDATA[Today we are fortunate to have a guest post by Patrick Lightbody, most recently of BrowserMob fame (and previously Selenium work, OpenQA, WebWork, and more). Let’s listen in to him talk to us about load testing, and let him know your thoughts in the comments below: I’ve been developing and testing complex web apps for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vjayblog.wordpress.com&amp;blog=6034814&amp;post=18&amp;subd=vjayblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><em>Today we are fortunate to have a guest post by Patrick Lightbody, most recently of BrowserMob fame (and previously Selenium work, OpenQA, WebWork, and more). Let’s listen in to him talk to us about load testing, and let him know your thoughts in the comments below:</em></p>
<p>I’ve been developing and testing complex web apps for a long time. I was the co-creator of WebWork (now <a href="http://struts.apache.org/">Struts 2.0</a>) and an early champion of <a href="http://directwebremoting.org/">DWR</a>, writing one of the first AJAX form validation frameworks for Java web apps. But over the years, I noticed that as our web technologies and techniques got more sophisticated, our testing techniques were not keeping up.</p>
<p>That was why I founded <a href="http://openqa.org/">OpenQA</a> and helped grow <a href="http://seleniumhq.org/">Selenium</a> to the popular testing tool that it is today. Selenium helps with <strong>functional testing</strong> of complex AJAX apps, but there isn’t an equivalent for load testing, which is why I started <a href="http://browsermob.com/">BrowserMob</a>, a new type of load testing service.<span id="more-18"></span></p>
<p><strong>Traditional load testing</strong></p>
<p>In order to achieve high levels of concurrency, traditional load testing tools (both open source and commercial) work by sending large numbers of HTTP requests as a way to simulate many concurrent users interacting with your web page. These tools work by recording the traffic that comes from a browser session and then requiring that the load tester tweak a generated script so that it worked properly when played back X times concurrently.</p>
<p>Common problems would be that the initial recording would embed in cookie values that were tied to individual sessions. Additional unique state might be encoded in other hidden form elements, all of which required some fine tuning after the fact. If you’ve ever tried to run a load test, this is probably a very familiar process. It has worked reasonably well up until recent years, but AJAX has made this process even more difficult.</p>
<p><strong>Ajax + load testing = hard</strong></p>
<p>The reason Ajax has complicated things is that it encourages more logic and state to run inside the browser session. This means that just watching the traffic across the wire doesn’t necessarily tell the full story. The richer an app gets, the more difficult it gets to simulate the exact effects of hundreds or thousands of users hitting your site.</p>
<p>This is the problem I decided to solve when I started BrowserMob. It’s on-demand, low-cost and uses <strong>real browsers</strong> to completely change the way load testing is <strong>recorded</strong> and <strong>played</strong> back.</p>
<p><strong>Do real browsers really matter?</strong></p>
<p>Real browsers absolutely matter. There are two major reasons:</p>
<ol>
<li>It simplifies the script creation process by letting you avoid all the complexities and hacks you have to do with traditional load testing tools.</li>
<li>It ensures that you’ll see 100% of the traffic and load against your site that a real user would cause.</li>
</ol>
<p>We’ll look in-depth at each of these topics separately to see how use of real browsers helps and how a service like BrowserMob compares to existing load testing technologies.</p>
<p><strong>Simplifies script creation</strong></p>
<p>In today’s modern web applications, AJAX is just about everywhere. And we’re not necessarily talking about super rich applications like Google Maps or Yahoo Mail, but even simple sites like <a href="http://google.com/">google.com</a> now use advanced AJAX techniques. See Google’s auto-complete for a real-world example:</p>
<p><img class="alignnone size-full wp-image-5541" title="google1" src="http://ajaxian.com/wp-content/uploads/google1.png" alt="" width="400" height="338" /></p>
<p>In this case, when typing values in to the search box, the web browser executes JavaScript logic that in turn makes AJAX calls to Google’s search engine, asking for search suggestions to display. It does this on every keystroke that the user types in. This is a standard auto-complete control that most Ajaxian readers are very familiar with.</p>
<p>When recording a script with a traditional load testing tool, one of two things may happen here:</p>
<ul>
<li>The recorder will see the AJAX traffic and capture it for playback in the load test</li>
<li>The record will not see the AJAX traffic and will only capture the request made when the user clicks the “submit” button</li>
</ul>
<p>Obviously these Ajax requests are causing real load, so we want to make sure they get played back in a load test. Let’s assume you’re using a tool, such as JMeter, that does capture the AJAX traffic. Here’s what that looks like:</p>
<p><img class="alignnone size-full wp-image-5540" title="jmeter" src="http://ajaxian.com/wp-content/uploads/jmeter.png" alt="" width="207" height="211" /></p>
<p>The recorded traffic is effectively:</p>
<pre>http://clients1.google.com/complete/search?hl=en&amp;gl=us&amp;q=b
http://clients1.google.com/complete/search?hl=en&amp;gl=us&amp;q=ba
http://clients1.google.com/complete/search?hl=en&amp;gl=us&amp;q=ban
http://clients1.google.com/complete/search?hl=en&amp;gl=us&amp;q=bana
http://clients1.google.com/complete/search?hl=en&amp;gl=us&amp;q=banan
http://clients1.google.com/complete/search?hl=en&amp;gl=us&amp;q=banana</pre>
<p>Each key stroke by the user is included in each subsequent search term. Let’s ignore the requirement of validating the results that come back from the AJAX requests for the moment (they are usually in JSON or XML format and difficult to validate using most tools). Instead, let’s just add a twist to the load test requirement for doing searches: <em>the load test must search from 100 different search terms</em>.</p>
<p><strong>Parameterization</strong> is very common requirement, since it ensures that the load is realistic and doesn’t get cached in any unnatural way. This means that now in addition to searching for the term “banana”, we’re also searching for “apple”, and “orange”, among others.</p>
<p>However, this means your script can’t just blindly submit requests to those previous URLs either, since those were tied to the “banana” term. Instead, they must search for the sequential characters of the respective search term, such as:</p>
<pre>http://clients1.google.com/complete/search?hl=en&amp;gl=us&amp;q=a
http://clients1.google.com/complete/search?hl=en&amp;gl=us&amp;q=ap
http://clients1.google.com/complete/search?hl=en&amp;gl=us&amp;q=app
http://clients1.google.com/complete/search?hl=en&amp;gl=us&amp;q=appl
http://clients1.google.com/complete/search?hl=en&amp;gl=us&amp;q=apple</pre>
<p>Unfortunately, this is where even the best traditional load testing tools fall down. They don’t provide any help here, so it’s up to you to figure out how to, if it’s even possible, write complex scripting logic that breaks down the randomly selected search term by characters and then subsequently issue Ajax requests for each character in the term.</p>
<p>At this point, you’re basically rewriting the same logic that the web app developer wrote originally. If you’re a QA engineer, this may be difficult since you don’t know all the internal AJAX logic coded in to the application. If you’re the developer, it’s still annoying because it’s tedious and likely in a language other than the original JavaScript that you wrote your code in.</p>
<p><strong>So how do real browsers help?</strong></p>
<p>Because BrowserMob uses real browsers to both record and playback load, that means you don’t have to worry about trying to simulate the logic in a web browser. Instead, all you have to do is record the human interaction with the browser, such as typing in a randomly selected search term. BrowserMob will then pass those instructions on to the hundreds or thousands of browsers participating in the load test, and those browsers will in turn “do the right thing” and issue the proper AJAX requests.</p>
<p>And if the underlying logic, such as the request URL pattern for those AJAX requests, changes? With traditional load testing it’s up to you to detect and fix the problem. If your test uses real browsers to play back the traffic, your script won’t need to change one bit &#8211; the new AJAX logic will be run by the browser in real time.</p>
<p><strong>Ensuring realistic playback</strong></p>
<p>We’ve seen how use of real browsers helps with script creation, but what about playback? As we just learned, using real browsers simplifies the process of recording and shrinks the behavior coded in to the script itself. This means we’re letting the real browser &#8211; the same type of program your end users will use &#8211; make the decisions about what requests to make.</p>
<p>For example, when visiting http://ebay.com you might see the following page:</p>
<p><img class="alignnone size-full wp-image-5538" title="ebay1" src="http://ajaxian.com/wp-content/uploads/ebay1.jpg" alt="" width="480" height="320" /></p>
<p>But reload the page and now you might see this:</p>
<p><img class="alignnone size-full wp-image-5539" title="ebay2" src="http://ajaxian.com/wp-content/uploads/ebay2.jpg" alt="" width="480" height="322" /></p>
<p>Notice a difference? The upper right section has completely different images displayed. That’s because eBay’s home page chooses what to display based on complex and multi-variant logic determined at runtime. It’s quite likely that it’s going to be impossible for a load tester to know which images will be displayed on any given request.</p>
<p>It’s true that some load testing tools will try to parse the pages in real time and figure out which images should be displayed, but that’s hardly comforting once you’ve already learned they can’t deal with even the most simply Ajax components, as we just saw. And as most AJAX developers know, resources such as images and stylesheets are more and more likely to come from complex JavaScript logic and not due to a simple static reference in an HTML page.</p>
<p>Instead, the only way to guarantee that every single object (image, JavaScript, AJAX request, advertisement from an ad partner, etc) gets requested is to use a real web browser during playback. While it is much more resource intensive, it is also a major time saver on both the front-end, as scripts are much simpler to write, and the back-end, as you can be confident that the most realistic level of load was produced.</p>
<p>So next time you hear of load testing happening on one of your Ajax apps, make sure those doing the testing understand the complexities and difficulties associated with testing a complex web app. Help them be on the lookout for the issues highlighted here.</p>
<p><em>Thanks to Patrick for writing this. Do you have something important to say? If so, <a href="mailto:ajaxians@ajaxian.com">contact us</a> with your idea!</em></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vjayblog.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vjayblog.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vjayblog.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vjayblog.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vjayblog.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vjayblog.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vjayblog.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vjayblog.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vjayblog.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vjayblog.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vjayblog.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vjayblog.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vjayblog.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vjayblog.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vjayblog.wordpress.com&amp;blog=6034814&amp;post=18&amp;subd=vjayblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vjayblog.wordpress.com/2009/01/03/why-load-testing-ajax-is-hard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/661e92c3cee302e518b80d18df52bf34?s=96&#38;d=identicon" medium="image">
			<media:title type="html">vjayblog</media:title>
		</media:content>

		<media:content url="http://ajaxian.com/wp-content/uploads/google1.png" medium="image">
			<media:title type="html">google1</media:title>
		</media:content>

		<media:content url="http://ajaxian.com/wp-content/uploads/jmeter.png" medium="image">
			<media:title type="html">jmeter</media:title>
		</media:content>

		<media:content url="http://ajaxian.com/wp-content/uploads/ebay1.jpg" medium="image">
			<media:title type="html">ebay1</media:title>
		</media:content>

		<media:content url="http://ajaxian.com/wp-content/uploads/ebay2.jpg" medium="image">
			<media:title type="html">ebay2</media:title>
		</media:content>
	</item>
		<item>
		<title>I won’t support IE 6 in 2009</title>
		<link>http://vjayblog.wordpress.com/2009/01/03/i-won%e2%80%99t-support-ie-6-in-2009/</link>
		<comments>http://vjayblog.wordpress.com/2009/01/03/i-won%e2%80%99t-support-ie-6-in-2009/#comments</comments>
		<pubDate>Sat, 03 Jan 2009 08:35:51 +0000</pubDate>
		<dc:creator>vjayblog</dc:creator>
				<category><![CDATA[Browser]]></category>

		<guid isPermaLink="false">http://vjayblog.wordpress.com/?p=16</guid>
		<description><![CDATA[At a New Years Eve party, a friend help up a drink and toasted to his company deciding to discontinue direct support of IE 6 in 2009, and letting users know that the site may work better with IE 7 or another latest browser. Then, Asa Dotzer puts up a chart of the IE 6 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vjayblog.wordpress.com&amp;blog=6034814&amp;post=16&amp;subd=vjayblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>At a New Years Eve party, a friend help up a drink and toasted to his company deciding to discontinue direct support of IE 6 in 2009, and letting users know that the site may work better with IE 7 or another latest browser.</p>
<p>Then, Asa Dotzer puts up a<span style="text-decoration:underline;"><strong> chart of the IE 6 numbers</strong></span>:</p>
<p><img src="http://farm4.static.flickr.com/3266/3159496996_e995d120a0_o.png" alt="" /></p>
<p><span id="more-16"></span>Still far too high a percentage and enough to make you grown. Also, the last few pounds are the hardest to lose. The good news for me is that on most Web applications that I personally work, and definitely those that I work on in early 2009 will have much different numbers.</p>
<p>Maybe IE 8, Windows 7, and the great new browser war will help, or maybe some percentage is for lost computer souls.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vjayblog.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vjayblog.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vjayblog.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vjayblog.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vjayblog.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vjayblog.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vjayblog.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vjayblog.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vjayblog.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vjayblog.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vjayblog.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vjayblog.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vjayblog.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vjayblog.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vjayblog.wordpress.com&amp;blog=6034814&amp;post=16&amp;subd=vjayblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vjayblog.wordpress.com/2009/01/03/i-won%e2%80%99t-support-ie-6-in-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/661e92c3cee302e518b80d18df52bf34?s=96&#38;d=identicon" medium="image">
			<media:title type="html">vjayblog</media:title>
		</media:content>

		<media:content url="http://farm4.static.flickr.com/3266/3159496996_e995d120a0_o.png" medium="image" />
	</item>
		<item>
		<title>the secret of PHP</title>
		<link>http://vjayblog.wordpress.com/2009/01/03/the-secret-of-php/</link>
		<comments>http://vjayblog.wordpress.com/2009/01/03/the-secret-of-php/#comments</comments>
		<pubDate>Sat, 03 Jan 2009 08:29:48 +0000</pubDate>
		<dc:creator>vjayblog</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://vjayblog.wordpress.com/?p=13</guid>
		<description><![CDATA[So, another “PHP sucks” post, this time from Jeff Atwood. He actually ends up even kind of praising PHP, surprised by its success. I have a couple of thoughts on that topic too. First, people really need to stop reading something on PHP written somewhere in 2005 (probably about experiences that happened in 2001) and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vjayblog.wordpress.com&amp;blog=6034814&amp;post=13&amp;subd=vjayblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="entrytext">
<div class="snap_preview">
<p>So, another <a href="http://www.codinghorror.com/blog/archives/001119.html">“PHP sucks”</a> post, this time from Jeff Atwood. He actually ends up even kind of praising PHP, surprised by its success. I have a couple of thoughts on that topic too.</p>
<p>First, people really need to stop reading something on PHP written somewhere in 2005 (probably about experiences that happened in 2001) and apply it to PHP as it is now, without even checking around for current trends. It’s as if people would dig up books from middle ages saying that there are only <a title="Fe Cu Ag Sn Au Hg Pb" href="http://elements.vanderkrogt.net/fecu.html">seven metals</a> in existence or debating about <a href="http://en.wikipedia.org/wiki/Phlogiston">phlogiston</a>, and would use it speaking about the modern chemistry. Come on!<span id="more-13"></span></p>
<p>Then the next thing apparently wrong with PHP is too many functions. Right. Since when? Since when having a lot of functions is a problem? Does it hurt anybody? Does it make writing PHP code harder? Does it make programmer less successful in achieving his goals?<br />
About keywords I could kind of understand &#8211; OK, a lot to remember (though I didn’t see anybody really having trouble to remember such complicated keywords as “while”, “if”, “class” or “public”) and it takes out some good English words that could be used as function/method names to confuse the enemy (who wouldn’t want to have function named endforeach() or static(), not to mention function()? too bad those are not available!). But complaining there’s too many actual functions that allow you to do real useful stuff? <strong>That </strong> is the thing that is bothering people? <strong>That</strong> is what scares people away from using the language “for years”?</p>
<p>The next beef with PHP is that people write sucky code on it. No, really, they do? Must be something really wrong with this language. It’s not like people write <a href="http://thedailywtf.com/Series/2008/4/CodeSOD.aspx">mind-bogglingly sucky code</a> on every other “good” language on the planet. But I get it. The intent was &#8211; PHP makes easy to write sucky code. Yes, this is true. As true as “Porsche 997 makes it easy to drive at 100mph into a brick wall”.  PHP makes it easy to write various kinds of code &#8211; and if 90% of code written is sucky, then 90% of PHP code would be sucky. But my experience says quality of the production code almost never has much to do with the language, but only with the culture &#8211; organizational and personal, and with choosing right ways to do the job. The rest is just bad statistics in play. Like “I know 7-year-old writing websites, and his PHP code sucks”. I bet his Haskell code rules though <img class="wp-smiley" src="http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif?w=480" alt=";)" /></p>
<p>That’s not to say PHP couldn’t use improvement. It could. And <a href="http://wiki.php.net/doc/scratchpad/upgrade/53">it does, actually</a> &#8211; and there’s enough room for improvement still, in many areas. But it probably would never satisfy purists. It’s practical. Maybe it doesn’t allow you to write whole programs in one line of <a href="http://en.wikipedia.org/wiki/J_%28programming_language%29">uncomprehensible character soup</a> or play with high-level <a href="http://en.wikipedia.org/wiki/Category_theory">math theory concepts</a>, but it allows people to write web applications. So they do &#8211; so where’s the surprise when one morning somebody wakes up and discovers there’s a ton of web applications around and they are written in PHP? <img class="wp-smiley" src="http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif?w=480" alt=")" /></p>
<p>P.S. I wish for every 50 “PHP sucks” blogs people would write one good <a href="http://wiki.php.net/rfc">RFC</a>.</div>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vjayblog.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vjayblog.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vjayblog.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vjayblog.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vjayblog.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vjayblog.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vjayblog.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vjayblog.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vjayblog.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vjayblog.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vjayblog.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vjayblog.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vjayblog.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vjayblog.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vjayblog.wordpress.com&amp;blog=6034814&amp;post=13&amp;subd=vjayblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vjayblog.wordpress.com/2009/01/03/the-secret-of-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/661e92c3cee302e518b80d18df52bf34?s=96&#38;d=identicon" medium="image">
			<media:title type="html">vjayblog</media:title>
		</media:content>

		<media:content url="http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif" medium="image">
			<media:title type="html">;)</media:title>
		</media:content>

		<media:content url="http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif" medium="image">
			<media:title type="html">)</media:title>
		</media:content>
	</item>
		<item>
		<title>Blog Goals for 2009</title>
		<link>http://vjayblog.wordpress.com/2009/01/03/blog-goals-for-2009/</link>
		<comments>http://vjayblog.wordpress.com/2009/01/03/blog-goals-for-2009/#comments</comments>
		<pubDate>Sat, 03 Jan 2009 08:24:34 +0000</pubDate>
		<dc:creator>vjayblog</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://vjayblog.wordpress.com/?p=10</guid>
		<description><![CDATA[My blog grew substantially during 2008. I gained thousands more RSS subscribers, my MooTools skills took a giant leap, and I even branched out in jQuery a little bit. That said, I feel like the blog just beginning. I’ve outlined some goals for 2009 — any feedback or requests would be appreciated. 1. New Redesign [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vjayblog.wordpress.com&amp;blog=6034814&amp;post=10&amp;subd=vjayblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>My blog grew substantially during 2008. I gained thousands more RSS subscribers, my MooTools skills took a giant leap, and I even branched out in jQuery a little bit. That said, I feel like the blog just beginning. I’ve outlined some goals for 2009 — any feedback or requests would be appreciated.</strong></p>
<h2>1.  New Redesign</h2>
<p>I’m not happy with the current “design”. It’s too plain and even though I’m not a designer, I think I could do a lot better. I have a new redesign that’s about 25% done that I really love so far and hope to get out by February 1st. I will be giving peeks via <a href="http://twitter.com/davidwalshblog">Twitter</a> very soon.</p>
<h2>2.  Walk the Walk</h2>
<p>I write a lot of useful MooTools scripts. The problem is that I don’t actually use many of them on my site. My goal is to avoid overdoing my the MooTools “flash bang” effects but tastefully add enhancements here and there. I think people will like the new effects a lot.<span id="more-10"></span></p>
<h2>3.  More Interaction</h2>
<p>I’ve recently implemented polls and I’m going to strive to get more of a “community” feel for the site. I may also add a very basic chat feature in the sidebar. I’d also like to schedule a monthly chat session where I’m available for questions about both web and non-web topics. Not sure how many people would be interested in that though. I’ve decided not to implement forums.</p>
<h2>4.  Continue the Moo-foolery</h2>
<p>I want to continue to write interesting and thought-provoking Moo scripts. This includes original works and ports of existing jQuery / Prototype scripts. MooTools has made writing javascript (and subsequent MooTools posts) fun and I hope my enthusiasm for it becomes infectious.</p>
<h2>5.  Create a Facebook App or WordPress Plugin</h2>
<p>I’ve been putting off doing either of these because of the amount of maintenance that goes into them. I don’t want to release a plugin and then let it go to crap. Hopefully I find the inspiration to follow through on creating a great plugin or app.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vjayblog.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vjayblog.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vjayblog.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vjayblog.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vjayblog.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vjayblog.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vjayblog.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vjayblog.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vjayblog.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vjayblog.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vjayblog.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vjayblog.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vjayblog.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vjayblog.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vjayblog.wordpress.com&amp;blog=6034814&amp;post=10&amp;subd=vjayblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vjayblog.wordpress.com/2009/01/03/blog-goals-for-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/661e92c3cee302e518b80d18df52bf34?s=96&#38;d=identicon" medium="image">
			<media:title type="html">vjayblog</media:title>
		</media:content>
	</item>
		<item>
		<title>Web Predictions For 2009</title>
		<link>http://vjayblog.wordpress.com/2009/01/03/web-predictions-for-2009/</link>
		<comments>http://vjayblog.wordpress.com/2009/01/03/web-predictions-for-2009/#comments</comments>
		<pubDate>Sat, 03 Jan 2009 08:22:38 +0000</pubDate>
		<dc:creator>vjayblog</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://vjayblog.wordpress.com/?p=8</guid>
		<description><![CDATA[A new year usually brings hope of better things. It also bring expectations and wonder. Here are my (unfounded) web predictions for 2009. 1. A Javascript Framework Will Fall I believe that a javascript framework will fall in 2009. I really wouldn’t be shocked to see one go. I don’t want to share which I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vjayblog.wordpress.com&amp;blog=6034814&amp;post=8&amp;subd=vjayblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>A new year usually brings hope of better things. It also bring expectations and wonder. Here are my (unfounded) web predictions for 2009.</strong></p>
<h2>1.  A Javascript Framework Will Fall</h2>
<p>I believe that a javascript framework will fall in 2009. I really wouldn’t be shocked to see one go. I don’t want to share which I think will fall, but the popularity of jQuery, coupled with the lack of progress being made on a few of them, makes me feel as though at least one will die off.</p>
<hr />
<h2>2.  Firefox’s Usage Will Grow Tremendously…</h2>
<p>I believe more businesses will steer their employees toward using Mozilla Firefox and thus increase Firefox’s usage. Internet Explorer’s sluggish performance coupled with Firefox’s feature set will make IE a secondary browser for many businesses.</p>
<hr />
<h2>3.  …But IE Will Continue Its Reign</h2>
<p>Too many users simply take what they’re given and this will not change. Internet Explorer 6 and 7, and on a lower usage level 8, will continue to dominate the browser market share.</p>
<hr />
<h2>4.  MooTools’ Popularity Will Grow</h2>
<p>MooTools will release a plugin forge which will quickly become a treasure chest that will attract many web developers.</p>
<hr />
<h2>5.  Developers Find Out:  Knowing One Framework Isn’t Good Enough</h2>
<p>While being an expert with on javascript framework is great, developers will realize that knowing one framework isn’t good enough. Porting plugins from a different framework to the developer’s preferred framework will become tiresome and the process of reinventing the wheel will be the motivation pick up another framework.</p>
<hr />
<p>Have any predictions of your own?  Am I crazy?  Share!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vjayblog.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vjayblog.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vjayblog.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vjayblog.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vjayblog.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vjayblog.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vjayblog.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vjayblog.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vjayblog.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vjayblog.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vjayblog.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vjayblog.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vjayblog.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vjayblog.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vjayblog.wordpress.com&amp;blog=6034814&amp;post=8&amp;subd=vjayblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vjayblog.wordpress.com/2009/01/03/web-predictions-for-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/661e92c3cee302e518b80d18df52bf34?s=96&#38;d=identicon" medium="image">
			<media:title type="html">vjayblog</media:title>
		</media:content>
	</item>
		<item>
		<title>Read PDF and Word DOC Files Using PHP</title>
		<link>http://vjayblog.wordpress.com/2009/01/03/read-pdf-and-word-doc-files-using-php/</link>
		<comments>http://vjayblog.wordpress.com/2009/01/03/read-pdf-and-word-doc-files-using-php/#comments</comments>
		<pubDate>Sat, 03 Jan 2009 08:18:38 +0000</pubDate>
		<dc:creator>vjayblog</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://vjayblog.wordpress.com/?p=4</guid>
		<description><![CDATA[One of my customers has an insane amount of PDF and Microsoft Word DOC files on their website. It’s core to their online services so it’s not as though they’re garbage files up on the server. My customer wanted their website’s search engine (Sphider) to read these PDF files and DOC files so that their [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vjayblog.wordpress.com&amp;blog=6034814&amp;post=4&amp;subd=vjayblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>One of my customers has an insane amount of PDF and Microsoft Word DOC files on their website. It’s core to their online services so it’s not as though they’re garbage files up on the server. My customer wanted their website’s search engine (Sphider) to read these PDF files and DOC files so that their clients could get at the documents they needed without going through a bunch of summary pages to get them. I was successful in the task, so let me show you how to read PDF and DOC files using PHP.</p>
<h2>Reading PDF Files</h2>
<p>To read PDF files, you will need to install the <a rel="nofollow" href="http://www.foolabs.com/xpdf/about.html">XPDF package</a>, which includes “pdftotext.”  Once you have XPDF/pdftotext installed, you run the following PHP statement to get the PDF text:</p>
<p><span style="color:#00ccff;"><span class="vars">$content</span></span> = shell_exec(<span class="string">&#8216;<span style="color:#ff0000;">/usr/local/bin/pdftotext</span> &#8216;</span>.<span style="color:#00ccff;"><span class="vars">$filename</span></span>.<span class="string">&#8216; -&#8217;</span>); <span style="color:#ff6600;"><span class="comment">//dash at the end to output it</span></span></p>
<div class="dp-highlighter">
<ol class="dp-c"></ol>
</div>
<pre class="php" style="display:none;">$content = shell_exec('/usr/local/bin/pdftotext '.$filename.' -'); //dash at the end to output it</pre>
<h2>Reading DOC Files</h2>
<p>Like the PDF example above, you’ll need to download another package.  This package is called <a href="http://www.winfield.demon.nl/">Antiword</a>.  Here’s the code to grab the Word DOC content:</p>
<p><span style="color:#00ccff;"><span class="vars">$result</span></span> = shell_exec(<span class="string">&#8216;<span style="color:#ff0000;">/usr/local/bin/antiword </span>&#8216;</span>.<span style="color:#00ccff;"><span class="vars">$filename</span></span>);</p>
<div class="dp-highlighter">
<ol class="dp-c"></ol>
</div>
<pre class="php" style="display:none;">$result = shell_exec('/usr/local/bin/antiword '.$filename);</pre>
<p>The above code does NOT read DOCX files and does not (and purposely so) preserve formatting. There are other libraries that will preserve formatting but in our case, we just want to get at the text.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vjayblog.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vjayblog.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vjayblog.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vjayblog.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vjayblog.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vjayblog.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vjayblog.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vjayblog.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vjayblog.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vjayblog.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vjayblog.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vjayblog.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vjayblog.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vjayblog.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vjayblog.wordpress.com&amp;blog=6034814&amp;post=4&amp;subd=vjayblog&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vjayblog.wordpress.com/2009/01/03/read-pdf-and-word-doc-files-using-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/661e92c3cee302e518b80d18df52bf34?s=96&#38;d=identicon" medium="image">
			<media:title type="html">vjayblog</media:title>
		</media:content>
	</item>
	</channel>
</rss>
