Javascript libraries
by Matthias Willerich on April 25 2008, 03:06
If you came across some of my comments in other blogs about this subject, you probably know already that I’m a moo-man.
moo.fx, the addons moo.dom and moo.ajax, I found them really easy to use.
They have been derived from the early releases of prototype (which I initially used as well), and the mentioned libraries come with a lite version of that, stripped to the bear essentials. Now mad4milk has released their mootools, basically a rewrite of the existing libraries, and a nice downloads page where you can mix and match modules for your needs, compiled into one handy file.
If you want to check or extend the code, download an unpacked version for your perusal, only to use a packed version when going live. So many things can be done with such little files. Crazy.
It also incorporates a version of Dean Edwards’ DOMContentLoaded.
Mike’s library of choice is jQuery, which itself stems from prototype (and it’s partly based on moo.fx, too). It came up with the same concept of keeping the filesize low, and it’s selling point must be the excellent documentation. It possibly used to be the pick and mix download panel, but that’s “borrowed” back and improved by mootools now.
They have in turn released the first issue of Visual jQuery magazine to help their and their developer community’s cause.
But the biggest present for their own first birthday must be the release of jQuery 1.1 a couple of days ago. The improvements seem massive, and I’m very tempted to switch…
Both of these come from prototype, which I got to know around the same time as the Dojo Toolkit. Prototype is very well integrated into Ruby on Rails, and liked by many in combination with the UJS Rails plugin. Sadly, both prototype and dojo are, compared to the aforementioned libraries, quite heavy, and I don’t need their particular features in my projects.
Content with Style’s own Pascal uses mainly moo.ajax and Behaviour to easily register, well, behaviours on dom elements. He extends those with custom written object literals in order to ensure separated scopes.
All of us tend to pick and mix for our needs, extending where necessary, always with an eye on filesize.
Of course there’s a million more javascript libraries, and a bazillion ways to use them. That leads me to the question: What do you use? Is it in commercial projects, and where do you see the importance of a filesize/used code ratio? Have you abandoned other frameworks because you found something more tailored to your needs?
Comments
by Mike Stenhouse on January 17 2007, 09:37 #
i can’t remember when jquery it was released (even as beta) but i do remember that the @media 2006 javascript frameworks panel seemed to be all over dojo.
by phpbloke on January 17 2007, 19:08 #
Mootools is nice, and Valerio is insanely talented, but the community involvement around jQuery, plus documentation, plus plugins, AND the Selector syntax and power all make me love jQuery.
I am an OO JS guy and I can still do OO with jQuery.
Honestly, I highly recommend making the move :)
by Nate Cavanaugh on January 17 2007, 22:32 #
Is there any of that back-button funk already built in? And, as Dojo was mentioned, when you look at it in the way of tiny-toolkit (a la jQuery, mootools) against huge toolbox (Dojo, DWR), what’s the real need for the heavyweights?
Integration with the server-side and Push technologies seem to be part of the answer, but is that all? I mean, surely someone could use Dan’s Ruby integration and do some sort of port to Java? And is there anything push-related available in jQuery?
by Matthias on January 18 2007, 02:54 #
by Cody Lindley on January 18 2007, 11:20 #
And there’s a jQuery book in the works!
by Mike Stenhouse on January 23 2007, 05:55 #
by Doug on December 2 2007, 00:05 #
Of course, this is very well possible, but it still has to outweigh coding convenience and size. Since I’ve written this post, I’ve completely abandoned moo, by the way, the fact that they changed syntax for the 0.93 of mootools and then again for the first release was too annoying. Too many code examples were based on something old. If I can I’m using jQuery now, otherwise it’s mostly prototype. And that’s purely based on coding convenience, not size or speed.
by Matthias on December 2 2007, 04:48 #