[dojo-contributors] what is the raison detre for dojo 2.0.

Bryan Forbes bryan at reigndropsfall.net
Thu Oct 11 15:51:17 EDT 2012

Karl Tiedt wrote:
> Bryan,
>    I would argue that the Dojo version would be more like
> require([
>         'dojo/query',
>         'dojo/NodeList-dom'
> ], function(query, NodeListDom){
>         query("#foo").addClass('some-class').style({display: "block",
> width:"400px"});
> });

You're right, but I was attempting to go for "the jQuery way" vs. "the
Dojo way" rather than apples to apples. Yes, Dojo has querying, but any
good Dojo dev knows (or should know) that querying for a node and
wrapping it in a node list and operating on it with array abstractions
is going to be less performant than just getting the node and doing what
you want with it. If you're operating on a collection of nodes, I'm all
for using query(); if I need a node by its ID, I'm going to use the
"low-level" Dojo DOM API. jQuery doesn't give me this option which
potentially allows me to make my application more performant; Dojo does.

Bryan Forbes

GPG Fingerprint
3D7D B728 713A BB7B B8B1  5B61 3888 17E0 70CA 0F3D

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
Url : http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20121011/c6f5d17b/attachment-0001.sig 

More information about the dojo-contributors mailing list