Poll Follow Up: What is Your Preferred JavaScript Framework?

By  on  

A few weeks and 450 votes ago I posted a poll: What is Your Preferred JavaScript Framework? After reviewing the results, I'd like to share with you the statistics and a few thoughts that have come to mind.

The Count

FrameworkPercentageVotes
jQuery50%226 votes
MooTools45%201 votes
Prototype / Script.aculo.us2%9 votes
YUI 1%5 votes
Other1%5 votes
Dojo0%2 votes
MochiKit0%1 vote

The Analysis

  • I anticipated a higher-than-average percentage of votes for MooTools and that's exactly what I got...
  • But what I didn't anticipate was that the number of votes for jQuery would surpass MooTools. I understand jQuery's popularity surpasses Moo's but since I rarely write about jQuery, I asked myself "Why are all these jQuery coders frequent readers?" I may have to try to write a bit more jQuery.
  • Only 9 votes for Prototype/Script.aculo.us, which is what I had anticipated. What's funny is that I very, very rarely see an article about either. It makes me question what Google Trends tells us about the JavaScript libraries.
  • Only 2.x% percent was achieved by frameworks other than the three mentioned above. I wonder if this is a reflection of my audience or of the web in general. AJAXian authored the last "big" survey that I'm aware of but they left off Moo which slightly invalidates it.
  • I think one thing that works against Moo is that, as their website states, Moo is targeted toward the intermediate to advanced JavaScript coder while jQuery is said to be more beginner-friendly. If I were a beginner and I got to know jQuery well, why wouldn't I stick with it? What motivation do I have to switch? Just a thought.
  • I think that if I ran this poll a year from now, the ration of each framework would be exactly the same. And that's speaking well for Moo, as I believe its userbase will keep up with jQuery's in 2009.
  • What would be very interesting to find out is how many people started with one and switched to another and for what reason.

Did you start with one framework and switch to another? Which and why? Please share!

Recent Features

  • By
    Create a CSS Cube

    CSS cubes really showcase what CSS has become over the years, evolving from simple color and dimension directives to a language capable of creating deep, creative visuals.  Add animation and you've got something really neat.  Unfortunately each CSS cube tutorial I've read is a bit...

  • By
    Conquering Impostor Syndrome

    Two years ago I documented my struggles with Imposter Syndrome and the response was immense.  I received messages of support and commiseration from new web developers, veteran engineers, and even persons of all experience levels in other professions.  I've even caught myself reading the post...

Incredible Demos

  • By
    Duplicate the jQuery Homepage Tooltips Using MooTools

    The jQuery homepage has a pretty suave tooltip-like effect as seen below: Here's how to accomplish this same effect using MooTools. The XHTML The above XHTML was taken directly from the jQuery homepage -- no changes. The CSS The above CSS has been slightly modified to match the CSS rules already...

  • By
    Duplicate the jQuery Homepage Tooltips Using Dojo

    The jQuery homepage has a pretty suave tooltip-like effect as seen below: Here's how to accomplish this same effect using Dojo. The XHTML The above HTML was taken directly from the jQuery homepage -- no changes. The CSS The above CSS has been slightly modified to match the CSS rules already...

Discussion

  1. Interesting,

    One thing to note about that Google Trends graph is that “prototype”, unlike jQuery/Mootools is a really common word so I bet a decent proportion of its traffic is unrelated to the actual prototype JS library.

    One thing I feel I need to mention is that jQuery is in no way a n00b library; this isn’t in opposition to your position David but recently a lot of the MooTools/Prototype “crew” (i.e. the fan club) have been slamming jQuery on that very point. jQuery is so widely popular because it is accessible to beginners (like you stated) while still having sufficient functionality to satisfy the more advanced programmers.

    I started with jQuery and I feel no inclination to learn another entire library just for the hell of it. jQuery does everything I need, and when it doesn’t I create a plugin for it – I’m sure you have similar feelings about MooTools. When I have a smaller project I simply don’t use any library; like any good JS programmer I am suitably proficient to operate without a library.

    Don’t get me wrong; I have looked at MooTools and Prototype, although my brain lasted longer with MooTools (it just makes more sense). Whenever I picture a person using the Prototype library it’s always some grumpy old man and a dusty gray keyboard… :D

    What I really hate is posts that try and compare the libraries on the tiniest of details when they are all vastly different. A recent article by Glenn Vanderburg (http://blog.thinkrelevance.com/2009/1/12/why-i-still-prefer-prototype-to-jquery) is almost entirely subjective and overall it’s a rather unecessarily pedantic article covering his preferences. All I really got from that article is that Glenn is opposed to the ‘this’ keyword in JavaScript.

    In the end I think it comes down to what programming style you’re used to. Some people are blindly insistent on using the OO style in JS while ignoring a more functional approach. For me, jQuery feels like JavaScript – and no, this is not because I started with jQuery – I was using JavaScript long before I found jQuery. MooTools and Prototype (class based libraries) seem as though they’re trying to make JavaScript into something it’s not.

  2. Interesting poll. I didn’t expect so much Moo users. I started with Scriptaculous then I switched to Jquery because was smaller. Now Jquery is more then 20kb, plus if you use some plugin you can easy arrive up to 50 kb. And sometimes you use only rounded corners or other cool trick. 50 kb for some cool trick doesn’t make sense. Then we use only 2% of all the framework. I never used Moo because I started with JQuery. One cool thing about Moo is: Moo is modular and you can only the things that you need not all framework.

  3. Rich

    I actually started with Prototype; which was the preferred framework that other developers around me were using then switched to JQuery on my own. To be honest, i couldn’t deal with having to have prototype then add scriptaculous for certain effects. Just my 2cents. It did not have too much to do with file size. Just found a liking to JQuery.

  4. cssProdigy

    I started with Prototype and script.aculo..us after seeing Lightbox by Lokesh Dakar a couple years back. Then I saw the size and I switched to MooTools after seeing slimbox (3kb). I’ve never used another library since. And I got the benefit of MooTools being modular so I got an even smaller size. But to be a flexible developer you should be able to use different JavaScript libraries so i’m trying to get some jQuery in.

  5. Chuck Trukk

    I started checking out moo because a lot of joomla addons used it. I had no idea what I was doing though and most newbie forum posts were met with ‘learn javascript then come back’. (not always but most of the time back in the day).

    So jquery came on the seen. 24 days of jquery really helped me. Thickbox gave me something I needed. Then the plugin repo and tutorial listing on the jquery site sent me off on my way.

    I really like the yahoo library and want to check it out next. It’d be great for me if it adopted sizzle so I dont need to change my selectors / relearn how to ‘get’ an object.

  6. Jeff Hartman

    You should question what the Google trends show because the word “prototype” is too general. Change it to prototype.js or something else and you will see a change (though that is not a good metric either).

  7. I came to you by way of searching for jquery information, and since you periodically cover things in both moo and jquery you’re a good source of information. It’s also interesting to see them in parallel sometimes.

    What I would love to know, as a guy whose fallen in love with jquery and thinks its more than just a framework, but a way of thinking about things to an extent, is why you prefer moo over jquery. that would be really interesting to hear.

  8. Facundo

    imho, JQuery is made for leechers. Their pre-made scripts library aims towards those users.

  9. Facundo, seriously? thats bordering on the ridiculous. Jquery is a an inspired piece of thought, strange to hear someone say something like that. I suppose you dislike api’s in general? still writing your apps in masm?

  10. Chuck Trukk

    Facundo,

    I don’t know if you meant to be rude, but saying it’s made for leechers just compounds the ‘rudeness of mootools’ typecast. I think it is more people are sharing and learning together. Like any Open Source app- drupal, joomla, modx, yahoo UI, linux.

    Is it easy to plug-and-play? yes. But so are the plugins David makes for moo. That’s the spirit behind this.

  11. @Facundo: Most people are leechers, and there’s nothing wrong with that — we were all leechers at one point.

  12. We used mootools from the beginning and never switch, great post… Maybe you could post a poll about what framework for php are the favorite.

  13. @James: I wouldn’t go so far as to call jQuery a “n00b library”, but the framework and community are more beginner-friendly. jQuery most definitely has advanced capabilities as well, so don’t think I don’t believe that.

    The libraries are all mostly the same but with a different theory of how things should be scripted.

  14. my case is almost like @cssProdigy said. right now i’ve using mootools from more than a year. but from a few weeks ago i’ve been looking documentation, community and plugins/examples for jQuery and a really must say that they have a large comunity (also a better site).

    even more, it seems to me that jquery is used/supported on more frameworks/sites/software than mootools (only a thought).

  15. I think that jQuery is the best it has a big future!

  16. I started with jQuery but just as I’d become comfortable with it, MooTools 1.2 was released and so I gave that a try. I found MooTools to be much more to my liking since the code I ended up with was very concise (less than half the file size of the jQuery equivelant). Plus, I love the OOP.

  17. I’m with James (@ the top) in saying that jQuery just feels more “correct” when working with JS. Perhaps it’s because of the selector concept and how well that maps from the HTML and CSS side of things.

    I’ve been using jQuery for a few years now, but used raw JS for many years prior. I will never go back to that nightmare of incompatibility. For me the ultiimate decision on what to use is always how quickly I can have production ready code. jQuery gets me there much faster then any other library I’ve looked at.

  18. I’m looking at switching the framework/library/toolkit at work. I’m actually leaning towards Dojo right now. One thing I really like about it, is you can use the base file, and simply ‘require()’ additional libraries into the page. Seems more modular that way. One thing I don’t like about jQuery is it’s apparent lack for class inheritance/extension or at least the ability to do it easily. Moo and Dojo support this in a much more traditional and clear way.

    I haven’t made a decision yet, it’s a tough one–choosing a JavaScript path for a very large website that we can be on for years to come and not look back.

  19. sunwukung

    I’m looking to adopt a library, and personally I’m up for MooTools since it seems more “pure” and doesn’t obscure the native language it’s built from. I think it’s a taste thing – ultimately, I want to learn/be able to write pure Javascript and use tools provided by a library without sacrificing progress in the core language.

    However, when speaking to my colleagues about why they use jQuery over MT, the answer is twofold:
    1: jQuery is easy
    2: MooTools does not play well with non MT applications/libs

    Given the tight deadlines of an average codeshop, I think that’s fair enough – but I still want to learn MT, I personally don’t really like the taste of jQuery’s massive dollop of sugar.

Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!