Monday, June 11, 2007

Ditching Mootools For Jquery



Having arrived at the conclusion that I might have to start using a JavaScript Framework to speed up my coding time and at the same time to be more productive, the next thing was to decide which one to choose, out of the plethora of frameworks out there?

Since all I wanted was a tool kit that will make creating a web user interface a lot easier I decided to settle for something lightweight. Something not too bloated with features I will end up not using but a toolkit that makes manipulating the DOM possible with as little code as possible.

The contenders for my attention were jquery and mootools. But now, having played around with the two frameworks, it is jquery that has emerged the framework of choice.

Why I settled for Jquery? Well…

Syntax:


I personally prefer jquery’s syntax over mootools. I think it is more intuitive and leaner. The chain-ability feature of the syntax is also cool. You will easily get accustom to it if you have spent time with object oriented programming.

Selectors:


I wanted to have the DOM at my fingertips. I wanted to be able to get a hold on a node, without having to be too verbose. And this is what Jquery offers. Compared to mootools, Jquery’s Selectors makes accessing the Dom such a breeze. Borrowing syntax from CSS and Xpath you can burrow all the way down or climb all the way up the DOM with a succinct amount of code.

Community


Jquery boast of a much more vibrant community. This is evident in the abundance of plugins that has been written to extend its core functionality. The same thing can’t be said of mootools.

Adoption


Wordpress recently announced that it will be switching over to jquery. A whole lot of other people have already adopted it. So I figured out that if it is good enough for these guys then it would be good enough for me. Really adoption says a lot about a product. I can safely assume that great adoption = great product. Check out those already on Jquery.


I’m right now an advocate of Jquery. And I won’t hesitate to recommend it to anyone.

You can download it and see for yourself.

1 comment:

Sam said...

Nice article dude! I love jQuery and have wrote a similar article here as to why jQuery is better than Mootools!!

http://www.jquery4u.com/articles/jquery-mootools/