Add JQuery and remove mootols

Qlim4X
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Mon Apr 07, 2008 10:11 am

Add JQuery and remove mootols

Postby Qlim4X » Wed Jan 28, 2009 1:01 pm

i think that adding Jquery is more useful than mootools

after 3 years using Joomla i found difficulties with components(VM) and Modules that uses the old mootools or they load different mootools version.

Jquery is more expandable and more reliable and you can add additional library's on the fly.

alfonsobries
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Dec 01, 2008 11:28 pm

Re: Add JQuery and remove mootols

Postby alfonsobries » Fri Feb 06, 2009 7:28 pm

I think the same,

But why dont allow to select the library in the config panel??

User avatar
M4rc0
Joomla! Explorer
Joomla! Explorer
Posts: 311
Joined: Wed Sep 27, 2006 1:47 pm
Contact:

Re: Add JQuery and remove mootols

Postby M4rc0 » Fri Feb 20, 2009 7:50 am

I agree..

Also:

Jquery: 13kb
Mootools: 73kb

Jquery gives us more power.
We could have an option to choose wich library..

AmyStephen
Joomla! Champion
Joomla! Champion
Posts: 7056
Joined: Wed Nov 22, 2006 3:35 pm
Location: Nebraska
Contact:

Re: Add JQuery and remove mootols

Postby AmyStephen » Fri Feb 20, 2009 1:44 pm

We do have an option of which to use. Here's an article to help you get started.
http://www.designvsdevelop.com/using-mo ... in-joomla/

User avatar
M4rc0
Joomla! Explorer
Joomla! Explorer
Posts: 311
Joined: Wed Sep 27, 2006 1:47 pm
Contact:

Re: Add JQuery and remove mootols

Postby M4rc0 » Fri Feb 20, 2009 2:05 pm

But that's not enough..

There it explains how to make sure Jquery will load after Mootools, or how to use Jquery without conflicting with Mootools. That's just the Jquery noconflict() function, nothing to do with Mootools nor Joomla.

What I think it would be interesting is an option to turn off Mootols in Joomlas global configuration, or a combo box where you choose Jquery instead for the slides, tabs, modal windows, etc..

Actually just turning Mootools off would be useful enough already :)

AmyStephen
Joomla! Champion
Joomla! Champion
Posts: 7056
Joined: Wed Nov 22, 2006 3:35 pm
Location: Nebraska
Contact:

Re: Add JQuery and remove mootols

Postby AmyStephen » Fri Feb 20, 2009 2:23 pm

The article I linked you to was a tutorial about building Joomla! extensions. It shows how to use both JQuery and Mootools frameworks simultaneously. It has a great deal to do with Joomla! and there are code examples to help with this question.

To turn Mootools off, try this in the template index.php file:

Code: Select all

$headerstuff = $this->getHeadData();
$headerstuff['scripts'] = array();
$this->setHeadData($headerstuff);


Seriously, though, it is really is pretty straight forward to turn off Mootools 1.1 - to add 1.2 - to use JQuery instead - or to use JQuery with Joomla!. Google this question and see the wealth of information available. We do have choice.

Hope that helps!
Amy :)

User avatar
M4rc0
Joomla! Explorer
Joomla! Explorer
Posts: 311
Joined: Wed Sep 27, 2006 1:47 pm
Contact:

Re: Add JQuery and remove mootols

Postby M4rc0 » Fri Feb 20, 2009 2:47 pm

But that's still coding Amy :D

I already use that code in the header of my templates, but what we are asking here is an option in the global configuration of the administrator, not a hack or how to develop a extension using Jquery (and without mootools - not simultaneously), you know?

As mere webmasters and not just developers or designers.

I just hoped to see that option in Joomla in the near future.

But thank you anyway :)

AmyStephen
Joomla! Champion
Joomla! Champion
Posts: 7056
Joined: Wed Nov 22, 2006 3:35 pm
Location: Nebraska
Contact:

Re: Add JQuery and remove mootols

Postby AmyStephen » Fri Feb 20, 2009 2:53 pm

Dude.

ieskok
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Thu Jan 29, 2009 7:02 pm

Re: Add JQuery and remove mootols

Postby ieskok » Wed Mar 11, 2009 2:28 pm

joomla should not use old fat and slow mootools library, a new jquery 1.3.x would be very great choice because its performance, extensibility, lightweight and does tons of cool stuff out of the box

AmyStephen
Joomla! Champion
Joomla! Champion
Posts: 7056
Joined: Wed Nov 22, 2006 3:35 pm
Location: Nebraska
Contact:

Re: Add JQuery and remove mootols

Postby AmyStephen » Wed Mar 11, 2009 3:31 pm

Then use the instructions, above, to make Joomla! work perfectly for you! :)

ieskok
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Thu Jan 29, 2009 7:02 pm

Re: Add JQuery and remove mootols

Postby ieskok » Wed Mar 11, 2009 4:24 pm

hmmm... thats not a solution

Status101
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Sun Mar 01, 2009 11:10 am

Re: Add JQuery and remove mootols

Postby Status101 » Tue Apr 21, 2009 10:59 am

Nothing here for a while, but thought I would pop my 2 cents worth in.

Firstly let me say how wonderful I think Joomla is, and how impressed I am with it when I think back to my days learning html and thinking how much like very old version of word perfect it was :) How far we all have come..

But in this .js discussion. I, as others here, I am successfully running mootools and jquery together... I dont think thats what people are asking for here...

As the very first post mentioned, until mootools was included in Joomla ( I am new to Joomla so forgive me is I am wrong here, but I assume from the tone of the post it was added at some point ) many extension developers where adding it WITH their extension. This could mean different versions, different load orders etc. and would cause problems. With mootools added natively they don't need to add it individually and [most] problems go away.

Now, with Jquery becoming more popular, particularly with extension developers I have found this happening with Jquery. Its fine to go ahead and correctly add jquery yourself or with a plugin etc, even remove mootools as Amy describes, but then you try to use an extension... thats loads a library (whatever library that it is), and you are back to possibly incorrect load orders, multiple loads, and possible multiple versions. ( I keep having to go through extension directories and blank out jquery.js files : )

I understand that this is not a Joomla issue specifically, but it is something that some sort of core .js library management system/tool/ framework would help, and it would improve the usability and functionality of Joomla for the whole community... 'users' and contributors alike.

If the Joomla administrator and / or extension developer (installer) could choose and activate ( and where appropriate deactivate) multiple js libraries, the the load order, versioning etc. could be controlled at the core and extension compatibility js library conflicts etc. would at worst be reduced and at best become a thing of the past.

I have actually recently installed a plugin (just for a shadowbox so I understand it not the same thing but...) that actually allows you to choose between something like 5 different .js libraries, and re-writes the headers so the load order is correct for each one ( actually took mootools out of where it was in the header and added it to the top of the order ), and it allows you to choose to actually include the other library or not.. in case you have it loaded already. So obviously, this is not beyond some of the brilliant people out there. ( unfortunately I'm not in those ranks :) ) The question I have to ask, is even if every extension developer was this considerate of the issues, would it not be more effective to do it at the core and simply save thousands of man hours.

Of course there would still be issues/complexities, development lead times for extensions etc.. there always are, but with the amount of time the whole community spends working out conflict and compatibility issues, surely the community could be rallied to get this sort of thing going at the core and save thousands of questions / forum posts to Joomla team, and extension developers :)

I'm not suggesting that someone jump in and add this to 1.5 ... but if/when 1.6 or later comes about, think how nice it would be if people stopped arguing about which .js was better, and could just use what got the job done best... and a core Joomla .js framework allowed them to do it.

Anyway, just my thoughts on how Joomla could be even better than it is now.

User avatar
jiggliemon
Joomla! Intern
Joomla! Intern
Posts: 81
Joined: Wed Nov 22, 2006 6:18 am
Contact:

Re: Add JQuery and remove mootols

Postby jiggliemon » Mon Apr 27, 2009 5:53 am

This is a stupid request.
Mootools is more pragmatic than Jquery.
Joomla 1.5+ is a pragmatic system.

Stop asking for more widgets and be happy they've adopted a strong library for programing.

Damn Whiny Developers vis. Designers.

wuffy77
Joomla! Intern
Joomla! Intern
Posts: 57
Joined: Mon Oct 23, 2006 1:23 pm

Re: Add JQuery and remove mootols

Postby wuffy77 » Sat Dec 05, 2009 10:02 am

I'm heavily involved in developing in all the major frameworks and have to say I've noticed mootools becoming more and more sidelined (along with many others) as jquery becomes more and more of a standard, eg for a very high level view of the announcements:

http://www.google.com/trends?q=mootools%2Cjquery

I wouldn't say it's an essential move, rather a prudent one for joomla to consider moving towards the more popular and elegant solution.

A perfect analogy is I could perfectly capably develop a CMS in a less popular CMS like xoops, xaraya et al, however there's a reason vastly more use Joomla! ;)

User avatar
jiggliemon
Joomla! Intern
Joomla! Intern
Posts: 81
Joined: Wed Nov 22, 2006 6:18 am
Contact:

Re: Add JQuery and remove mootols

Postby jiggliemon » Sat Dec 05, 2009 6:29 pm

If popularity is what you fancy, you might want to have a look at wordpress.

wuffy77
Joomla! Intern
Joomla! Intern
Posts: 57
Joined: Mon Oct 23, 2006 1:23 pm

Re: Add JQuery and remove mootols

Postby wuffy77 » Sat Dec 05, 2009 6:51 pm

Why? Joomla's ever bit as popular?

Likewise if obscurity is what you fancy then you might try using L33tCMS - there's a reason jquery is growing, all the major websites are shifting their frameworks towards it BBC dumped prototypejs and took up jquery for the same reason.

If you look at the sites using jquery, it's got some pretty influential names - Google, Microsoft, Amazon, IBM, Twitter, Dell, EA, etc etc etc

Mootools is increasingly poor in comparison.

Furthermore major companies are shifting towards it Microsoft, Nokia, IBM etc... and including it in their own software - Microsoft including it in Visual Studio 2008 is a massive boost for example.

You can be one of these dribbling manufacturers who ploughed on mindlessly supporting betamax as they found it technically better, but I'm simply saying VHS is now the dead cert to become the standard and personally having used both and finding them both great, I find jquery the superior - in modern terms, ie less work for programmer, slightly more for client processing.

In business terms I think the argument ended months and months ago - I agree with the posts above that it's no big deal to pull Joomla into line and run dual frameworks - just not particularly efficient and more importantly, I'd hate Joomla to be damaged because of a few poor choices - drupal have picked better with the benefit of being slightly later to the game and carrying less baggage in terms of legacy support, but Joomla still doesn't do anything wild with javascript as far as I can see?

Would be happy to migrate it if there was a community interest, but depends on that - hate for joomla to become more 'popular' eh? ;)

User avatar
jiggliemon
Joomla! Intern
Joomla! Intern
Posts: 81
Joined: Wed Nov 22, 2006 6:18 am
Contact:

Re: Add JQuery and remove mootols

Postby jiggliemon » Sat Dec 05, 2009 7:52 pm

Wide spread adaption !== Superiority.

Say you were a company and you wanted to create a SaaS system that you were only going to support one browser. What would you choose? IE of course (see: [spam] web).

The fact that MS, IBM Google, Ama, Twitter, Dell etc. decided to adapt into JQuery is not evidence that JQuery is in any way superior. It's simply evidence of JQuery's market share superiority. Factors such as: Finding Developers familiar w/ a library, Accessibility to Plug ins, and the fact that JQuery is closer to a function based toolkit (something most JS writers are familiar with). I work at Toshiba, and the reason they decided to go with JQuery, was because the syntax (ex: .show(), .hide() ) and more importantly the popularity.

All that said, I'm very happy with Joomla's decision to go with a complete more OO structure. Both in PHP and in it's adoption of a JS library. OO fits my development style quite nicely. Where as, the procedural method is still available to the masses in form of Word press and JQuery.

I see Joomla as a developers CMS. In a sense that it's the base for 3rd party developers to create extensions; Plugins, Components, Modules, Templates... what have you. And Mootools at it's core, in Motto and code, to quote the home page, "is a compact, modular, Object-Oriented JavaScript framework designed for the intermediate to advanced JavaScript developer." So with Joomla, as a development platform, Mootools is the obvious choice. Us developers like our classes and extends...... (not extenze... )....

All that dribble said, If/when Joomla decides to forgo Mootools, as it is inevitable, (hense your Betamax, VHS argument) It will be a blow to Joomlas developmentablilty. Prototypical extentions 4 lyfe. And JQuery is not "Better" than MooTools.

http://www.jqueryvsmootools.com/

wuffy77
Joomla! Intern
Joomla! Intern
Posts: 57
Joined: Mon Oct 23, 2006 1:23 pm

Re: Add JQuery and remove mootols

Postby wuffy77 » Sat Dec 05, 2009 9:36 pm

Hmm, I entirely take your point - but it's missing the core argument I'm presenting.

Yes php is probably more efficient than Ruby, I'm certain Assembly is more efficient than C++, but that's not what the key drivers are and 'developers' aren't still soldering transistors themselves, because at the end of the day end-users are the un-upgradeable element in the programming paradigm, hence the fact jquery lightens that load and passes the burden to the machine is something to be applauded. Likewise Moo's OO framework is great, but unfortunately does so at the expense of the end user - which as both you and your link quite rightly say is ultimately what has handicapped it as a framework.

But the fact that MS, IBM, Google, Amazon, Twitter etc etc etc have adopted it - surely belies a little clue as to its dominance not simply being some freak of successful marketing? Whilst I'm sure Toshiba has plenty of able developers, surely the guys at Google, Amazon, Twitter, Microsoft etc know a little about the web too?!? ;o)

But as you say, I think it's not an 'if', rather a 'when' question - but I'd just not like Joomla to go too far down a dead end before needing to reverse!

It's interesting also that you describe Joomla as a developer's CMS - I've never heard that before, most developers (myself included) would view something like Drupal as far more developer-oriented.

Joomla's great strength (which has led to its popularity) was it was a community-driven CMS - an easy to use, quick to adapt, efficient to learn CMS that anyone could pick up and make good-looking sites. It has a massive range of extensions, templates driven by the community which has made it even easier to create a reasonable site with very little learning curve - and this starts sounding an awful lot like jQuery...

User avatar
jiggliemon
Joomla! Intern
Joomla! Intern
Posts: 81
Joined: Wed Nov 22, 2006 6:18 am
Contact:

Re: Add JQuery and remove mootols

Postby jiggliemon » Fri Dec 11, 2009 6:15 pm

jQuery is to JS libraries, what Microsoft is to Operating systems. <-- have fun w that.

We'll have to agree to disagree.

One point I don't get, and that I've heard over and over again, is how Drupal is more of a Development CMS. This makes absolutely no sense to me. Maybe things will be different in Drupal 7? But 6 > was nothing more than a Hands off CMS (file wise) with helper functions. I'm also positive that there's some merit to those who say "Drupal for Development", it's just my experience has proven otherwise.

Mootools has a Plugin Repo now! For the nation for Copy Pasters out there.
http://mootools.net/forge/

Have fun guys.


Return to “Feature Requests - White Papers - Archived”

Who is online

Users browsing this forum: No registered users and 1 guest