2
Feb/09
2

The one real reason to not use JQuery

JQuery is a very nice for DOM manipulation and access.  As I mentioned in my last post, JQuery uses standard CSS selectors by default which is very nice.  You can create fairly complex actions with very few lines of code.

What it does not have that MooTools and Prototype.js both have is a rich set of object oriented oriented development functions.  JQuery is ver DOM centric and does not have much in the way of utilities that are not directly related to accessing and manipulating the DOM.  You can greatly extend the functions of elements in the DOM or add elements to the DOM.  Once you are working with pure JavaScript objects JQuery does not have much to offer.  This begins to become eveident right away when compairing the core sections of both MooTools and JQuery.  In JQuery’s core the first things are DOM element access and creation functions; where MooTools’ core is all JavaScript and OO featrues.  The Extend function is a good example, extend is a core componenet of MooTools and a Utility in Jquery.

Beyond that the true reason for using MooTools is the the object oriented programming features.  The Function and Class features of MooTools are simply not implimented in JQuery.  This makes taking advantage of Encapsulation, Inheritance and Polymorphism very difficult with JQuery, which pretty much leaves all of the work of implementation of those features up to you. 

That being said you can use the JQuery’s noConflict() function and use both MooTools and JQuery.  I have not explored how the two will play together when writing object oriented code with Mootools functions and accessing the DOM with JQuery, but I do plan to give this a try in the near future.

[Post to Twitter]  [Post to Plurk]  [Post to Yahoo Buzz]  [Post to Delicious]  [Post to Digg]  [Post to Ping.fm]  [Post to Reddit]  [Post to StumbleUpon] 

Tweet This Post links powered by Tweet This v1.3.9, a WordPress plugin for Twitter.