One of the great things about Mootools is that you can extend the core functionality at your will. Quite literally, you have the force. But one thing I’ve seen recently, and more often than you would think, is that people come up with a simple single method extension of something that should be added to the core but then it’s rejected.
One such example is this neat code that togglesEvent(s). Does Mootools have toggleClass? Why not add them in? It’s fair, right?
I think it’s fair (not to add it). The toggle events methods presented above is an example where the user has a need to speed-up a repetitive task or an idea to help others but instead of bloating the core library, you could easily make a simple Addon-library for Mootools. There is a library like that already. It’s a library for a library. It’s Moo.rd! It adds tons of things to Mootools functionality. I don’t know what kind of coverage Moo.rd has across the web of Mootoolers but I certainly think that if you had added Moo.rd with Mootools as either Core/More, Mootools would’ve exploded.
I’m not promoting or talking about showing off neat ideas I’ve seen in the invalid lighthouse tickets though. I’m talking about Mootools in general. If the developers were to add all of the syntax, shortcuts, new ideas, wasteful optimizations and other obscure things, it wouldn’t be the Mootools way. It would be My Objectified Usable Tools. (Bad joke?) I’ve always wanted a quick method for attaching domready to window. Why didn’t Mootools have an equivalent to jQuery’s .ready method? It’s not needed, it’s bloating and if you do need it, simply make your own library for a library solution. If it becomes very popular, it could be apart of the Mootools Core someday.
And not to mention, one day soon (…), we’ll have the Mootools Forge for plugins. I imagine that plugins will be concatenated together and compressed automatically. At that time, plugins for developer usability be easy. If we group usability plugins together, call it mooUser and get it on a CDN, we’ll be in heaven.
There’s also all the Clientcide plugins:
http://www.clientcide.com/js
http://www.clientcide.com/docs
http://www.clientcide.com/wiki
Thank you for the great article, Ryan!
Moo.RD is really, really powerful and highly extensible, i like it more than others mootools plug-ins and i’ve used it in many situations —
What’s your favourite Moo.RD plug-in?
Kantra
Sorry, the submit button treated me, i missed: “my favourite’s Moo.RD plug-in is Fx.Cycles.fadeZoom”. I agree with you considerations, the modular structure of mootools allows the creation of many extensions that can be as modular as they too.
Sorry again for the double comment.
Kantra
No problem. My favorite Moo.rd plugin is probably Cycles Scroll because it helped me on a project I was working on a while ago. It worked out great because I would’ve had to write my own and I know it wouldn’t have been nearly as pretty. The only thing I can say that’s bad about Moo.rd, although memorable, is the design of the site it’s hosted on. Otherwise, it’s excellent.
Hi Ryan,
i also agree with your considerations, but it’s not the Mootools philosopy, this is the OOP philosopy. It’s main goal is to provide an highly reusable code, and Mootools, like a lot of other applications, implements this concept.
A little consideration about the (great) Moo.rd library.
Although i’m not a complete Mootooler (i use also others frameworks) my opinion about Moo.rd is quite simple: it’s a very good piece of code, the only Mootools extension i’ve ever used.
However, when you said: “I don’t know what kind of coverage Moo.rd has across the web of Mootoolers…” i can reply saying it seems that the Mootools Team tends to stay away from Moo.rd, maybe because it’s so good and popular. I find a lot of material about Moo.rd around the Web, like articles, tutorials, etc, but there’s no mention about it in the ‘mootools extensions’ chapter of the Mootools Official Book i’ve recenlty read… very strange.
Other frameworks tends to integrate themselves with the high-quality plug-in extensions developed by developers (i.e. jQuery UI) and this is a good practice, that respond to the question you asked in the article.