Archive for September, 2007
I have just completed a project using Mootools exclusively for the javascript.
SELECTORS:
I found the $ and $$ selectors to be extremely useful. The $selector will return a single object based off of a name. The $$ selector will return an array of objects to work with based off of CSS selectors and more. The $$ function is where I found the most power because it allows you to collect a set of elements quickly, recurse through them and apply an action and repeat in very few lines. I used the $$ function to recurse through input elements and add a change event to them. I often had problems with the $$ selector selecting more elements than I wanted. It seemed to be using an “or” on my conditions when it said it would use an “and”. I was able to correct it by trying alternate selectors.
AJAX:
calls and handling are incredibly simple and powerful, but I had difficulty manipulating the return object without putting it in the DOM somewhere first.
DOCUMENTATION:
There is a lot of documentation for Mootools but I came to quickly find out that most of it is just a listing of method or property names, with very few examples. The examples that are provided are very useful. When I posted anything in the forums I got a fast and helpful response.
RECOMMENDATION:
I would recommend this framework to the javascript developer that is looking for a good set of utility libraries and is performance conscious, not an HTML developer that is looking for an easy way to add javascript to their page (For that I’d recommend Dojo). I’m working with jquery now, and I find a lot of the powerful features I appreciated in Mootools are also in jquery. I will write a little comparison between the 2 of them after I have used jquery as much as Mootools.