Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

How to choose javascript libraries based on functionality with AMD #14

neocris opened this Issue Oct 14, 2011 · 3 comments


None yet
3 participants

neocris commented Oct 14, 2011

How can we pick, say, DOM manipulation from JQuery, array utilities from YUI, UI widgets from Dojo, etc., with AMD, as mentioned in http://net.tutsplus.com/tutorials/javascript-ajax/next-generation-javascript-with-amd-and-requirejs-new-on-premium/


thomasdavis commented Oct 14, 2011

I can't view the whole tutorial and @andrew8088 might have a better answer for your question as I am little confused by it.

jQuery has made itself AMD compatible in the latest commits.

Here's what I said in the tutorial:

In her talk “Modern JavaScript” at JSConf 2011, Rebecca Murphey said that she would
love a JavaScript world where you could pick and choose where you get your functionality:
you could get your DOM manipulation from jQuery, your array utilities from YUI, your UI
widgets from Dojo, etc. Trying this today would be a nightmare. But, guess what? AMD solves this.

Now, I'm just realizing that when I said "AMD solves this," I made it sound like the problem was already solved. What I meant to say, however, was that if the library makers would use the AMD pattern for their libraries, and make each part of their libraries a separate module, then we'd be able to, as you say, pick DOM stuff from jQuery, array utils from YUI, etc. Right now, that isn't really possible, although I understand Dojo is using AMD now. And it's great to hear that jQuery is now AMD compatible!

TL;DR: It's not possible right now. I hope it will be in the future.

Hope that helps!

neocris commented Oct 20, 2011

It shure did. Thanks Andrew and Thomas

@neocris neocris closed this Oct 20, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment