Drupal Core: jQuery or Mootools

IAmCorbin - October 21, 2009 - 00:11

I am new to drupal and am quite impressed so far with how smooth the development of this new site I am working on for a client has gone. My only gripe is that Drupal is using jQuery in the core. I think it would be much better practice if this could be separated somehow. I have been learning Mootools and am really impressed by what it can do and the style of coding but to use Mootools means I have to load two different JavaScript frameworks, requiring more code to be loaded to do essentially the same thing.

It would be nice if the Drupal core allowed for a modular JavaScript framework selection, or released a couple different cores for the framework you wanted to work with (I know this would require more work for the core developers, but it would be a great feature).

Thoughts?

Unfortunately jQuery has been

kbasarab - October 21, 2009 - 01:57

Unfortunately jQuery has been built in for so long that most contrib modules and functionality have been built around it. Why not just load the Mootools on pages you want to use it on so you aren't double loading all the time?

when I say double loading I

IAmCorbin - October 21, 2009 - 02:13

when I say double loading I mean using mootools at all. It would be nice to use either all jQuery or all Mootools. I know this may be asking a lot. But possibly in a later version the javascript could be separated from the core, and then the modules could specify whether they require a javascript framework.

~Corbin
http://IAmCorbin.net - Discovering the patterns of life through electronic music

_

WorldFallz - October 21, 2009 - 16:47

Not gonna happen-- base jquery is part of core, all core js is written in jquery, the jquery developers work closely with the drupal team to insure compatibility, and jquery_ui was just added to core for d7. Also, jquery in core for d7 was rewritten so that other js libraries could be easily loaded and used without compatibility problems (meaning you can easily use mootools, prototype, etc with d7 if you wish).

_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.

 
 

Drupal is a registered trademark of Dries Buytaert.