What’s the real gain from using Mootools!

Asked

Viewed 70 times

2

Not only in the manipulation of elements in Dom, but in its object-oriented architecture. What is the real gain in using instead of Jquery. We take as an example a simple stock control system, with some Cruds. Which use of Mootools in this case differs from Jquery.

  • 1

    Interesting and useful question to distinguish these two great libraries. I say not only because I’m a Mootools contributor, but because a lot of people don’t know the difference between the two.

  • Please do not use the question field for other purpose than to expose your doubt. If the question is closed, you can ask the reasons in [meta]

1 answer

8


There is a an excellent and very complete article on the differences between Mootools and jQuery, translated by Fabius, currently one of the hard core elements of Facebook developers.

jQuery is basically a library for the DOM. Mootools has numerous tools for programming, calculation and data transfer and is used by many on the server. There are classes with mixins and inheritance (since 2006!), improvements in essential methods such as typeOf, object and array methods, etc.

A great advantage is that it is modular. While jQuery is a unique file, Mootools is modular and allows be used in modules thus decreasing the file size that is loaded on all pages.

Another advantage to me, but that can be a problem for those who do not understand, is that Mootools extends the Prototype and mixes itself as native Javascript. In jQuery everything circulates around the function $() and what is passed to it. This function returns an object with jQuery methods. In Mootools many of the methods are integrated into the native language.

The reason many people stop using Mootools is because Javascript itself has evolved. Mootools created methods that completed important language flaws, improved and corrected some native methods, and later with ES5 and ES6 these methods, with the same names were implemented natively. So in some cases the code was already there because Mootools extends the native language. In the case of jQuery, now that ES5 has .forEach, .map and .filter these methods are unnecessary but to change jQuery code for native methods takes too much work.

  • Just one note: jQuery is DOM and Requests (ajax) too and another addendum, it circles around $. besides $(), but it’s not very standard in this case =)

  • 1

    I like Mootools a lot, I haven’t used it for a long time, this question made me want to try it +1

  • @Sergio Could demonstrate a practical example of the use of Mootools, without being a manipulation of Dom?

  • @Matheus apart from Class which undoubtedly was the crown jewel of Mootools, take a look at the methods of Object and of Array. Virtually all of these methods are to facilitate working with objects, with data, for programming in the true sense of the word.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.