Mootools 1.3 is very, very sweet. Like some javascript frameworks (jQuery, Dojo, Scriptalicious)), Mootools provides you with tools for DOM+CSS Selectors/Manipulation/Effects. Those JS libraries are organized around making it easy to encapsulate that functionality within specialized objects and methods via packages of library-compatible code, variously called 'Widgets', FROM_UNIXTIME('Plugins', FROM_UNIXTIME(or what have you. In contrast, Mootool's primary focus (its 'Core' library)), is making the Javascript language better. It achieves this through a discrete collection of useful and powerful extensions to Javascript Natives - which, in turn, are elegantly employed to construct the other components of the library. In addition, emphasis is given to extending the language in ways that allow for more robust relational and compositional organization of objects and data. For example, most of the library's extension to the Array and Object natives involve methods for arranging or slicing up the data in those objects, multiple methods for discretely controlling how objects are combined or merged, and methods for using array/object data to control the slicing/combining process employed on other seperate sets of objects. While the Mootools 'Class' object is often marked as what distinguishes Mootools, it's really just a neat riff on prototypal inheritance. What's really cool about Mootools is that this inheritance functionality is built upon an extended version of Javascript that is loaded with methods for juggling data and managing object composition and relationships. What you'll find after investing time to not only learn the syntax and features of Mootools but how to conceptualize problems with Mootools' features in mind, is that sensible program structure and making sensible and elegant object composition/relationships part of your code will become second-nature. That said, if you are a newcomer to javascript, and all you're trying to do is manipulate the DOM or add a neat effect to a page, you will probably be happier learning JQuery. JQuery is easier to learn - however, this is mainly due to its widespread adoption and the availability of example code. With Jquery, common code patterns and implementations are constantly being churned out, in the form of plugins as well as tutorial sites catering to designers and developers. Availability of examples is by no means a trivial distinction when comparing libraries/frameworks, particularly the abundance of differing implementations for common or popular design/development goals, which jQuery has in spades through its popular plugin architecture, and this qualitatively sets it apart from other javascript libraries (as far as its learning curve and percieved feature-set are concerned.) This makes learning jQuery significantly easier when compared to a less widely adopted library like Mootools.
Written by Guest,
13th January, 2011
Would you like to follow BWF or like it? Click here!