The journey was interesting, to say the least.
I couldn’t find a HOWTO to get me started. I tusked around for a while on the net and found several supposed tutorials on writing MooTools plugins, but none of them gave me what I needed to start with. They were all about adding classes to the framework, and that’s not what this was supposed to be doing.
So I dove into the codebase itself. After several wrong starts heading down blind alleys, I stumbled on a starting point — the element class. The information I found was divided between Element.implement and Element.extend, so I picked one and began (naturally, I picked .implement and I needed .extend). Then, as the project continued, I realized Element wasn’t the right choice, and it should have been Elements.
Anyway, after about 15 clock hours on the project (time spent mainly on wrong turns and finding out what *doesn’t* work, and trying to separate my own mistakes from what MooTools doesn’t allow) I finished the code. What did I learn?
Barrier to entry is definitely much higher with MooTools than with other libraries. While I would certainly be foolish to blame the MooTools library for my mistakes and wrong turns it does highlight a weakness in the supporting docs. There seems ample support for elementary work with it, what I call “Gentlemen, this is a football” tutorials. But if you ever plan on taking the next step, you’re standing in front of a cliff face with a couple of pitons and a rubber mallet. It’s climbable, but be prepared to work.
I had a few offers of help, but the biggest difficulty was I didn’t know enough about the internals of MooTools to know the right questions to ask. I couldn’t find any sort of guide for plugin writing, which left me standing around wondering where to begin. (Like any other climb, you can’t get up the learning curve until you find some secure footing at the start.) Maybe that was by intention, I don’t know what the attitude is among the MooTools people towards third-party extensions of the library (vs users of the library).
The bottom line from my excursion? MooTools is as capable as the other two libraries (proto/script and jQuery) but my experience failed to give me a reason to use it anywhere but Joomla. The barrier to entry is higher than with the other two libraries, and the performance is certainly no better in any meaningful way. (I’m interested in more than just raw speed. I prefer proto/script for UI stuff, especially things like sortable lists, because it’s easy to set up and extremely reliable, a specific area where jQuery fails miserably, for example.) I find jQuery much simpler to use for the small touches I might want to add here and there, and Prototype/Scriptaculous for the larger js-based systems I build. MooTools just doesn’t fit in that scheme.