Favorite JavaScript Library
Written By elliothere on Feb. 20, 2007.
28 Comments
Report Note
+ Clip This
What's your favorite JavaScript library (or do you not use them), and why? Or do you use different ones depending on the project?
I usually use prototype with some extensions (such as script.aculo.us's effects.js), just because I'm most comfortable with it, though I have used others as well.

Oli
Written Feb. 20, 2007 / Report /
MOOOOOOOOTOOOOOOOOOOOOOLS!
Prototype (et al) is ugly in comparison.
elliothere
Written Feb. 20, 2007 / Report /
I've used moo.fx a little bit, haven't tried mootools yet though...it does look pretty impressive.
Kyle
Written Feb. 20, 2007 / Report /
Prototype + MooTools.
I love MooTool's class system and effects engine, but Prototype is just so much more powerful (can I seriously get some Element#up Element#down action in MooTools?).
Oli
Written Feb. 20, 2007 / Report /
Yeah it's a completely different beast... Well the code is prettier, more powerful and lighter but it's still awesome =) Valerio and helpers seem to know what they're doing.
The download system is one of the best parts. Just pick what you need and it'll compile and compress the result for you but I would recommend getting the whole lot uncompressed while you develop and then download a compressed version of the things you use for your release version.
Typically, you're looking at 20k vs Script.aculo.us's 200k.
Oli
Written Feb. 20, 2007 / Report /
Some what action, kyle?
Mike
Written Feb. 20, 2007 / Report /
I hate JS libraries.... they're so damn bloated that they suck the pageload down right into the toilet. My goal in life is to keep them off 9rules pages unless absolutely necessary, and in that case, try to rewrite it so that it doesn't have to use the entire Prototype or Script.aculo.us library.
rickcurran
Written Feb. 20, 2007 / Report /
I've used the Script.aculo.us library within a CMS system I've developed, but there is a lot of code in there that I just don't use mostly. I think the Moofx is fairly lightweight though in comparison. I mostly just write it myself as I mostly just have show / hide functions for elements on the sites I build.
I think the Spry libraries are going to get quite a lot of increased usage soon, not sure whether this will be a good thing or not?
Oli
Written Feb. 20, 2007 / Report /
Welcome to Mootoolsland, Mike. Combating what you've just said is exactly their aim.
Choose only what you need and compress -- straight from their page -- and even if you take everything, it only takes up 33k compressed.
Once again for anyone that reads this low before replying:
Mootools is not Moo.FX. Mootools is a completely modular and more efficient rewrite.
Mike
Written Feb. 20, 2007 / Report /
Does it require Prototype Oli?
Oli
Written Feb. 20, 2007 / Report /
No. It has it's own mega-small version (that replaces the functionality) built in.
Mike
Written Feb. 20, 2007 / Report /
Whoa, first time going to the new Mootools site and it looks hot!! Okay maybe I'll use that now :)
Oli
Written Feb. 20, 2007 / Report /
Haha yeah I almost miscarried (figure of speech -- I'm not a woman, despite the hair) when I saw their v1 site. "Pretty" doesn't come close.
Kyle
Written Feb. 20, 2007 / Report /
Oli: Check out Prototype's Element#up and Element#down and other DOM traversing functions. They're pretty much the coolest thing since sliced bread.
Mike: So, you've got issues with a one time ever download of a js library, but no problem with 100k worth of images on the homepage? ;) Hell, even the massive prototype is only about 20k compressed.
Oli
Written Feb. 20, 2007 / Report /
Kyle are they the same as MT's:
getPrevious: Returns the previousSibling of the Element, excluding text nodes.
getNext: Works as Element.getPrevious, but tries to find the nextSibling.
getFirst: Works as Element.getPrevious, but tries to find the firstChild.
getLast: Works as Element.getPrevious, but tries to find the lastChild.
getParent: returns the $(element.parentNode)
getChildren: returns all the $(element.childNodes), excluding text nodes.
Mootools has tons of DOM traversal in Element.js
Kyle
Written Feb. 20, 2007 / Report /
Totally different dude. Prototype's ties in the selector class. i.e:
$('test').down('ul.products li a.selected');Oli
Written Feb. 20, 2007 / Report /
Ok... but why would you do that when you can do:
$E('#test ul.products li a.selected') to get the element..? I don't see the power in the up or down
If you want to iterate li's you can use:
$$('#test ul.products li') << returns an array
Perhaps I just can't imagine the scenario where up and down give you edge...
Kyle
Written Feb. 20, 2007 / Report /
Trust me, it's EXTREMELY useful.
Because I don't just deal with Id's. Say you've got a click handler on an a tag that needs to do soemthing to the ul above it.
$(this).up('ul').doSomething()It's probably the most useful function I've found since the
$$Adamfortuna
Written Mar. 3, 2007 / Report /
It's been a few months since I worked with anything, but it was always Prototype/Scriptaculous at the time. From what I've seen from examples though, mootools and yui seem the most responsive, and jquery seems like the largest community/most docs. I think I'll be learning yui next though, just because of the amazing work done towards yui-ext and the tons for yui.
sjslovechild
Written Mar. 3, 2007 / Report /
I'm using Script.aculo.us to develop a online portfolio and blog. I think that the file size is large but it seems very easy to develop with. I'm going to give Mootools and Prototype a look.
Heliologue
Written Mar. 4, 2007 / Report /
No mention of jQuery yet? Granted, it has a fraction of mootool's and prototype's popularity, but considering that Wordpress may very well include it for the admin area in 2.2, I'm surprised no one's brought it up yet.
brandonrichards
Written Oct. 12, 2007 / Report /
jquery rules.
posure
Written Oct. 12, 2007 / Report /
I usually use Mootools, primarily because of how clean and well-written the source code is. That said, jQuery is very powerful and probably just as slim but I tend not to use it because the source code is ugly and inconsistent.
xirclebox
Written Oct. 18, 2007 / Report /
Hmmm... There are a few but I would say Script.aculo.us is what I use the majority of the time.
chapstick
Written Oct. 19, 2007 / Report /
Well, I just started getting into javascript. I've been teaching myself things little by little. But I started messing around with jQuery a few weeks ago and I absolutely love it! Obviously, compared to my bloated, amateur javascript coding, jQuery allowed me to completely streamline it all.
I haven't tried any other libraries out yet, because, like I said, I just got into javascript several months ago.
Esherido
Written Oct. 26, 2007 / Report /
Mainly jQuery; though sometimes I'll jump back to script.aculo.us if I need to make something quickly and easily without having to think about it much.
cpoteet
Written Nov. 10, 2007 / Report /
I love Mootools for the effects and modularity, I love jQuery for the maturity and extensive API, but if I actually need to accomplish something I use script.aculo.us. The previous two I'm baffled on how to use them (especially Mootools).
There are other good ones such as extJS and Dojo, but at the end of the day if I have to design it I use script.aculo.us.
jchristopher
Written Nov. 11, 2007 / Report /
I've been using mootools for quite some time, but I've decided to give lots more attention to jQuery. I try to at least check out quite a few JavaScript libraries, because at the end of the day, a certain library could be more useful when compared to another for a particular project.
For quick and dirty projects, I often find myself using Robert Nyman's DOMAssistant -- quite small, quite useful.
alexsuraci
Written Nov. 11, 2007 / Report /
After using Prototype and Mootools extensively, I've firmly landed on jQuery.