<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Eliminating async Javascript callbacks by preprocessing</title>
	<atom:link href="http://ajaxian.com/archives/eliminating-async-javascript-callbacks-by-preprocessing/feed" rel="self" type="application/rss+xml" />
	<link>http://ajaxian.com/archives/eliminating-async-javascript-callbacks-by-preprocessing</link>
	<description>Cleaning up the web with Ajax</description>
	<lastBuildDate>Thu, 17 May 2012 07:43:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Friendly Puppy dogs</title>
		<link>http://ajaxian.com/archives/eliminating-async-javascript-callbacks-by-preprocessing/comment-page-1#comment-256675</link>
		<dc:creator>Friendly Puppy dogs</dc:creator>
		<pubDate>Sun, 07 Oct 2007 00:43:26 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/eliminating-async-javascript-callbacks-by-preprocessing#comment-256675</guid>
		<description>&quot;Itâ€™s definitely true that jwacs produces unreasonably large compiled output at the moment. Thatâ€™s part of why itâ€™s still in alpha.

Later versions will do a much better job of optimizing the size of the output, or so I hope at any rate.&quot;

I never thought of that really that way.
Gotta go anyway my dog s asking to go for the daily walk...see ya bud!</description>
		<content:encoded><![CDATA[<p>&#8220;Itâ€™s definitely true that jwacs produces unreasonably large compiled output at the moment. Thatâ€™s part of why itâ€™s still in alpha.</p>
<p>Later versions will do a much better job of optimizing the size of the output, or so I hope at any rate.&#8221;</p>
<p>I never thought of that really that way.<br />
Gotta go anyway my dog s asking to go for the daily walk&#8230;see ya bud!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas Messier</title>
		<link>http://ajaxian.com/archives/eliminating-async-javascript-callbacks-by-preprocessing/comment-page-1#comment-95127</link>
		<dc:creator>Thomas Messier</dc:creator>
		<pubDate>Sat, 16 Sep 2006 18:03:12 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/eliminating-async-javascript-callbacks-by-preprocessing#comment-95127</guid>
		<description>Thanks for that clarification James, that makes plenty of sense. I&#039;ll have to upload the code to another server and judge on the performance. I&#039;ll also be curious to study the jwacs code and see what it&#039;s up to when I get a chance, although unfortunately I have precious little time lately...</description>
		<content:encoded><![CDATA[<p>Thanks for that clarification James, that makes plenty of sense. I&#8217;ll have to upload the code to another server and judge on the performance. I&#8217;ll also be curious to study the jwacs code and see what it&#8217;s up to when I get a chance, although unfortunately I have precious little time lately&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Trav</title>
		<link>http://ajaxian.com/archives/eliminating-async-javascript-callbacks-by-preprocessing/comment-page-1#comment-95126</link>
		<dc:creator>Trav</dc:creator>
		<pubDate>Sat, 16 Sep 2006 18:01:40 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/eliminating-async-javascript-callbacks-by-preprocessing#comment-95126</guid>
		<description>Seems a weird point to make. Callbacks are how modular programming gets done. If you exclude that concept from what Harry calls &quot;simple code&quot;, you get badly written programs that get thrown away.

People will come around. A few years ago &quot;simple code&quot; probably excluded anything in javascript for many folks.</description>
		<content:encoded><![CDATA[<p>Seems a weird point to make. Callbacks are how modular programming gets done. If you exclude that concept from what Harry calls &#8220;simple code&#8221;, you get badly written programs that get thrown away.</p>
<p>People will come around. A few years ago &#8220;simple code&#8221; probably excluded anything in javascript for many folks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kris Zyp</title>
		<link>http://ajaxian.com/archives/eliminating-async-javascript-callbacks-by-preprocessing/comment-page-1#comment-94765</link>
		<dc:creator>Kris Zyp</dc:creator>
		<pubDate>Sat, 16 Sep 2006 06:33:34 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/eliminating-async-javascript-callbacks-by-preprocessing#comment-94765</guid>
		<description>There is no &quot;seemingly easy&quot; solution to having code block for AJAX calls.  You can use synchronous AJAX (one of the parameters in a XHR call) and it locks up the browser while it is waiting.  Using a while loop produces the same effect, it locks everything up while waiting for the XHR to return (and takes cpu cycles as well).  Unless you don&#039;t mind locking up people&#039;s browsers, it is absolutely necessary to maintain asynchronousness in your AJAX calls.  The complication of doing callbacks to do this grows as you nest your function calls that have AJAX endpoints. 
DOJO doesn&#039;t have it figured out either.  They have to resort synchronous (browser lock-up) to load deferred JS scripts.  Alex has some clever techniques for packaging JS files to minimize the effects, but when data script data is needed, there is still lock ups.
Compiling/preprocessing JS may seem like a bad solution to some, but in terms of creating a simpler code flow and moving towards JS as more  comprehensive development platform while maintaining proper browser behavior, I believe it well worth it.
I have been using Narrative JS for a while now (I believe that Chris Double and I are the two biggest users) and it has been wonderful for my project.  There is been a lot of thought by a lot of people on the the AJAX synchronization issue, and Neil&#039;s work has been a great contribution to this issue.  If you want to see my project it is at www.authenteo.com.
I think Chris is blogging about his work at:
http://www.bluishcoder.co.nz/2006/06/more-concurrency-in-narrative.html</description>
		<content:encoded><![CDATA[<p>There is no &#8220;seemingly easy&#8221; solution to having code block for AJAX calls.  You can use synchronous AJAX (one of the parameters in a XHR call) and it locks up the browser while it is waiting.  Using a while loop produces the same effect, it locks everything up while waiting for the XHR to return (and takes cpu cycles as well).  Unless you don&#8217;t mind locking up people&#8217;s browsers, it is absolutely necessary to maintain asynchronousness in your AJAX calls.  The complication of doing callbacks to do this grows as you nest your function calls that have AJAX endpoints.<br />
DOJO doesn&#8217;t have it figured out either.  They have to resort synchronous (browser lock-up) to load deferred JS scripts.  Alex has some clever techniques for packaging JS files to minimize the effects, but when data script data is needed, there is still lock ups.<br />
Compiling/preprocessing JS may seem like a bad solution to some, but in terms of creating a simpler code flow and moving towards JS as more  comprehensive development platform while maintaining proper browser behavior, I believe it well worth it.<br />
I have been using Narrative JS for a while now (I believe that Chris Double and I are the two biggest users) and it has been wonderful for my project.  There is been a lot of thought by a lot of people on the the AJAX synchronization issue, and Neil&#8217;s work has been a great contribution to this issue.  If you want to see my project it is at <a href="http://www.authenteo.com" rel="nofollow">http://www.authenteo.com</a>.<br />
I think Chris is blogging about his work at:<br />
<a href="http://www.bluishcoder.co.nz/2006/06/more-concurrency-in-narrative.html" rel="nofollow">http://www.bluishcoder.co.nz/2006/06/more-concurrency-in-narrative.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: toni</title>
		<link>http://ajaxian.com/archives/eliminating-async-javascript-callbacks-by-preprocessing/comment-page-1#comment-94473</link>
		<dc:creator>toni</dc:creator>
		<pubDate>Sat, 16 Sep 2006 02:52:05 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/eliminating-async-javascript-callbacks-by-preprocessing#comment-94473</guid>
		<description>What about those Dojo Deferred stuff lately? Isn&#039;t designed for stuff like this (synchronizing async&#039;d stuff)?</description>
		<content:encoded><![CDATA[<p>What about those Dojo Deferred stuff lately? Isn&#8217;t designed for stuff like this (synchronizing async&#8217;d stuff)?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Wright</title>
		<link>http://ajaxian.com/archives/eliminating-async-javascript-callbacks-by-preprocessing/comment-page-1#comment-94447</link>
		<dc:creator>James Wright</dc:creator>
		<pubDate>Sat, 16 Sep 2006 02:37:51 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/eliminating-async-javascript-callbacks-by-preprocessing#comment-94447</guid>
		<description>It&#039;s definitely true that jwacs produces unreasonably large compiled output at the moment.  That&#039;s part of why it&#039;s still in alpha.  :)

Later versions will do a much better job of optimizing the size of the output, or so I hope at any rate.

Running a busy loop as you wait is a good way to burn a &lt;em&gt;lot&lt;/em&gt; of CPU.  Thomas, I bet your request was coming back slowly precisely because the server was on localhost.  The busy loop was pegging the CPU and so the server had trouble responding.  (At least, that&#039;s what happened to me when I tried it).</description>
		<content:encoded><![CDATA[<p>It&#8217;s definitely true that jwacs produces unreasonably large compiled output at the moment.  That&#8217;s part of why it&#8217;s still in alpha.  :)</p>
<p>Later versions will do a much better job of optimizing the size of the output, or so I hope at any rate.</p>
<p>Running a busy loop as you wait is a good way to burn a <em>lot</em> of CPU.  Thomas, I bet your request was coming back slowly precisely because the server was on localhost.  The busy loop was pegging the CPU and so the server had trouble responding.  (At least, that&#8217;s what happened to me when I tried it).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas Messier</title>
		<link>http://ajaxian.com/archives/eliminating-async-javascript-callbacks-by-preprocessing/comment-page-1#comment-94217</link>
		<dc:creator>Thomas Messier</dc:creator>
		<pubDate>Fri, 15 Sep 2006 21:32:15 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/eliminating-async-javascript-callbacks-by-preprocessing#comment-94217</guid>
		<description>Hmmmm, interesting... I just ran into that problem the other day and I tried to do just what the person above suggests. Basically I had a variable tracking if a response had been received, and a while loop going as long as that variable was set to false. Problem was, the page would kind of hang, and a request that would normally come back quickly (hell, I was working on localhost!) would take a little while to process. Curious to see what these folks have done, although a quick glance at jwacs is a bit discouraging. The simplest of code meant to just fetch a page results in something like 600 lines of compiled javascript. Seems like overkill.</description>
		<content:encoded><![CDATA[<p>Hmmmm, interesting&#8230; I just ran into that problem the other day and I tried to do just what the person above suggests. Basically I had a variable tracking if a response had been received, and a while loop going as long as that variable was set to false. Problem was, the page would kind of hang, and a request that would normally come back quickly (hell, I was working on localhost!) would take a little while to process. Curious to see what these folks have done, although a quick glance at jwacs is a bit discouraging. The simplest of code meant to just fetch a page results in something like 600 lines of compiled javascript. Seems like overkill.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Gahl</title>
		<link>http://ajaxian.com/archives/eliminating-async-javascript-callbacks-by-preprocessing/comment-page-1#comment-93781</link>
		<dc:creator>Ryan Gahl</dc:creator>
		<pubDate>Fri, 15 Sep 2006 14:18:15 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/eliminating-async-javascript-callbacks-by-preprocessing#comment-93781</guid>
		<description>Well if the while loop is wrong, you better right it :-)</description>
		<content:encoded><![CDATA[<p>Well if the while loop is wrong, you better right it :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mario</title>
		<link>http://ajaxian.com/archives/eliminating-async-javascript-callbacks-by-preprocessing/comment-page-1#comment-93757</link>
		<dc:creator>Mario</dc:creator>
		<pubDate>Fri, 15 Sep 2006 13:53:12 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/eliminating-async-javascript-callbacks-by-preprocessing#comment-93757</guid>
		<description>as i write &#039;right&#039; instead of &#039;write&#039; heheh i crack myself up 8P</description>
		<content:encoded><![CDATA[<p>as i write &#8216;right&#8217; instead of &#8216;write&#8217; heheh i crack myself up 8P</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mario</title>
		<link>http://ajaxian.com/archives/eliminating-async-javascript-callbacks-by-preprocessing/comment-page-1#comment-93755</link>
		<dc:creator>Mario</dc:creator>
		<pubDate>Fri, 15 Sep 2006 13:52:32 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/archives/eliminating-async-javascript-callbacks-by-preprocessing#comment-93755</guid>
		<description>This seems like way way way overkill just to get the ajax issues undercontrol. Who though hmmm recompiling every js file i use is a greate idea??? Why not just use a framework that incorps the seemingly easy delay method into it... is it hard to right a while loop???</description>
		<content:encoded><![CDATA[<p>This seems like way way way overkill just to get the ajax issues undercontrol. Who though hmmm recompiling every js file i use is a greate idea??? Why not just use a framework that incorps the seemingly easy delay method into it&#8230; is it hard to right a while loop???</p>
]]></content:encoded>
	</item>
</channel>
</rss>

