<?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: modules.js: A New Stand-alone JavaScript Module Loader</title>
	<atom:link href="http://ajaxian.com/archives/modulesjs-a-new-stand-alone-javascript-module-loader/feed" rel="self" type="application/rss+xml" />
	<link>http://ajaxian.com/archives/modulesjs-a-new-stand-alone-javascript-module-loader</link>
	<description>Cleaning up the web with Ajax</description>
	<lastBuildDate>Sat, 20 Mar 2010 13:30:04 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: cheba</title>
		<link>http://ajaxian.com/archives/modulesjs-a-new-stand-alone-javascript-module-loader/comment-page-1#comment-265219</link>
		<dc:creator>cheba</dc:creator>
		<pubDate>Wed, 18 Jun 2008 21:53:01 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3752#comment-265219</guid>
		<description>@temsa: Maybe a short presentation with simple examples?</description>
		<content:encoded><![CDATA[<p>@temsa: Maybe a short presentation with simple examples?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: temsa</title>
		<link>http://ajaxian.com/archives/modulesjs-a-new-stand-alone-javascript-module-loader/comment-page-1#comment-265139</link>
		<dc:creator>temsa</dc:creator>
		<pubDate>Tue, 17 Jun 2008 07:13:01 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3752#comment-265139</guid>
		<description>Or you can use Archetype to do this elegantly, efficiently, without relying on XHR ;)</description>
		<content:encoded><![CDATA[<p>Or you can use Archetype to do this elegantly, efficiently, without relying on XHR ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nosredna</title>
		<link>http://ajaxian.com/archives/modulesjs-a-new-stand-alone-javascript-module-loader/comment-page-1#comment-265127</link>
		<dc:creator>Nosredna</dc:creator>
		<pubDate>Mon, 16 Jun 2008 22:32:49 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3752#comment-265127</guid>
		<description>OK. I&#039;m already merging the js I serve. So I guess I ignore all this module talk.</description>
		<content:encoded><![CDATA[<p>OK. I&#8217;m already merging the js I serve. So I guess I ignore all this module talk.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: temsa</title>
		<link>http://ajaxian.com/archives/modulesjs-a-new-stand-alone-javascript-module-loader/comment-page-1#comment-265126</link>
		<dc:creator>temsa</dc:creator>
		<pubDate>Mon, 16 Jun 2008 22:17:57 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3752#comment-265126</guid>
		<description>@Noresdna: you certainly won&#039;t use &quot;module loading&quot; throught XHR on a different server, except if you find a good way to do cross server XHR easily...</description>
		<content:encoded><![CDATA[<p>@Noresdna: you certainly won&#8217;t use &#8220;module loading&#8221; throught XHR on a different server, except if you find a good way to do cross server XHR easily&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nosredna</title>
		<link>http://ajaxian.com/archives/modulesjs-a-new-stand-alone-javascript-module-loader/comment-page-1#comment-265123</link>
		<dc:creator>Nosredna</dc:creator>
		<pubDate>Mon, 16 Jun 2008 20:41:20 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3752#comment-265123</guid>
		<description>What if the clump of files is my js files, plus a few things coming in from, say, google&#039;s ajax library servers.

Obviously, I don&#039;t want to concat my js with what google is serving.

So is module loading better if what I&#039;m bringing in is coming from google&#039;s servers?</description>
		<content:encoded><![CDATA[<p>What if the clump of files is my js files, plus a few things coming in from, say, google&#8217;s ajax library servers.</p>
<p>Obviously, I don&#8217;t want to concat my js with what google is serving.</p>
<p>So is module loading better if what I&#8217;m bringing in is coming from google&#8217;s servers?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: temsa</title>
		<link>http://ajaxian.com/archives/modulesjs-a-new-stand-alone-javascript-module-loader/comment-page-1#comment-265122</link>
		<dc:creator>temsa</dc:creator>
		<pubDate>Mon, 16 Jun 2008 20:38:10 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3752#comment-265122</guid>
		<description>Sorry for double posting, clicked too soon on the submit comment button :P

@Kris, I&#039;ve forgot, you can &quot;include&quot; as well files in archetype using a Archetype.require with some params for it to be synchronous (it&#039;s asynchronous by default with a callback, because synchronous will freeze your browser during the load else).

For the logger system, you should look at nitobibug which is quite amazing, we plan to introduce it in one of our default logging system for the next release.

@JustinMeyer : get at least a 1.1 firebug version and you&#039;ll have it. However, for cross site js loading, using xhr is not a good and it can be desirable in order to load your js application faster when you&#039;ll want to put it in production (using static1.js.mydomain.com, static2.js.mydomain.com, etc. in order to &quot;override&quot; the 2 request per server limit of http protocol ...).

As you said, javascript compression is easy... but is very unhelpful for debugging, that&#039;s why providing an api like Archetype provides a good to handle both development and production, using or not compression a cross site loading!</description>
		<content:encoded><![CDATA[<p>Sorry for double posting, clicked too soon on the submit comment button :P</p>
<p>@Kris, I&#8217;ve forgot, you can &#8220;include&#8221; as well files in archetype using a Archetype.require with some params for it to be synchronous (it&#8217;s asynchronous by default with a callback, because synchronous will freeze your browser during the load else).</p>
<p>For the logger system, you should look at nitobibug which is quite amazing, we plan to introduce it in one of our default logging system for the next release.</p>
<p>@JustinMeyer : get at least a 1.1 firebug version and you&#8217;ll have it. However, for cross site js loading, using xhr is not a good and it can be desirable in order to load your js application faster when you&#8217;ll want to put it in production (using static1.js.mydomain.com, static2.js.mydomain.com, etc. in order to &#8220;override&#8221; the 2 request per server limit of http protocol &#8230;).</p>
<p>As you said, javascript compression is easy&#8230; but is very unhelpful for debugging, that&#8217;s why providing an api like Archetype provides a good to handle both development and production, using or not compression a cross site loading!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: temsa</title>
		<link>http://ajaxian.com/archives/modulesjs-a-new-stand-alone-javascript-module-loader/comment-page-1#comment-265121</link>
		<dc:creator>temsa</dc:creator>
		<pubDate>Mon, 16 Jun 2008 20:26:33 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3752#comment-265121</guid>
		<description>@Kris: have a look at Component system dependencies, this is no more than about saying dependencies : [&quot;foo.bar.barfoo&quot;, &quot;bar.foo,foobar&quot;] in the object

And this system doesn&#039;t stop to js loading, but handles also templates and css loading associated to the component ;)</description>
		<content:encoded><![CDATA[<p>@Kris: have a look at Component system dependencies, this is no more than about saying dependencies : ["foo.bar.barfoo", "bar.foo,foobar"] in the object</p>
<p>And this system doesn&#8217;t stop to js loading, but handles also templates and css loading associated to the component ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kris Kowal</title>
		<link>http://ajaxian.com/archives/modulesjs-a-new-stand-alone-javascript-module-loader/comment-page-1#comment-265119</link>
		<dc:creator>Kris Kowal</dc:creator>
		<pubDate>Mon, 16 Jun 2008 20:01:28 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3752#comment-265119</guid>
		<description>@Nosredna The argument to using a loader is scalability and maintainability.  With a module loader, you can write more discrete and simpler scripts, so where managing a clump of  includes (which, for performance reasons, you&#039;ll need to aggregate into a single  at some point anyway) as a strategy becomes untenable, with a module loader you can continue writing and requiring discrete modules for a long time before the burden of managing their dependencies becomes a problem.

@Bredy my apologies for the cursory examination of YUI loader.

@slightlyoff I read Dojo&#039;s loader a year ago and found a lot of inspiration there.  It has had a major release since then, so some things have changed and I never fully grasped the complexity of the system.  My comments about the addLoadListener were rather attributed to the Goog library, which was also inspired by Dojo.

@temsa Archetype is interesting.  However, it still doesn&#039;t get you the simplicity of include(&quot;module.js&quot;) or require(&quot;module.js&quot;) (which imply dependency, are loosely coupled from each other, and mnemonically map to analogs in other languages readily).  I will be giving it a more thorough examination and will probably contact you or blog about it.

@JustinMeyer You raise a valid point.  I get much less useful debugging information out of Firebug with modules.js.  However, the module loader includes a debugger module like Firebug-Lite that can be opened in any browser on any web page running modules.js.  The debugger console also runs in a module, so you can do &quot;include&quot;, &quot;require&quot;, and logging calls from the command line.  The module loader also marks up functions with module origin information and adds logging functions to the module scope so It&#039;s easy to add trace messages to your code, like log(&quot;Found: &quot; + repr(object)).  I also make an attempt at rethrowing exceptions with adjusted file names and line numbers, but I&#039;ve had mixed results and could definitely improve on these points.</description>
		<content:encoded><![CDATA[<p>@Nosredna The argument to using a loader is scalability and maintainability.  With a module loader, you can write more discrete and simpler scripts, so where managing a clump of  includes (which, for performance reasons, you&#8217;ll need to aggregate into a single  at some point anyway) as a strategy becomes untenable, with a module loader you can continue writing and requiring discrete modules for a long time before the burden of managing their dependencies becomes a problem.</p>
<p>@Bredy my apologies for the cursory examination of YUI loader.</p>
<p>@slightlyoff I read Dojo&#8217;s loader a year ago and found a lot of inspiration there.  It has had a major release since then, so some things have changed and I never fully grasped the complexity of the system.  My comments about the addLoadListener were rather attributed to the Goog library, which was also inspired by Dojo.</p>
<p>@temsa Archetype is interesting.  However, it still doesn&#8217;t get you the simplicity of include(&#8221;module.js&#8221;) or require(&#8221;module.js&#8221;) (which imply dependency, are loosely coupled from each other, and mnemonically map to analogs in other languages readily).  I will be giving it a more thorough examination and will probably contact you or blog about it.</p>
<p>@JustinMeyer You raise a valid point.  I get much less useful debugging information out of Firebug with modules.js.  However, the module loader includes a debugger module like Firebug-Lite that can be opened in any browser on any web page running modules.js.  The debugger console also runs in a module, so you can do &#8220;include&#8221;, &#8220;require&#8221;, and logging calls from the command line.  The module loader also marks up functions with module origin information and adds logging functions to the module scope so It&#8217;s easy to add trace messages to your code, like log(&#8221;Found: &#8221; + repr(object)).  I also make an attempt at rethrowing exceptions with adjusted file names and line numbers, but I&#8217;ve had mixed results and could definitely improve on these points.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JustinMeyer</title>
		<link>http://ajaxian.com/archives/modulesjs-a-new-stand-alone-javascript-module-loader/comment-page-1#comment-265116</link>
		<dc:creator>JustinMeyer</dc:creator>
		<pubDate>Mon, 16 Jun 2008 19:13:18 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3752#comment-265116</guid>
		<description>Does eval work in Firebug yet?  I know it doesn&#039;t in 2.0.  Not being able to use it is a serious limitation and why having asynchronous loading is very useful.

@Nosredna In a production system, you really shouldn&#039;t have a clump of script tags anyway.  Your application should be packaged, and maybe event compressed, in one file.  However, the Module loader would be useful in cases where you have a VERY large JavaScript application, where much of the application&#039;s code isn&#039;t used immediately.

As this post seems to be filled with people promoting their own technology, I might as well throw JavaScriptMVC&#039;s hat into the ring.

With JavaScriptMVC, you can&#039;t do loading like this, but it&#039;s not important because the compression is so easy.  Even easier than ... DOJO.  You don&#039;t have to make code changes, but you have to write extra code.  Take that Alex.  Bwhahaha.  

Btw, I hope you can tell I&#039;m joking.  Dojo&#039;s got it all.  I couldn&#039;t have done the new compression system without ShrinkSafe.</description>
		<content:encoded><![CDATA[<p>Does eval work in Firebug yet?  I know it doesn&#8217;t in 2.0.  Not being able to use it is a serious limitation and why having asynchronous loading is very useful.</p>
<p>@Nosredna In a production system, you really shouldn&#8217;t have a clump of script tags anyway.  Your application should be packaged, and maybe event compressed, in one file.  However, the Module loader would be useful in cases where you have a VERY large JavaScript application, where much of the application&#8217;s code isn&#8217;t used immediately.</p>
<p>As this post seems to be filled with people promoting their own technology, I might as well throw JavaScriptMVC&#8217;s hat into the ring.</p>
<p>With JavaScriptMVC, you can&#8217;t do loading like this, but it&#8217;s not important because the compression is so easy.  Even easier than &#8230; DOJO.  You don&#8217;t have to make code changes, but you have to write extra code.  Take that Alex.  Bwhahaha.  </p>
<p>Btw, I hope you can tell I&#8217;m joking.  Dojo&#8217;s got it all.  I couldn&#8217;t have done the new compression system without ShrinkSafe.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: temsa</title>
		<link>http://ajaxian.com/archives/modulesjs-a-new-stand-alone-javascript-module-loader/comment-page-1#comment-265115</link>
		<dc:creator>temsa</dc:creator>
		<pubDate>Mon, 16 Jun 2008 19:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3752#comment-265115</guid>
		<description>Well, again something Archetype&#039;s loader handles better, and we&#039;re not even cited :(

Full loading process, including a final code starter, recursive configuration, etc. But in Archetype, it&#039;s just 10% of the framework and it&#039;s way more practical to use dependency management in components thant just registering dependencies in a files between libraries!

If you&#039;re not convinced, check out the 0.8.0-beta we&#039;ve released some hours ago : http://sourceforge.net/project/showfiles.php?group_id=194362 

http://archetypejs.org

@ Kris : it would have been great to get you in our team ;)</description>
		<content:encoded><![CDATA[<p>Well, again something Archetype&#8217;s loader handles better, and we&#8217;re not even cited :(</p>
<p>Full loading process, including a final code starter, recursive configuration, etc. But in Archetype, it&#8217;s just 10% of the framework and it&#8217;s way more practical to use dependency management in components thant just registering dependencies in a files between libraries!</p>
<p>If you&#8217;re not convinced, check out the 0.8.0-beta we&#8217;ve released some hours ago : <a href="http://sourceforge.net/project/showfiles.php?group_id=194362" rel="nofollow">http://sourceforge.net/project/showfiles.php?group_id=194362</a> </p>
<p><a href="http://archetypejs.org" rel="nofollow">http://archetypejs.org</a></p>
<p>@ Kris : it would have been great to get you in our team ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: slightlyoff</title>
		<link>http://ajaxian.com/archives/modulesjs-a-new-stand-alone-javascript-module-loader/comment-page-1#comment-265112</link>
		<dc:creator>slightlyoff</dc:creator>
		<pubDate>Mon, 16 Jun 2008 16:37:18 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3752#comment-265112</guid>
		<description>Hrmm....

It seems the author of this system (which looks like good work) didn&#039;t really take any care to investigate Dojo seriously before inaccurately characterizing it. Dojo&#039;s package system DOES handle recursive dependencies but ALSO provides async module loading after pre-processing, but that mode still handles recursive dependencies. That allows the Dojo package loader to work in CDN environments without serious changes to existing code other than the addition of provide()/require() statements.

Furthermore, in addition to his inaccurate statements about the basic function of Dojo&#039;s package loader, he&#039;s also wrong about the way that Dojo manages onLoad handling. The Dojo system doesn&#039;t fire handlers registered with dojo.addOnLoad() until all dependencies have been satisfied, both in the local (XHR) and x-domain cases. Dojo&#039;s package system ALSO integrates with Dojo&#039;s build system allowing you not only to be able to easily load modules but also to coalesce/optimize them for deployment without code changes.

It&#039;s great to see other toolkits picking up features which have been in Dojo for years now....hopefully Kris will take another look at Dojo and talk more accurately about it in the future.

Regards</description>
		<content:encoded><![CDATA[<p>Hrmm&#8230;.</p>
<p>It seems the author of this system (which looks like good work) didn&#8217;t really take any care to investigate Dojo seriously before inaccurately characterizing it. Dojo&#8217;s package system DOES handle recursive dependencies but ALSO provides async module loading after pre-processing, but that mode still handles recursive dependencies. That allows the Dojo package loader to work in CDN environments without serious changes to existing code other than the addition of provide()/require() statements.</p>
<p>Furthermore, in addition to his inaccurate statements about the basic function of Dojo&#8217;s package loader, he&#8217;s also wrong about the way that Dojo manages onLoad handling. The Dojo system doesn&#8217;t fire handlers registered with dojo.addOnLoad() until all dependencies have been satisfied, both in the local (XHR) and x-domain cases. Dojo&#8217;s package system ALSO integrates with Dojo&#8217;s build system allowing you not only to be able to easily load modules but also to coalesce/optimize them for deployment without code changes.</p>
<p>It&#8217;s great to see other toolkits picking up features which have been in Dojo for years now&#8230;.hopefully Kris will take another look at Dojo and talk more accurately about it in the future.</p>
<p>Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bredy</title>
		<link>http://ajaxian.com/archives/modulesjs-a-new-stand-alone-javascript-module-loader/comment-page-1#comment-265109</link>
		<dc:creator>Bredy</dc:creator>
		<pubDate>Mon, 16 Jun 2008 15:38:25 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3752#comment-265109</guid>
		<description>Only one thing, when using YUI Loader is 
loader.addModule({
    name: &quot;MyLibrary&quot;,
    type: &quot;js&quot;,
    fullpath: &quot;http://.../my_lib.js&quot;,
    after: [&quot;base&quot;] // or any other lib
});
I think this is not monkey patch ... you shoud better check twice, then you write somethink like this. Also statement about using global scope is misguided.</description>
		<content:encoded><![CDATA[<p>Only one thing, when using YUI Loader is<br />
loader.addModule({<br />
    name: &#8220;MyLibrary&#8221;,<br />
    type: &#8220;js&#8221;,<br />
    fullpath: &#8220;http://&#8230;/my_lib.js&#8221;,<br />
    after: ["base"] // or any other lib<br />
});<br />
I think this is not monkey patch &#8230; you shoud better check twice, then you write somethink like this. Also statement about using global scope is misguided.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bredy</title>
		<link>http://ajaxian.com/archives/modulesjs-a-new-stand-alone-javascript-module-loader/comment-page-1#comment-265110</link>
		<dc:creator>Bredy</dc:creator>
		<pubDate>Mon, 16 Jun 2008 15:38:25 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3752#comment-265110</guid>
		<description>Only one thing, when using YUI Loader is 
loader.addModule({
    name: &quot;MyLibrary&quot;,
    type: &quot;js&quot;,
    fullpath: &quot;http://.../my_lib.js&quot;,
    after: [&quot;base&quot;] // or any other lib
});
I think this is not monkey patch ... you shoud better check twice, then you write somethink like this. Also statement about using global scope is misguided.</description>
		<content:encoded><![CDATA[<p>Only one thing, when using YUI Loader is<br />
loader.addModule({<br />
    name: &#8220;MyLibrary&#8221;,<br />
    type: &#8220;js&#8221;,<br />
    fullpath: &#8220;http://&#8230;/my_lib.js&#8221;,<br />
    after: ["base"] // or any other lib<br />
});<br />
I think this is not monkey patch &#8230; you shoud better check twice, then you write somethink like this. Also statement about using global scope is misguided.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nosredna</title>
		<link>http://ajaxian.com/archives/modulesjs-a-new-stand-alone-javascript-module-loader/comment-page-1#comment-265108</link>
		<dc:creator>Nosredna</dc:creator>
		<pubDate>Mon, 16 Jun 2008 15:03:11 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3752#comment-265108</guid>
		<description>How many people use a loader? What are the arguments for using one rather than just having a clump of script tags do the work?</description>
		<content:encoded><![CDATA[<p>How many people use a loader? What are the arguments for using one rather than just having a clump of script tags do the work?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
