MooTools or jQuery

  • 5 February

Some time ago I have subscribed to the #mootools hash-tag, down at Twitter, there are tons of interesting tweets containing this tag but the ones most interesting are actually questions like What should I use MooTools or jQuery?

This article is outdated. Please visit http://www.jqueryvsmootools.com/ for a great write-up by Aaron Newton.

There is no simple answer to this, or a comprehensive answer that could be contained within the 140 characters that Twitter blesses us with… Well actually I used to reply If you need to ask than your better off with jQuery – but that didn’t worked out.

Both of these wonderful frameworks are significantly different in the approach of how things are being done. Resig’s jQuery by design was directed for people who want to achieve a certain effect with the most minimum code possible. I also have to mention that since jQuery is a widely recognizable project it has a huge community of users behind it, hence an impressive number of available plugins.

Similarly, MooTools can do pretty much the same thing if you really need to, and on top of that it can do a lot more – where it this case Mr. Modularity, Extensibility, Prototypeability (if there’s such a word) are entering the stage. I strongly suggest Aaron Newton’s MooTools Talk from the Ajax Experience (2008), who elaborates on this topic quite significantly.

My framework of choice was MooTools (in the days when it was still called Moo.fx), I have used it in most of the recent projects I’ve been working on and never looked back. It gives me everything I need, beginning with simple element.fade('out') to handling all of the libraries and Engine files I write.

Almost forgot, speed-wise… I could say that MooTools is faster (which it is) but in reality speed differences between these two frameworks are so insignificant that you shouldn’t really be considering them as a point-of-decision. Besides, everything is slow as s*it in IE.

Update

There’s also the second most repeted question How to make MooTools and jQuery work on one page, there’s a simple answer to that– use the noConflict option:

jQuery.noConflict();
 
// Use jQuery via jQuery(...)
jQuery(document).ready(function(){
  jQuery("div").hide();
});

More on the subject: Using jQuery with other libraries

6 responses so far. Care to add one yourself?

  1. cssProdigy February 6th, 2009 at 01:53

    • Finally the answer I’ve been looking for.

  2. Adrian February 6th, 2009 at 09:40

    • Brace for flame.

      But to be honest: MooTools’ less-magic-more-design approach fits me better too. It’s good to know that JS framework scene is not dominated by jQuery fundamentalist fanatics yet.

  3. @oskar February 8th, 2009 at 06:56

  4. @oskar February 11th, 2009 at 09:56

  5. James February 16th, 2009 at 00:28

    • “Similarly, MooTools can do pretty much the same thing if you really need to, and on top of that it can do a lot more”

      You start by saying how different the libraries are and then you try to make a direct comparison. Let’s face it, they cannot be compared. They’re both completely different. In the end they’re both polished abstractions of the same language - so, logically, whatever can be achieved in one can obviously be achieved in the other.

      I firmly believe it’s all down to preference. I prefer jQuery because its syntax makes more sense to me, as a human. I’m sure you prefer MooTools because it makes more “sense” to you than jQuery or any other alternative.

  6. Aaron May 25th, 2009 at 15:57

Leave a Reply

Fill-in all the forms

Categories