Monday, April 27th, 2009

MooTools 1.2.2 and the new MooTools More Plugin Library

Category: MooTools

<>p>The MooTools team has been busy over the last week. Last Thursday they released MooTools 1.2.2:

MooTools 1.2.2 is a mainly a bug fix release but it also includes an almost entirely new Class.js. The reasoning behind this is that the old Class.js didn’t play nicely with some advanced usages of this.parent() present in the new MooTools-More. We already had the script ready and tested in the MooTools 2.0 branch so we simply “backported” it to 1.2.2. Other than providing the parent fixes, the new Class also features a much more robust inheritance model, especially when dealing with objects.

For example, the objects you implement now in a class are merged if an object with the same name is found in the class prototype:

  1. var Animal = new Class({
  2.     options: {
  3.         color: 'brown',
  4.         says: 'hissss'
  5.     }
  6. });
  7.  
  8. Animal.implement('options', {says: 'meow'});
  9.  
  10. // Animal.prototype.options is now {says: 'meow', color: 'brown'};

This is especially useful when overriding default options in classes, such as Request.

Upgrading to this version of MooTools only requires that you drop in the new version. There aren’t any changes that require changes to sites that implement these features.

MooTools More

Also with this release comes a large update to the MooTools plugin library, MooTools More. Previously this portion of the project featured about a dozen add-ons. The new release features 48 plugins, adding things like FormValidators, new effects, JSONP support, numerous enhancements to native objects like String and Element as well as robust URI and Date classes. They plan on adding new plugins regularly as this portion of the library grows over the next several months.

Clientcide

Relatedly, MooTools contributor Aaron Newton has released an updated version of the Clientcide MooTools Plugins to support these new plugins. Many of the plugins that are now officially part of the MooTools project came from Clientcide’s collection of plugins. For anyone using the Clientcide plugins you can find compatibility scripts on the download page there. He notes that there are one or two breaking changes for users who were using some of the plugins that moved over to MooTools More.

Posted by Rey Bango at 9:34 pm
14 Comments

+++--
3.6 rating from 69 votes

14 Comments »

Comments feed TrackBack URI

Clientcide link is broken.

Comment by sixtyseconds — April 28, 2009

I have no idea why they keep supporting mootools when jQuery is so much better and easier to use…whats the point?

Comment by vsync — April 28, 2009

@vsync: Haha, you’re kidding, right?… Right?

Comment by rasmusfl0e — April 28, 2009

MooTools 1.2.2 is already amazing, the upcoming 2.0 is even more stunning!

@vsync: If you don’t look beyond the rim of your teacup, you limit your options.

Comment by digitarald — April 28, 2009

The new Moo More rocks the freaking Casba!

Not-at-all-serious-prediction:

…When Moo 2.0 comes out, the moniker “2.0″ will instantly be cool again shrugging off all previous attachments to lame web startups who confused JavaScript and AJAX with a version number for the entire internet… well I can dream can’t I?

Comment by csuwldcat — April 28, 2009

@vsync: Seriously dude, let’s do a challenge and test this, I bet I code you under the table using Mootools and not your: “so much better and easier to use” lib. You can keep checking .length on your object returns, I’ll stick to $$!

Comment by csuwldcat — April 28, 2009

how do you “code someone under the table”? lol

Comment by ajaxery — April 28, 2009

Every time I see mootools code or little kids spamming, looking for mootools attention in completely unrelated topics, I just cringe. What is it with mootools? It appears to be created for people who are new to javascript, and don’t really know what they’re doing?

Comment by Gavin — April 28, 2009

@gavin – yeah…erm…this topic really is unrelated to MooTools isn’t it? :P

Comment by sixtyseconds — April 29, 2009

Well, jQuery learning curve is extremely fast and easy..
and it have never ever failed me in any of my projects, with
thousands of written code..and hundreds of super helpful plug-ins, so I really can’t think of any reason why I should learn mootools,
please I really want someone to give me a reason to. I just can’t think of any..

Comment by vsync — April 29, 2009

@vsync – I’m not about to argue like a fanboy, but perhaps I can offer a good reason…an object oriented approach to Javascript. I’m sure jQuery code is reusable, but the comparison is the same for procedural over object oriented programming. Neither is *always* better. Both can work.

After coding loads using both, I prefer MooTools for this reason mostly. It’s just easier for me to add to my codebase for all the same reasons that using OO is easier for me than procedural.

Comment by sixtyseconds — April 29, 2009

Thanks, I will check mootools out.
maybe we come from different approaches.
perhaps you come from the work of large and complex scalable projects involving javascript, and myself, I come from the world of every-day web design approach. when I need a modal box popup or a calender or a color picker, or even something as simple as
$(“a[rel='ext']“).attr(“target”,”_blank”);

i turn to jQuery…its like my right hand for the job. never fails..

Comment by vsync — April 29, 2009

@ Gavin:

Wow, I am speechless: “What is it with mootools? It appears to be created for people who are new to javascript, and don’t really know what they’re doing?”

Of course since you phrased this the way you did you obviously haven’t written one line of Mootools in your life. I like the unfounded sweeping generalization with undertones of uneducated assumption…

To be quite frank, I really think (not to be haterish because jQuery can do anything all the rest can do) that jQuery is actually the choice of beginners. Case in point, the company I work for has a staff of designers that put out some of the most outdated garbage I have ever seen. A guy who knew jQuery well came to the company and started using it and the designers loved it because it was “so easy”, the catch was that what it was “so easy” for them to do was write terrible javascript that needs to be entirely rewritten constantly. I think people like that gravitate towards it because it is easy to take that first step with jQuery, it can be a blessing and a curse.

Now that Microsoft has included it I would expect to see so extra terrible jQuery code floating around, who knows what that crowd could do to bastardize the lib… (disclosure, I operate a site in .NET too, so don’t rag on me about hating MS…)

Comment by csuwldcat — April 30, 2009

Designers with jQuery is like lab monkeys playing with toys :)
I agree, this can get ugly. although they rarely publish anything..
so its less then a “virus like” thing.. just a local plague, sort of.

Comment by vsync — May 1, 2009

Leave a comment

You must be logged in to post a comment.