mootools vs jquery

So, why mootools?

  1. Class support.
    JQuery’s SQL-like syntax is fine for quick and dirty javascripting, but eventually you’ll want real classes to structure your UI logic.
  2. It smells, feels and tastes like regular javascript.
    JQuery doesn’t even look like javascript, which isn’t necessarily a bad thing, since that’s kind of their goal. MooTools however, feels like just an extension of the language (more on this at point #9).
  3. Faster.
    ‘Nuff Said
    EDIT: This was pointed out to be false; It is only faster in certain cases (such as mine, WebKit nightly on OS X).
  4. Robert Penner’s easing equations baked right in.
    This could just be me, but I find the animations that mootools creates are alot smoother than JQuery’s (especially the easing).
  5. Creating new DOM elements is a snap.
    Need to create a dom element? var el = new Element(‘a’, { ‘href’: ‘juliocapote.com’}); Done.
  6. Modular.
    I like that I can just build and pull down a moo.js that only contains the functionality I need.
  7. Better Documented.
    Or at least, its faster to find what you need.
  8. Easier to hack on and extend.
    While I haven’t personally delved into the internals of either system, the consensus seems to be that jquery is an unintelligible mess when it comes to modifying how it works.
  9. Prototype Approach (versus a namespaced approach)
    This is really just matter of preference; MooTools achieves it’s magic by just extending the prototypes of common objects (Array, String, etc); While this is obstrusive, it makes for shorter, more natural code. JQuery does its thing via a main object (which you can name, hence the namespace), that you wrap around whatever you want to make magical; This is unobstrusive, but you pay for that by having to wrap anything you want to use (which ends up being everything). It basically boils down to arr.each(fn) vs $.each(arr, fn)
  10. It’s not a revolution.
    It feels as if JQuery is trying to take on the world (it seems like it too, since its now included with visual studio and the nokia sdk). However, I’m not; I’m just trying to write some javascript here.

Read the full story here.

Comment are closed.