<?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: LABjs: Simple abstraction for loading dependencies correctly</title>
	<atom:link href="http://ajaxian.com/archives/labjs-simple-abstraction-for-loading-dependencies-correctly/feed" rel="self" type="application/rss+xml" />
	<link>http://ajaxian.com/archives/labjs-simple-abstraction-for-loading-dependencies-correctly</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: celalit</title>
		<link>http://ajaxian.com/archives/labjs-simple-abstraction-for-loading-dependencies-correctly/comment-page-1#comment-275892</link>
		<dc:creator>celalit</dc:creator>
		<pubDate>Sat, 10 Oct 2009 07:22:21 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=7019#comment-275892</guid>
		<description>it is hiding controls in IE. check below code





    Calendar Control
    
    
            function LoadJS(obj) {
                $LAB.script(&#039;JS/jscal2.js&#039;).script(&#039;JS/en.js&#039;).block();
                alert(&#039;hi&#039;);
            }
    
    
    &lt;!--
    --&gt;
    
        





</description>
		<content:encoded><![CDATA[<p>it is hiding controls in IE. check below code</p>
<p>    Calendar Control</p>
<p>            function LoadJS(obj) {<br />
                $LAB.script(&#8216;JS/jscal2.js&#8217;).script(&#8216;JS/en.js&#8217;).block();<br />
                alert(&#8216;hi&#8217;);<br />
            }</p>
<p>    &lt;!&#8211;<br />
    &#8211;&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shadedecho</title>
		<link>http://ajaxian.com/archives/labjs-simple-abstraction-for-loading-dependencies-correctly/comment-page-1#comment-274700</link>
		<dc:creator>shadedecho</dc:creator>
		<pubDate>Tue, 28 Jul 2009 06:26:20 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=7019#comment-274700</guid>
		<description>Thanks to questions and input from Austin.Javascript members, I&#039;ve released LABjs v0.7 now, which is a significant reworking of the internals of LABjs, providing a much simpler and yet more powerful API for usage.

No more need to nest $LAB calls for loading scripts after blocking.. simply continue the main chain of calls and LABjs will manage the loading order/execution for you.

If you haven&#039;t checked out LABjs yet, you really should give it a try. It&#039;s simply the best way to load JS onto your pages.</description>
		<content:encoded><![CDATA[<p>Thanks to questions and input from Austin.Javascript members, I&#8217;ve released LABjs v0.7 now, which is a significant reworking of the internals of LABjs, providing a much simpler and yet more powerful API for usage.</p>
<p>No more need to nest $LAB calls for loading scripts after blocking.. simply continue the main chain of calls and LABjs will manage the loading order/execution for you.</p>
<p>If you haven&#8217;t checked out LABjs yet, you really should give it a try. It&#8217;s simply the best way to load JS onto your pages.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shadedecho</title>
		<link>http://ajaxian.com/archives/labjs-simple-abstraction-for-loading-dependencies-correctly/comment-page-1#comment-274275</link>
		<dc:creator>shadedecho</dc:creator>
		<pubDate>Mon, 06 Jul 2009 19:42:10 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=7019#comment-274275</guid>
		<description>New 0.6 version of LABjs posted, fixes several bugs, thanks to community input!

http://labjs.com/LABjs-0.6.zip</description>
		<content:encoded><![CDATA[<p>New 0.6 version of LABjs posted, fixes several bugs, thanks to community input!</p>
<p><a href="http://labjs.com/LABjs-0.6.zip" rel="nofollow">http://labjs.com/LABjs-0.6.zip</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shadedecho</title>
		<link>http://ajaxian.com/archives/labjs-simple-abstraction-for-loading-dependencies-correctly/comment-page-1#comment-274260</link>
		<dc:creator>shadedecho</dc:creator>
		<pubDate>Fri, 03 Jul 2009 02:30:08 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=7019#comment-274260</guid>
		<description>@danroberts-
I have now read @souders&#039; second book, &quot;Even Faster Web Sites&quot;. It is great, and I highly recommend it to everyone. 

So, now that I have done some further investigation and digging into his code (Ch4 and Ch5), I have some thoughts/comparisons with it versus the direction I took with LABjs. 

Short:
Souders&#039; method, which he has named &quot;EFWS&quot; (name of his book &quot;Even Faster Web Sites&quot;) is really awesome, but has some admitted limitations which run contrary to some of LABjs&#039; motivating factors. In addition, I think depending on certain conditions (which I will discuss below) LABjs may achieve similar performance in general with EFWS. So both scripts stand on their own as good strong choices for web authors, but for different reasons. 

Long:
I&#039;ve written a more detailed evaluation comparison here:  http://labjs.com/LABjs_vs_Souders.html

My Conclusions:
My guess is there are some sets of pages out there which have a couple of very proportionally large script assets compared to few numbers of other smaller page assets (images, CSS, etc), and it&#039;s possible that in those cases Souders&#039; method may squeeze a little more performance in total page load. 

But there are also plenty of sites which the balance would be more swayed the other way, with more (or larger) page assets, and compartively smaller (or fewer) numbers of script assets, in which case I think LABjs might perform better. 

So, I highly respect the work that Souders has done, and I encourage others to take a look at his code, even try it out on your own pages. 

But I think LABjs serves a slightly different audience and use case. The code is smaller and simpler, and is also more flexible to be used at any time during the life of a page. This gives page authors a lot of great choices they didn&#039;t have before.

I hope this helps clarify to those reading the choices they have available to choose from, and why they might look to LABjs and/or Souders&#039; EFWS method for loading JS into a page.</description>
		<content:encoded><![CDATA[<p>@danroberts-<br />
I have now read @souders&#8217; second book, &#8220;Even Faster Web Sites&#8221;. It is great, and I highly recommend it to everyone. </p>
<p>So, now that I have done some further investigation and digging into his code (Ch4 and Ch5), I have some thoughts/comparisons with it versus the direction I took with LABjs. </p>
<p>Short:<br />
Souders&#8217; method, which he has named &#8220;EFWS&#8221; (name of his book &#8220;Even Faster Web Sites&#8221;) is really awesome, but has some admitted limitations which run contrary to some of LABjs&#8217; motivating factors. In addition, I think depending on certain conditions (which I will discuss below) LABjs may achieve similar performance in general with EFWS. So both scripts stand on their own as good strong choices for web authors, but for different reasons. </p>
<p>Long:<br />
I&#8217;ve written a more detailed evaluation comparison here:  <a href="http://labjs.com/LABjs_vs_Souders.html" rel="nofollow">http://labjs.com/LABjs_vs_Souders.html</a></p>
<p>My Conclusions:<br />
My guess is there are some sets of pages out there which have a couple of very proportionally large script assets compared to few numbers of other smaller page assets (images, CSS, etc), and it&#8217;s possible that in those cases Souders&#8217; method may squeeze a little more performance in total page load. </p>
<p>But there are also plenty of sites which the balance would be more swayed the other way, with more (or larger) page assets, and compartively smaller (or fewer) numbers of script assets, in which case I think LABjs might perform better. </p>
<p>So, I highly respect the work that Souders has done, and I encourage others to take a look at his code, even try it out on your own pages. </p>
<p>But I think LABjs serves a slightly different audience and use case. The code is smaller and simpler, and is also more flexible to be used at any time during the life of a page. This gives page authors a lot of great choices they didn&#8217;t have before.</p>
<p>I hope this helps clarify to those reading the choices they have available to choose from, and why they might look to LABjs and/or Souders&#8217; EFWS method for loading JS into a page.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: danroberts</title>
		<link>http://ajaxian.com/archives/labjs-simple-abstraction-for-loading-dependencies-correctly/comment-page-1#comment-274252</link>
		<dc:creator>danroberts</dc:creator>
		<pubDate>Thu, 02 Jul 2009 15:59:16 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=7019#comment-274252</guid>
		<description>@shadedecho - I agree with @souders... this library could really take it to the next level with paralell downloading all files and then executing based on dependency.</description>
		<content:encoded><![CDATA[<p>@shadedecho &#8211; I agree with @souders&#8230; this library could really take it to the next level with paralell downloading all files and then executing based on dependency.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shadedecho</title>
		<link>http://ajaxian.com/archives/labjs-simple-abstraction-for-loading-dependencies-correctly/comment-page-1#comment-274239</link>
		<dc:creator>shadedecho</dc:creator>
		<pubDate>Wed, 01 Jul 2009 22:02:16 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=7019#comment-274239</guid>
		<description>@souders -- thank you for the kind comments! I&#039;m impressed by and still trying to learn the ins and outs of your code. If I figure out how to leverage more stuff I learn, I&#039;ll certainly keep trying to push LABjs to be even better. 

I think and hope it&#039;s a good, simple, first step to start getting more and more regular websites to improve the performance of their script loading. IMHO, it&#039;s badly needed. My tool is definitely intended for &quot;the masses&quot;. :)</description>
		<content:encoded><![CDATA[<p>@souders &#8212; thank you for the kind comments! I&#8217;m impressed by and still trying to learn the ins and outs of your code. If I figure out how to leverage more stuff I learn, I&#8217;ll certainly keep trying to push LABjs to be even better. </p>
<p>I think and hope it&#8217;s a good, simple, first step to start getting more and more regular websites to improve the performance of their script loading. IMHO, it&#8217;s badly needed. My tool is definitely intended for &#8220;the masses&#8221;. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: souders</title>
		<link>http://ajaxian.com/archives/labjs-simple-abstraction-for-loading-dependencies-correctly/comment-page-1#comment-274232</link>
		<dc:creator>souders</dc:creator>
		<pubDate>Wed, 01 Jul 2009 16:13:49 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=7019#comment-274232</guid>
		<description>SHORT: This library is nice, but could be better.

LONG: It&#039;s sad that developers have to do so much work to get around something browsers should do automatically. Even the newer browsers that support parallel script loading (IE8, FF 3.5, Saf 4, and Chr 2) still block other, later resources from being downloaded. I&#039;ve shared my thoughts with some folks involved in HTML5 on my proposal for the SCRIPT tag to handle DEFER, ASYNC, and POSTONLOAD attributes. (I&#039;ll write a blog post about that soon.)

Back to LABjs, let&#039;s revisit the goal. I totally understand that external scripts that depend on each other have to be *executed* in order, but there&#039;s no reason they can&#039;t be *downloaded* in parallel. We&#039;ve seen newer browsers move in this direction, but as I mention in Chapter 4 of &lt;a href=&quot;http://www.stevesouders.com/blog/2009/04/27/loading-scripts-without-blocking/&quot; title=&quot;Even Faster Web Sites&quot; rel=&quot;nofollow&quot;&gt;Even Faster Web Sites&lt;/a&gt; and in my blog post on &lt;a href=&quot;http://www.stevesouders.com/blog/2009/04/27/loading-scripts-without-blocking/&quot; title=&quot;Loading Scripts Without Blocking&quot; rel=&quot;nofollow&quot;&gt;Loading Scripts Without Blocking&lt;/a&gt;, they still block later downloads. Until browsers get better at loading scripts in parallel (and IE 6&amp;7 disappear), developers can use advanced script loading techniques to make their pages faster.

The issue with LABjs is that, when a developer has two scripts that depend on each other (as is often the case when using frameworks like jQuery and Dojo), LABjs requires that the developer use the blocking functionality. This defeats the original goal of loading scripts in parallel. 

There is a workaround to this that is compatible across all browsers. I describe it in my book, but the code sample is available without buying the book. The &lt;a href=&quot;http://stevesouders.com/efws/loadscripts-diff.php&quot; title=&quot;loadScripts Different Domains&quot; rel=&quot;nofollow&quot;&gt;loadScripts Different Domains&lt;/a&gt; sample contains the JS implementation to do this. It allows two scripts that depend on each other to be loaded in parallel but executed sequentially. It works in all browsers except Safari 3 and Chrome 1.

Hats off to Kyle for pushing the envelope and making this library available. It would be great if he took it to the next level to support parallel loading of scripts with dependencies, avoiding the blocking behavior that is the motivation behind this work.</description>
		<content:encoded><![CDATA[<p>SHORT: This library is nice, but could be better.</p>
<p>LONG: It&#8217;s sad that developers have to do so much work to get around something browsers should do automatically. Even the newer browsers that support parallel script loading (IE8, FF 3.5, Saf 4, and Chr 2) still block other, later resources from being downloaded. I&#8217;ve shared my thoughts with some folks involved in HTML5 on my proposal for the SCRIPT tag to handle DEFER, ASYNC, and POSTONLOAD attributes. (I&#8217;ll write a blog post about that soon.)</p>
<p>Back to LABjs, let&#8217;s revisit the goal. I totally understand that external scripts that depend on each other have to be *executed* in order, but there&#8217;s no reason they can&#8217;t be *downloaded* in parallel. We&#8217;ve seen newer browsers move in this direction, but as I mention in Chapter 4 of <a href="http://www.stevesouders.com/blog/2009/04/27/loading-scripts-without-blocking/" title="Even Faster Web Sites" rel="nofollow">Even Faster Web Sites</a> and in my blog post on <a href="http://www.stevesouders.com/blog/2009/04/27/loading-scripts-without-blocking/" title="Loading Scripts Without Blocking" rel="nofollow">Loading Scripts Without Blocking</a>, they still block later downloads. Until browsers get better at loading scripts in parallel (and IE 6&amp;7 disappear), developers can use advanced script loading techniques to make their pages faster.</p>
<p>The issue with LABjs is that, when a developer has two scripts that depend on each other (as is often the case when using frameworks like jQuery and Dojo), LABjs requires that the developer use the blocking functionality. This defeats the original goal of loading scripts in parallel. </p>
<p>There is a workaround to this that is compatible across all browsers. I describe it in my book, but the code sample is available without buying the book. The <a href="http://stevesouders.com/efws/loadscripts-diff.php" title="loadScripts Different Domains" rel="nofollow">loadScripts Different Domains</a> sample contains the JS implementation to do this. It allows two scripts that depend on each other to be loaded in parallel but executed sequentially. It works in all browsers except Safari 3 and Chrome 1.</p>
<p>Hats off to Kyle for pushing the envelope and making this library available. It would be great if he took it to the next level to support parallel loading of scripts with dependencies, avoiding the blocking behavior that is the motivation behind this work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BenGerrissen</title>
		<link>http://ajaxian.com/archives/labjs-simple-abstraction-for-loading-dependencies-correctly/comment-page-1#comment-274231</link>
		<dc:creator>BenGerrissen</dc:creator>
		<pubDate>Wed, 01 Jul 2009 15:51:04 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=7019#comment-274231</guid>
		<description>@WillPeavy, yeh, that works, but in most java joints doing international enterprise websites at low budgets usually means frontend management gets cut off a lot and done away with *just copy paste*...

*sigh* *depressed*</description>
		<content:encoded><![CDATA[<p>@WillPeavy, yeh, that works, but in most java joints doing international enterprise websites at low budgets usually means frontend management gets cut off a lot and done away with *just copy paste*&#8230;</p>
<p>*sigh* *depressed*</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shadedecho</title>
		<link>http://ajaxian.com/archives/labjs-simple-abstraction-for-loading-dependencies-correctly/comment-page-1#comment-274229</link>
		<dc:creator>shadedecho</dc:creator>
		<pubDate>Wed, 01 Jul 2009 14:54:44 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=7019#comment-274229</guid>
		<description>@willpeavy -- LABjs was designed mostly for sites who use JS that they don&#039;t control, and sometimes don&#039;t even host. Like most sites on the internet, for instance, who link to jquery.js from Google AJAX Api hosting, and google analytics, and addthis share button JS, and so forth. In those circumstances, you often end up with half a dozen JS files loading one script-tag at a time (often horribly in the HEAD of the document), blocking the rest of the page assets from loading.

In these cases, you cannot combine files. On my sites, I&#039;ve now put LABjs into play, by loading in parallel all these external scripts, and *also* combined my own scripts into one or a couple of files at most, to reduce the amount of loading.

Also, on the topic of combining... It&#039;s a good approach in general, but can quickly lead to problems if the file is big and any part of it has change at any relatively medium to high frequency. In those cases, the users have to redownload an entire new file because you tweaked one line of JS. I think there needs to be a happy balance of combining files, and still utilizing (as much as is possible) the power of the browser cache to keep average viewing user experience optimal.

In any case, rare is it that a website can (or should) have ONE js file on a page, usually more. And sometimes they have dependencies. That&#039;s where LABjs comes in, making it easy to load those, manage dependency blocking, and still let the rest of the page load quickly in parallel.

And what about your one JS file? Are you loading that with a regular blocking script tag? Odds are, if it&#039;s &quot;big&quot;, and you&#039;re so in the HEAD of your page, you&#039;re not getting a lot of optimization benefit. A single call to LABjs for your one file would still improve things because you would let the rest of the page load while your big mammoth file loads.</description>
		<content:encoded><![CDATA[<p>@willpeavy &#8212; LABjs was designed mostly for sites who use JS that they don&#8217;t control, and sometimes don&#8217;t even host. Like most sites on the internet, for instance, who link to jquery.js from Google AJAX Api hosting, and google analytics, and addthis share button JS, and so forth. In those circumstances, you often end up with half a dozen JS files loading one script-tag at a time (often horribly in the HEAD of the document), blocking the rest of the page assets from loading.</p>
<p>In these cases, you cannot combine files. On my sites, I&#8217;ve now put LABjs into play, by loading in parallel all these external scripts, and *also* combined my own scripts into one or a couple of files at most, to reduce the amount of loading.</p>
<p>Also, on the topic of combining&#8230; It&#8217;s a good approach in general, but can quickly lead to problems if the file is big and any part of it has change at any relatively medium to high frequency. In those cases, the users have to redownload an entire new file because you tweaked one line of JS. I think there needs to be a happy balance of combining files, and still utilizing (as much as is possible) the power of the browser cache to keep average viewing user experience optimal.</p>
<p>In any case, rare is it that a website can (or should) have ONE js file on a page, usually more. And sometimes they have dependencies. That&#8217;s where LABjs comes in, making it easy to load those, manage dependency blocking, and still let the rest of the page load quickly in parallel.</p>
<p>And what about your one JS file? Are you loading that with a regular blocking script tag? Odds are, if it&#8217;s &#8220;big&#8221;, and you&#8217;re so in the HEAD of your page, you&#8217;re not getting a lot of optimization benefit. A single call to LABjs for your one file would still improve things because you would let the rest of the page load while your big mammoth file loads.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: WillPeavy</title>
		<link>http://ajaxian.com/archives/labjs-simple-abstraction-for-loading-dependencies-correctly/comment-page-1#comment-274227</link>
		<dc:creator>WillPeavy</dc:creator>
		<pubDate>Wed, 01 Jul 2009 14:23:16 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=7019#comment-274227</guid>
		<description>@shadedecho - was loading multiple files with LABjs faster than a single compiled file?

@BenGerrissen - I design enterprise apps, that have mutliple js files that are compiled into one file before they reach prod. It&#039;s fast, and it works well. I wonder why you aren&#039;t defining the API for 3rd parties. If you let them define their own, of course you are going to be frustrated...</description>
		<content:encoded><![CDATA[<p>@shadedecho &#8211; was loading multiple files with LABjs faster than a single compiled file?</p>
<p>@BenGerrissen &#8211; I design enterprise apps, that have mutliple js files that are compiled into one file before they reach prod. It&#8217;s fast, and it works well. I wonder why you aren&#8217;t defining the API for 3rd parties. If you let them define their own, of course you are going to be frustrated&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: oopstudios</title>
		<link>http://ajaxian.com/archives/labjs-simple-abstraction-for-loading-dependencies-correctly/comment-page-1#comment-274223</link>
		<dc:creator>oopstudios</dc:creator>
		<pubDate>Wed, 01 Jul 2009 12:03:26 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=7019#comment-274223</guid>
		<description>Awesome code! 5*</description>
		<content:encoded><![CDATA[<p>Awesome code! 5*</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shadedecho</title>
		<link>http://ajaxian.com/archives/labjs-simple-abstraction-for-loading-dependencies-correctly/comment-page-1#comment-274207</link>
		<dc:creator>shadedecho</dc:creator>
		<pubDate>Tue, 30 Jun 2009 18:39:35 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=7019#comment-274207</guid>
		<description>@willmofatt -- LABjs has been tested, and seems to be working, in windows, with IE6, IE7, IE8, FF2, FF3, FF3.5, Safari 4, Opera, Chrome -- I&#039;ve not done full testing on the other platforms (MAC, Linux) yet, but that&#039;s up next.  In any case, that&#039;s pretty wide coverage so far in terms of windows browsers.</description>
		<content:encoded><![CDATA[<p>@willmofatt &#8212; LABjs has been tested, and seems to be working, in windows, with IE6, IE7, IE8, FF2, FF3, FF3.5, Safari 4, Opera, Chrome &#8212; I&#8217;ve not done full testing on the other platforms (MAC, Linux) yet, but that&#8217;s up next.  In any case, that&#8217;s pretty wide coverage so far in terms of windows browsers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rborn</title>
		<link>http://ajaxian.com/archives/labjs-simple-abstraction-for-loading-dependencies-correctly/comment-page-1#comment-274200</link>
		<dc:creator>rborn</dc:creator>
		<pubDate>Tue, 30 Jun 2009 17:23:12 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=7019#comment-274200</guid>
		<description>@rboucher : forcing the developer to manage the loading is not that bad, at least for me, being lazy , is more easy to write .script[...], than , even with copy/paste.
Anyway you are forced to set what&#039;s blocked and what not setting the order of the scripts
On the other hand, on a project I&#039;m working on, I load 280k, in 8 files - developer versions so no minified -  in 8 seconds.
with labjs, this is done in 2.5 seconds, so I&#039;m pretty excited.</description>
		<content:encoded><![CDATA[<p>@rboucher : forcing the developer to manage the loading is not that bad, at least for me, being lazy , is more easy to write .script[...], than , even with copy/paste.<br />
Anyway you are forced to set what&#8217;s blocked and what not setting the order of the scripts<br />
On the other hand, on a project I&#8217;m working on, I load 280k, in 8 files &#8211; developer versions so no minified &#8211;  in 8 seconds.<br />
with labjs, this is done in 2.5 seconds, so I&#8217;m pretty excited.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shadedecho</title>
		<link>http://ajaxian.com/archives/labjs-simple-abstraction-for-loading-dependencies-correctly/comment-page-1#comment-274198</link>
		<dc:creator>shadedecho</dc:creator>
		<pubDate>Tue, 30 Jun 2009 17:10:11 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=7019#comment-274198</guid>
		<description>@rboucher -- strange, I wouldn&#039;t have thought of it as &quot;forcing&quot; them to do blocking on dependencies. This tool was intended to replace use of script-tag soup in the HEAD or BODY of your document. In those scenarios, authors already have to load scripts in the right order, and rely on the browser to &quot;block&quot; so that they load dependencies correctly. LABjs simply lets you speed up the parts of that set of script-tags which aren&#039;t really dependent on each other and can be parallel loaded.  

It should also be noted that this approach allows the rest of the page to keep loading, as well, instead of waiting on ONLY the JS to load.

I don&#039;t think it&#039;s too hard for web authors to think &quot;Oh, jquery.js needs to load before all the plugins, duh!. So, I&#039;ll first load it, and then block() and then load the rest in parallel&quot;. If that is too hard or forcing them unnecessarily, then I&#039;m not sure other heavier approaches will be palatable.

Interesting thoughts on Obj-J approach. I&#039;ll look closer at it. Again, LABjs can also be thought of as a general, simple dependency loading/management tool, though its primary intended use is just to replace script-tags in a better, more efficient way.

But that&#039;s just it, it&#039;s very simple, JS only, doesn&#039;t work on any build-time steps, or require any heavy frameworks. It also is completely agnostic to what you are loading, so that you don&#039;t have to modify or inspect your scripts to get special convention-based loading signals.</description>
		<content:encoded><![CDATA[<p>@rboucher &#8212; strange, I wouldn&#8217;t have thought of it as &#8220;forcing&#8221; them to do blocking on dependencies. This tool was intended to replace use of script-tag soup in the HEAD or BODY of your document. In those scenarios, authors already have to load scripts in the right order, and rely on the browser to &#8220;block&#8221; so that they load dependencies correctly. LABjs simply lets you speed up the parts of that set of script-tags which aren&#8217;t really dependent on each other and can be parallel loaded.  </p>
<p>It should also be noted that this approach allows the rest of the page to keep loading, as well, instead of waiting on ONLY the JS to load.</p>
<p>I don&#8217;t think it&#8217;s too hard for web authors to think &#8220;Oh, jquery.js needs to load before all the plugins, duh!. So, I&#8217;ll first load it, and then block() and then load the rest in parallel&#8221;. If that is too hard or forcing them unnecessarily, then I&#8217;m not sure other heavier approaches will be palatable.</p>
<p>Interesting thoughts on Obj-J approach. I&#8217;ll look closer at it. Again, LABjs can also be thought of as a general, simple dependency loading/management tool, though its primary intended use is just to replace script-tags in a better, more efficient way.</p>
<p>But that&#8217;s just it, it&#8217;s very simple, JS only, doesn&#8217;t work on any build-time steps, or require any heavy frameworks. It also is completely agnostic to what you are loading, so that you don&#8217;t have to modify or inspect your scripts to get special convention-based loading signals.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rboucher</title>
		<link>http://ajaxian.com/archives/labjs-simple-abstraction-for-loading-dependencies-correctly/comment-page-1#comment-274197</link>
		<dc:creator>rboucher</dc:creator>
		<pubDate>Tue, 30 Jun 2009 16:59:56 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=7019#comment-274197</guid>
		<description>This is interesting, but I think forcing the developer to do their own management of blocking vs. non-blocking dependencies is overkill.

One of the nice things about the loader in Objective-J is that it does a look ahead phase and starts downloading any pending imports immediately, but always executes all import statements in the correct order. You get the best of both features, without needing any additional management on your own.</description>
		<content:encoded><![CDATA[<p>This is interesting, but I think forcing the developer to do their own management of blocking vs. non-blocking dependencies is overkill.</p>
<p>One of the nice things about the loader in Objective-J is that it does a look ahead phase and starts downloading any pending imports immediately, but always executes all import statements in the correct order. You get the best of both features, without needing any additional management on your own.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BenGerrissen</title>
		<link>http://ajaxian.com/archives/labjs-simple-abstraction-for-loading-dependencies-correctly/comment-page-1#comment-274196</link>
		<dc:creator>BenGerrissen</dc:creator>
		<pubDate>Tue, 30 Jun 2009 16:24:10 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=7019#comment-274196</guid>
		<description>ps. My ramblings are mainly about enteprice websites where customers keep hiring third parties (designers/advertisers) and we have to install their code. Since customers don&#039;t pay us to refactor javascript, we place it as is.

If you manage your own websites and/or rarely work with third parties creating web applications, I&#039;m sure you will have no to little issues.</description>
		<content:encoded><![CDATA[<p>ps. My ramblings are mainly about enteprice websites where customers keep hiring third parties (designers/advertisers) and we have to install their code. Since customers don&#8217;t pay us to refactor javascript, we place it as is.</p>
<p>If you manage your own websites and/or rarely work with third parties creating web applications, I&#8217;m sure you will have no to little issues.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BenGerrissen</title>
		<link>http://ajaxian.com/archives/labjs-simple-abstraction-for-loading-dependencies-correctly/comment-page-1#comment-274195</link>
		<dc:creator>BenGerrissen</dc:creator>
		<pubDate>Tue, 30 Jun 2009 16:17:48 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=7019#comment-274195</guid>
		<description>Compiling javascript into a single js file, ok.

But the trend I see these days, is that &quot;not so smart&quot; developers compile frameworks like jquery into the same file. What&#039;s that? &quot;Best practise&quot;??? wrong... It might work for initial deliveries of websites, but it all goes to hell in a year or so, when several third parties all delivered &quot;compiled&quot; libraries and you end up with the browser evaluating 3 jqueries, 5 prototypes, 3 versions of THEIR OWN framework (true story btw) and so on on a single page.

People that compile frameworks together with their own code should be shot!

Thank god some people DO get it and create libraries that modularises javascript.

Tbh. why aren&#039;t browser vendors, w3c and ecmascript working on these kind of solutions... Or are they?</description>
		<content:encoded><![CDATA[<p>Compiling javascript into a single js file, ok.</p>
<p>But the trend I see these days, is that &#8220;not so smart&#8221; developers compile frameworks like jquery into the same file. What&#8217;s that? &#8220;Best practise&#8221;??? wrong&#8230; It might work for initial deliveries of websites, but it all goes to hell in a year or so, when several third parties all delivered &#8220;compiled&#8221; libraries and you end up with the browser evaluating 3 jqueries, 5 prototypes, 3 versions of THEIR OWN framework (true story btw) and so on on a single page.</p>
<p>People that compile frameworks together with their own code should be shot!</p>
<p>Thank god some people DO get it and create libraries that modularises javascript.</p>
<p>Tbh. why aren&#8217;t browser vendors, w3c and ecmascript working on these kind of solutions&#8230; Or are they?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shadedecho</title>
		<link>http://ajaxian.com/archives/labjs-simple-abstraction-for-loading-dependencies-correctly/comment-page-1#comment-274193</link>
		<dc:creator>shadedecho</dc:creator>
		<pubDate>Tue, 30 Jun 2009 14:43:45 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=7019#comment-274193</guid>
		<description>@youngestlinton exactly, you often times don&#039;t have control over every JS file you load on a page. Take for instance my site, http://flensed.com  I&#039;ve got JS files from google-analytics, addthis, the jquery from the CDN, and then my own scripts. I combined all my own scripts into one, but I still have like several that can load in parallel. So, I installed LABjs on the site, and the load time was improved by over 200%.</description>
		<content:encoded><![CDATA[<p>@youngestlinton exactly, you often times don&#8217;t have control over every JS file you load on a page. Take for instance my site, <a href="http://flensed.com" rel="nofollow">http://flensed.com</a>  I&#8217;ve got JS files from google-analytics, addthis, the jquery from the CDN, and then my own scripts. I combined all my own scripts into one, but I still have like several that can load in parallel. So, I installed LABjs on the site, and the load time was improved by over 200%.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: youngestlinton</title>
		<link>http://ajaxian.com/archives/labjs-simple-abstraction-for-loading-dependencies-correctly/comment-page-1#comment-274192</link>
		<dc:creator>youngestlinton</dc:creator>
		<pubDate>Tue, 30 Jun 2009 14:37:50 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=7019#comment-274192</guid>
		<description>If you’re going for performance, then why wouldn’t you combine all js into one file?

Maybe one is pulled from a CDN, others you host yourself, others are dynamically created on your server, etc?</description>
		<content:encoded><![CDATA[<p>If you’re going for performance, then why wouldn’t you combine all js into one file?</p>
<p>Maybe one is pulled from a CDN, others you host yourself, others are dynamically created on your server, etc?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: WillPeavy</title>
		<link>http://ajaxian.com/archives/labjs-simple-abstraction-for-loading-dependencies-correctly/comment-page-1#comment-274191</link>
		<dc:creator>WillPeavy</dc:creator>
		<pubDate>Tue, 30 Jun 2009 14:30:02 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=7019#comment-274191</guid>
		<description>If you&#039;re going for performance, then why wouldn&#039;t you combine all js into one file?</description>
		<content:encoded><![CDATA[<p>If you&#8217;re going for performance, then why wouldn&#8217;t you combine all js into one file?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

