WebAppers

/ best free open source web resources /

Shopify

Choose jQuery or MooTools Javascript Framework?

Posted · Category: Information

Most people getting started with JavaScript these days are faced with the challenging task of picking a library to use, or at least which one to learn first. Aaron Newton of Clientcide saw numerous posts that boil down to “MooTools or jQuery?”

He has published “jQuery vs MooTools” aims to help you make that choice. He tried to highlight the differences in philosophies between the two codebases and highlight their advantages and disadvantages.

jQuery focuses on expressiveness, quick and easy coding, and the DOM while MooTools focuses on extension, inheritance, legibility, reuse, and maintainability. jQuery is easy to get started and see quick results but can turn into code that’s harder to reuse and maintain, while MooTools takes longer to learn and requires you to write more code upfront before you see results, but afterwards is more reusable and more maintainable.

Both frameworks keep their cores rather lean, leaving it to you and others to write plug-ins and extensions. MooTools takes a more holistic approach and gives you tools to write anything you can imagine beyond the scope of the DOM, but pays the price by having a steeper learning curve.

MooTools extensibility and holistic approach gives you a superset of jQuery’s features, but jQuery’s focus on a slick DOM API doesn’t preclude you from using the native inheritance methods of JavaScript or from using a class system like MooTools if you want it.

Do you think so? Which framework do you choose?

Source: jQuery vs MooTools

24 Comments
  • http://www.anoldhouse.net/blog/ Matthias

    Haven’t read the linked article yet, but I’m all into jQuery. jQuery code is just simply beautifull. There are plugins for quite everything and jQuery UI with the CSS framework is even more beautifull. :)

  • http://www.toupil.fr Aurélien

    JQuery is easier to use than all others framework. And number of plugins is amazing!

  • it May Be You

    Im using jQuery,
    the chaining of methods and functions make code short and butiefull.

    workflow is so easy.

    grab the needet plugins for your site, an write some simple “glue” code to bind them together to the applications needs.

  • http://benny89sl.deviantart.com Benny

    Hi, I always use only mootools. I using this framework and I don`t observe any feature from this article. Maybe I use mootools only to structural programing but I can to merge standart js, css and my individuals style with mootools and all work OK! ;)

  • http://www.joeykoert.com Harrald

    I hope everyone will take the time to read the full article, because Aaron really did a nice job on this one.

    He talks about the philosophies of both frameworks and that you really can not say that one is better then the other.
    Both are great at what they do and are both excellent choices.

    although they seem to do almost the same thing, the 2 frameworks are very different from each other. Aaron explains what the big differences are and why that will help you choose which framework to use for a project.

  • http://www.colingreig.com Colin Greig

    I would love to see further real-world comparisons with all of the framework packages.

    Great post!

  • http://www.lpj.com.br Roberto

    I thing the most important is the community, support, oficial page, plugins, examples and not the code per si. I start using mootools but if you look to oficial page (mootools.net) you will see that nobody cares about it. The examples link is a joke! There’s tons of books about jquery and just one for mootools. I dont want to write classes i just want to “get things done”. The people on mootools could join the jquery work, like merb and rails.

  • http://diretoefacil.com.br Marcio Gasparotto

    For those who already had to write thousands of lines of code in pure javascript, Jquery is amazing.

    JQuery is less….

    Less complicated
    Less ugly
    Less tough

    For me less is more!

    JQuery, for me is the best!

  • ditman

    I started with MooTools, then went to Prototype and finally I learned some jQuery… I like all three very much (the lack of native domready support for prototype sucks a bit :P).

  • http://pxjunkie.blogspot.com wrerm

    After trying to learn MooTools over a period of time I decided to go with jQuery. I love their motto “write less, do more”

    This will always be an ongoing discussion between all the javascript frameworks that exist and whichever is better is relative – subject to a persons experience and aptitude.

  • aurex

    excelente trabajo el de Aaron y así como el lo explica es como ahora yo entiendo el porqué yo empeze utilizado JQuery pero termine trabajando con mootools

    y es que depende del proyecto es el framewerok que se utiliza, si se quiere un sitio que se vea fresco y rico visualmente jquery es el indicado, pero si ese sitio necesita mucha más funcionalidad de fondo (como las tendencias actuales de la web 2.0, gmail, netvibes….) entonces jquery se queda corto y es donde mootools saca a relucir su grandeza.

  • http://bchavez.bitarmory.com Brian Chavez

    +1 jQuery

  • http://www.guillaumevoisin.fr Guillaume

    JQuery’s the best for me ! The less I code the more I love …

  • Sander

    i should learn mootools because i don’t want to fixate on 1 framework.
    though at the moment i only know jQuery
    its fast (key factor) and easy to begin with.

    though as i read trough the whole article there are Numerous ways where i can improve my jQuery scripts. though it would kill the “fast” factor if i throw everything in little reusable plugins. specially since all my projects are short, and have close deadlines. customer has no time to wait, but wants to see things change on the site.

    i myself would gladly tell the customer that this kind of delay Needs to be done to make the site even better, though my boss thinks different on that part :P

    Hence the jQuery preference here @ our company.

    Sander

  • Daniel Buchner

    I know that a lot of people choose jQuery because it is “easy”, and for the 5 page portfolio site that might work fine, but for true large-scale web applications, extensible, modularized, and structured code is far better.

    Here is how I see the two libraries: Mootools tends to be classical and extensible in modality and jQuery leans more toward functional, instance-based operations.

    Think of this analogy:

    jQuery to me is a nomadic tribe, it can move fast and setup its teepee quickly, where as Mootools would be more like a settler who builds a farm structure that consistently produces crops and reuses the same field with great efficiency.

    Here is an example of what I mean:

    In Mootools to inject an element somewhere you do – thisElement.inject(thatElement, ‘where’) – the ‘where’ is an optional string that indicates where to inject ‘thisElement’, which can be ‘top’, ‘bottom’, ‘before’, and ‘after’. So the same function is used with a specified option to determine the place of delivery.

    Here is the jQuery approach, 8 functions with different names:

    append( content )
    appendTo( selector )
    prepend( content )
    prependTo( selector )
    after( content )
    before( content )
    insertAfter( selector )
    insertBefore( selector )

    Holy guacamole Batman that is a lot of different functions to remember!

    So I just like being able to think in my head: “Well I need to put this somewhere, where should I inject it? Oh, it needs to be at the top! so – this.inject(‘targetEl’, ‘top’)”

    Just makes sense to me more than the jQuery way, but I guess someone could just a soon point out that I have the memory of a goldfish and I should just grab some handy jFlashcards and be done with it…but I LIKE that Mootools can organize it all for me…so I digress.

  • http://thecsslab.com/ TheCSSLab

    I personally prefer using the jQuery since I believe it’s more lightweight than the mootools. jQuery is with better API and off course we just have to mention the huge amount of jQuery plugins that everyone can find on the web. Looks like jQuery is already a JS Framework standart.

  • http://www.chocolim.com Chocolim

    The one with better plugins for the proyect win. Dont want to reinvent the wheel…

  • http://piotr.zalewa.info zalun

    I liked jQuery and I used it few times. First framework I used was Prototype with Scriptaculous, but I had to find mootools to be pleased.

    I agree that there are plugins for jQuery all over the place, but it’s not hard to find the really useful made for mootools as well. It’s also pretty easy to write own classes which just use the Mootools power. With inheritance you can modify existing mootools features, which I personally do all the time.

    If one will think only about using the framework – mootools is actually just two things: Classes and Events. Attaching Events to Classes is priceless. In example I have a class called Layout with parameters like Sidebar, ContentWindow. Layout itself does nto have any representation within the DOM (opposite to Sidebar and Content). Sizes of the Sidebar and Content will change on browser window resize. These will change if I’d resize the Sidebar as well. It’s enough to create Layout’s “resize” event and fire it on window and sidebar resize. If I’d add another element which will be affected on the Sidebar or browser window changes, I’m just creating an event for it and ordering Layout’s “resize” to fir it. Everything is working fine.

    I know it can be done with jQuery and without the abstract Classes. I just think that looking at the code which uses mootools after half a year I can read it and understand. Sure it’s driving me crazy how stupid I was to not use Events or Options or anything and it lands on the refactoring list, but it’s easier to change code within Classes making them backwards compatible.

    And to all flame warriors. It’s not what is better, it’s about what better suits you. You have to try both and decide instead of listening to some other person advices. It’s like buying a car without a test drive (I’ve done it and I’m happy, but it was a clear luck).

  • http://trephine.org Balaji

    Great article! Thanks for taking the time to explain Mootools javascript

  • Chetan

    We tried to use MooTools and jQuery together and were having lots of DOM issues in Sharepoint. Removing Moo aand opting for jQuery (because of its capabilities) resolved them.

  • http://blog.msolis.com.mx Marco Antonio

    Jquery, for me, the best!!!

  • weloncin

    Hmmm … ,
    jQuery is easy to use and more plugins, but it’s a baby thing versus Mootools!

  • CtuLT

    You can just use Jquery.noconflict() and then you can use both

  • http://orfaon.net Damien

    I see that many people tend to choose jQuery for the massive plugin ressources, but i’m convinced the quantity is not a solution. I’ve seen so much plugins extremly bad coded… argh.
    Anyway, as many said, the two frameworks have different approachs, i tend to prefer mootools because i started with it…

Supported By

Deals

Web Browsers Icon Set
Food Icon Set
Flat Icon Set

Flat Icon Set

100 icons