admin管理员组

文章数量:1323029

Bit of an abstract question, but I'm surprised I'm not finding it already:

Now that Dojo has gone all AMD with 1.7, How does it pare to RequireJS, Lab, Head, etc...

Edit: I realize lab and head aren't AMD loaders. To clarify:

I'm liking how Dojo is splitting it's core out into small, concise, single-purpose modules. (I'd assume these module would work with any AMD loader now, though I haven't tested that) This leaves dojo.js itself barely more than an AMD loader.

So the question is: As an AMD loader, how does Dojo stack up. In terms of how well if follows the spec, speed, size, efficiency, whatever. It's the new kid in a very heated topic it seems, but I've heard surprisingly little about it.

Bit of an abstract question, but I'm surprised I'm not finding it already:

Now that Dojo has gone all AMD with 1.7, How does it pare to RequireJS, Lab, Head, etc...

Edit: I realize lab and head aren't AMD loaders. To clarify:

I'm liking how Dojo is splitting it's core out into small, concise, single-purpose modules. (I'd assume these module would work with any AMD loader now, though I haven't tested that) This leaves dojo.js itself barely more than an AMD loader.

So the question is: As an AMD loader, how does Dojo stack up. In terms of how well if follows the spec, speed, size, efficiency, whatever. It's the new kid in a very heated topic it seems, but I've heard surprisingly little about it.

Share Improve this question edited Mar 31, 2012 at 1:00 nicholas asked Mar 30, 2012 at 18:57 nicholasnicholas 14.6k22 gold badges86 silver badges149 bronze badges 1
  • Great question... I've yet to see performance data. It would also be interesting to pare them based on their various optimization tools. FWIW, requirejs was the work of @jrburke, a Dojo mitter who did some excellent work on the original loader and cross-domain module loading. AMD was sort of the next generation loader for Dojo. In my experience, cross-loader patibility isn't all that good yet. There are some things that may need to be nailed down in the spec, such as the behavior of the immediate require() call, also inconsistencies in how plugin modules are handled. – peller Commented Apr 3, 2012 at 2:22
Add a ment  | 

1 Answer 1

Reset to default 9

4 different things.

Dojo is a toolkit which has been converted to use AMD and ships with an implementation of an AMD loader and optimization tools. requirejs is a loader which also implements AMD and may be used with various toolkits (Dojo support is still lacking) There are some other AMD implementations like curl.js. I don't believe lab.js or head.js implement AMD

If you're asking how the AMD implementations differ or how consistent the spec is... excellent question. If you're asking about the pros and cons of an AMD implementation vs non-AMD, that requires a different matrix. One such parison can be found on SO.

本文标签: javascriptRequireJS vs Dojo 17 AMDStack Overflow