MooTools versus jQuery
Posted 9 months ago (21/03/08 1:24amGMT) by Alex | 364 views (Popularity: 27%).Tagged with JavaScript, jQuery, library, mootools and filed under
MooTools and jQuery are both JavaScript libraries- frameworks which make JavaScript easier, faster and more reliable. Although they are slightly different, it’s very much a one-or-the-other decision as to which one you’ll use to build a site.
To get rid of the suspense, here’s my judgement:
Sorry, jQuery- you’re just too cumbersome to get to grips with, and your homepage is just plain ugly.
And that’s despite jQuery being the weapon of choice for both the BBC and apple.
Let me explain why.
It’s worth pointing out that in my experience jQuery and MooTools are horses for slightly different courses. jQuery is about instantly giving a developer nice easy functions- fade this in, fade that out, AJAX-ify that. It’s a set of ‘products’ you can apply to your page. MooTools is more strictly a framework- the functions that come with it and the documentation place emphasis on delivering code functionality- more fundamental pieces like building blocks to build into the end packages that you might get in one go from jQuery.
You might wonder why that makes MooTools better in my opinion- well I guess it’s that unlike many people, I’ve a lot of experience with JavaScript, and I like using it to do unusual and uncommon stuff. And I also like to customise. jQuery takes the apple approach to design- it bests guesses your preference, and just gives you a fade out. MooTools much more obviously gives you opportunities to customise, to decide the exact transition, time frame, colours, ad infinitum.
MooTools, though you often need a few more lines to get what you want done, just makes way more sense. jQuery might accomplish something with one line, but it tends to be a long complicated line, where you can’t see which bits do what. MooTools might need three lines- but three lines which each make perfect intuitive sense, where you can see how to modify your code to get a longer transition, or add another function to some effect.
It’s worth pointing out that MooTools is a bit quicker, but jQuery is a lot nicer in terms of namespace- it’s only footprint is (optionally) the dollar ($) function. So in theory, jQuery will site nicely with any other JavaScript or libraries without colliding. In my experience, however, I’ve found that using jQuery will invariably break anything I’ve done with MooTools- yah boo sucks.
At the moment, despite a shocking lack of decent documentation jQuery is very much more popular. One day I’ll sit down and learn how to use it- but for now I’m much happier with my MooTools.
2 Responses to “MooTools versus jQuery”
By cssprodigy on Nov 24, 2008 | Reply
I’m still not sold on either one, though i’ve been using MooTools time and time again. It’s also worth mentioning that jQuery takes up only 15kb at the moment on version 1.2.6. MooTools is 63kb (version 1.2.1) . With max compression it’s still 37kb. Also MooTools simply has better smoother effects. The image galleries that use MooTools simply can’t be undone by jquery. Great article.
By David Mark on Dec 10, 2008 | Reply
They are both trash.