[12]Upgrade to mootools 1.2

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

[12]Upgrade to mootools 1.2

Post by jiggliemon » Wed Apr 15, 2009 12:35 am

Joomla 1.6 supports Mootools 1.2 right now in the current trunk. But there is a problem!!!

It includes "More" with the core package. This may be nit-picking. But any chance on having the core team help us out and include a way to either "add" or more likely "unset" the more part of mootools?

I'm working on it personally, but it would be nice if the core joomla devs supported it too... So i don't have to keep modding the html.html.behavior file... every install!

User avatar
p9939068
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 160
Joined: Mon Oct 03, 2005 2:51 pm
Location: Singapore
Contact:

Re: [12]Upgrade to mootools 1.2

Post by p9939068 » Wed Apr 15, 2009 1:35 am

I don't see the problem of just adding the more package. When compressed, the entire package isn't really that big.
-----
Making social sites functional: http://www.simbunch.com/
http://twitter.com/simbunch

User avatar
mark_up
Joomla! Guru
Joomla! Guru
Posts: 849
Joined: Sun Oct 29, 2006 10:51 am
Location: Fiji
Contact:

Re: [12]Upgrade to mootools 1.2

Post by mark_up » Wed Apr 15, 2009 2:02 am

This is bad news and I hope this problem is rectified before final release.
p9939068 wrote:I don't see the problem of just adding the more package. When compressed, the entire package isn't really that big.
Not really that big? for who?
The mootools in J1.5 was around 70K when it could have been 40K... and when it should not even have been loading at all (it had absolutely zero purpose). I'm sure someone in the dev team said "the package isn't really that big".

Now you say that "more" is being loaded.

Does it have a purpose? Anything that is absolutely unessential *must* be stripped out. Let the theme developers add more js when they need to.
http://twitter.com/mark_up.
Opinions expressed are mine alone and don't necessarily represent the views of any organisation I am associated with.

User avatar
p9939068
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 160
Joined: Mon Oct 03, 2005 2:51 pm
Location: Singapore
Contact:

Re: [12]Upgrade to mootools 1.2

Post by p9939068 » Wed Apr 15, 2009 2:32 am

GollumX wrote: Let the theme developers add more js when they need to.
Absolutely not! As an extension developer, I can tell you for sure that depending on template developers to call their own javascript frameworks is the perfect recipe for compatibility disaster in a CMS environment.

The best way to do this is add a param to JHTML::_( 'behavior.mootools' ); Example, JHTML::_( 'behavior.mootools', 'more' ); so that Joomla will know that it should load the more package as well. Without the param, only the core will be loaded by default. This will make Joomla's API the central controller on what script to load. If a particular extension requires plugins from the more package, the developer can then easily add it by calling JHTML::_( 'behavior.mootools', 'more' );

People must start realizing that template designers are not the only people who use javascripts.
-----
Making social sites functional: http://www.simbunch.com/
http://twitter.com/simbunch

User avatar
pollen8
Joomla! Explorer
Joomla! Explorer
Posts: 350
Joined: Wed Aug 17, 2005 10:32 pm
Location: la Rochelle - France
Contact:

Re: [12]Upgrade to mootools 1.2

Post by pollen8 » Wed Apr 15, 2009 6:33 am

People must start realizing that template designers are not the only people who use javascripts.
I agree, the switch in the JHTML call to include more is the way to go.
aka

ghazal
Joomla! Explorer
Joomla! Explorer
Posts: 342
Joined: Fri Aug 19, 2005 12:12 pm
Location: Out of my mind ...sometimes

Re: [12]Upgrade to mootools 1.2

Post by ghazal » Wed Apr 15, 2009 8:26 am

If a particular extension requires plugins from the more package, the developer can then easily add it by calling JHTML::_( 'behavior.mootools', 'more' );
I like that.

user deleted

Re: [12]Upgrade to mootools 1.2

Post by user deleted » Wed Apr 15, 2009 8:33 am


User avatar
mark_up
Joomla! Guru
Joomla! Guru
Posts: 849
Joined: Sun Oct 29, 2006 10:51 am
Location: Fiji
Contact:

Re: [12]Upgrade to mootools 1.2

Post by mark_up » Wed Apr 15, 2009 9:10 am

Before I say anything more. It is obvious you take "template designers" to mean template club/shop designers. This was not what I meant. I meant to say that it should be the choice of the person developing the website. Anyway...

I said ...
GollumX wrote:Let the theme developers add more js when they need to.
(I meant, let the person developing the template for the website decide if he wants "more" to load. Read the rest of that post for context.)

And you said...
p9939068 wrote:Absolutely not!
But then you wanted to be able to do the same.

You are basically saying... template devs shouldn't use "more" as that will cause compatibility problems; but that extension devs can use "more", as it won't cause compatibility problems when they use it. I don''t get it.

My argument is that it doesn't matter what js framework the template shops or extension developers use. That's their choice, and the compatibility problems that come with mixing these frameworks are the problems of the web developers putting these sites together... not Joomla's problem.

If I build a website with the popular extensions jomsocial and kunena (both of which use a different js framework), i wouldn't want mootools loading, and should be able to switch it off via the config panel.

In fact, mootools shouldn't load at all without JHTML::_( 'behavior.mootools' ); in the template.
p9939068 wrote: As an extension developer, I can tell you for sure that depending on template developers to call their own javascript frameworks is the perfect recipe for compatibility disaster in a CMS environment.
Actually, the template developers who use the "recommended" mootools have the most problems with their templates and js conflicts. The template devs who use jquery use it in noconflict mode and it works wonders. Mootools on the other hand is about as cranky as a constipated bear. Try using two or three separate extensions from the JED that rely on mootools together on the same page.
p9939068 wrote: People must start realizing that template designers are not the only people who use javascripts.
Who doesn't realise that? Me? I help run an extension club and I produce templates... so I can speak from both sides of the fence. No matter whether you are an extensions dev or a template dev, if you use a template and extensions that use no js *or* use an alternative library, mootools still loads.

How many terrabytes of bandwidth have Joomla wasted... data sent across the intertubes doing absolutely nothing.

How many potential sales have been lost because mootools tripled the download time of a webpage... to do... wait for it... wait for it...
nothing!
http://twitter.com/mark_up.
Opinions expressed are mine alone and don't necessarily represent the views of any organisation I am associated with.

User avatar
ianmac
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4784
Joined: Sat Sep 24, 2005 11:01 pm
Location: Toronto, Canada

Re: [12]Upgrade to mootools 1.2

Post by ianmac » Wed Apr 15, 2009 1:30 pm

GollumX wrote:Before I say anything more. It is obvious you take "template designers" to mean template club/shop designers. This was not what I meant. I meant to say that it should be the choice of the person developing the website. Anyway...

I said ...
GollumX wrote:Let the theme developers add more js when they need to.
(I meant, let the person developing the template for the website decide if he wants "more" to load. Read the rest of that post for context.)

And you said...
p9939068 wrote:Absolutely not!
But then you wanted to be able to do the same.

You are basically saying... template devs shouldn't use "more" as that will cause compatibility problems; but that extension devs can use "more", as it won't cause compatibility problems when they use it. I don''t get it.

My argument is that it doesn't matter what js framework the template shops or extension developers use. That's their choice, and the compatibility problems that come with mixing these frameworks are the problems of the web developers putting these sites together... not Joomla's problem.

If I build a website with the popular extensions jomsocial and kunena (both of which use a different js framework), i wouldn't want mootools loading, and should be able to switch it off via the config panel.

In fact, mootools shouldn't load at all without JHTML::_( 'behavior.mootools' ); in the template.
But see, that is where you are making the assumption that only templates are using mootools stuff. The way the infrastructure is designed now, Mootools is only used when there is an extension or some other element on the page that requires it. This could be for something as simple as adding captions to image or it could be more complex stuff such as sliders, accordians, AJAX calls, etc.

Templates are *not* the only thing that uses Javascript. Thus, sometimes other extensions invoke JHTML::_('behavior.mootools'), and if mootools does not load as a result, things are going to be broken.

There is an easy way to not get mootools to load, and that is to not use extensions that require it.

Ian

User avatar
mark_up
Joomla! Guru
Joomla! Guru
Posts: 849
Joined: Sun Oct 29, 2006 10:51 am
Location: Fiji
Contact:

Re: [12]Upgrade to mootools 1.2

Post by mark_up » Fri Apr 17, 2009 1:08 am

ianmac wrote: The way the infrastructure is designed now, Mootools is only used when there is an extension or some other element on the page that requires it.
Ian
This is quite embarrassing. I've had a misconception about how JHTML::_('behavior.mootools'); works all this time.

My excuse is that since mootools loads on every page on any fresh default install of Joomla, I assumed J! forced it. (One of these days I'll have to get around to actually learning php)

So in fact, the problem is not the Joomla framework, but com_content and almost all the core Joomla components that call mootools despite not needing js.
ianmac wrote: Templates are *not* the only thing that uses Javascript. Thus, sometimes other extensions invoke JHTML::_('behavior.mootools'), and if mootools does not load as a result, things are going to be broken.
Yup, I'm aware of that. It's obvious that if mootools is needed, it should load. I have never argued otherwise. But here's the question... why make it load *if mootools is not needed* eg. com_content? What was the idea there? Is that mistake repeated in J1.6?

Cheers
Mark
http://twitter.com/mark_up.
Opinions expressed are mine alone and don't necessarily represent the views of any organisation I am associated with.

User avatar
ianmac
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4784
Joined: Sat Sep 24, 2005 11:01 pm
Location: Toronto, Canada

Re: [12]Upgrade to mootools 1.2

Post by ianmac » Fri Apr 17, 2009 2:18 am

GollumX wrote:
ianmac wrote: The way the infrastructure is designed now, Mootools is only used when there is an extension or some other element on the page that requires it.
Ian
This is quite embarrassing. I've had a misconception about how JHTML::_('behavior.mootools'); works all this time.

My excuse is that since mootools loads on every page on any fresh default install of Joomla, I assumed J! forced it. (One of these days I'll have to get around to actually learning php)

So in fact, the problem is not the Joomla framework, but com_content and almost all the core Joomla components that call mootools despite not needing js.
ianmac wrote: Templates are *not* the only thing that uses Javascript. Thus, sometimes other extensions invoke JHTML::_('behavior.mootools'), and if mootools does not load as a result, things are going to be broken.
Yup, I'm aware of that. It's obvious that if mootools is needed, it should load. I have never argued otherwise. But here's the question... why make it load *if mootools is not needed* eg. com_content? What was the idea there? Is that mistake repeated in J1.6?

Cheers
Mark
Com_content loads mootools because mootools is used to implement captions on images.

Ian

User avatar
mark_up
Joomla! Guru
Joomla! Guru
Posts: 849
Joined: Sun Oct 29, 2006 10:51 am
Location: Fiji
Contact:

Re: [12]Upgrade to mootools 1.2

Post by mark_up » Fri Apr 17, 2009 4:34 am

ianmac wrote: Com_content loads mootools because mootools is used to implement captions on images.
Ian
Yup. Have you ever heard of a worse reason to add 70Kb of overhead to a page? Even if you had to add it for captions, how many users actually use that image system? I have not used it in 3yrs of Joomla... preferring WYSIWYG Editors that allow image uploading and embedding.

If there is no way to turn off mootools altogether, at least stop loading it for trivial reasons like captions.

Do you know who is working on com_content in J1.6? I would like to present my arguments to whoever is responsible. While I know next to nothing about php, I can definitely come up with a number of different methods (all more reliable and semantic then js) to display image captions.

I apologise if my earlier posts/comments regarding J!+mootools were off-base, but I would seriously like to do more then just rant about this.
http://twitter.com/mark_up.
Opinions expressed are mine alone and don't necessarily represent the views of any organisation I am associated with.

User avatar
ianmac
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4784
Joined: Sat Sep 24, 2005 11:01 pm
Location: Toronto, Canada

Re: [12]Upgrade to mootools 1.2

Post by ianmac » Fri Apr 17, 2009 1:20 pm

GollumX wrote:
ianmac wrote: Com_content loads mootools because mootools is used to implement captions on images.
Ian
Yup. Have you ever heard of a worse reason to add 70Kb of overhead to a page? Even if you had to add it for captions, how many users actually use that image system? I have not used it in 3yrs of Joomla... preferring WYSIWYG Editors that allow image uploading and embedding.

If there is no way to turn off mootools altogether, at least stop loading it for trivial reasons like captions.

Do you know who is working on com_content in J1.6? I would like to present my arguments to whoever is responsible. While I know next to nothing about php, I can definitely come up with a number of different methods (all more reliable and semantic then js) to display image captions.

I apologise if my earlier posts/comments regarding J!+mootools were off-base, but I would seriously like to do more then just rant about this.
Contributions regarding development of the CMS can be directed to the http://groups.google.com/group/joomla-dev-cms Joomla Development CMS list. Everything is open. All are welcome to participate.

I guess the bottom line is that Mootools is the library that has been chosen, and thus it is used freely where needed in the CMS.

Ian

emeyer
Joomla! Explorer
Joomla! Explorer
Posts: 352
Joined: Thu Sep 29, 2005 2:37 am

Re: [12]Upgrade to mootools 1.2

Post by emeyer » Sat Apr 18, 2009 4:02 am

Certainly, it is nice to have the whizzbang features of mootools, and I appreciate it is a good choice for such features. But I don't understand the *necessity* of mootools. Please could someone explain why it should ever actually be required? Even if kept for administation in the backend, why can mootools not be an option for the administrator for frontend users?

Besides the fact that the long load times for remote users makes Joomla uncompetitive with the inclusion of mootools. There are also many technical problems with integrating a large javascript library, such as namespace conflicts, functional overlaps with other language extensions, and bandwidth doubling during version migration. Consider as one example, most current implementations are still in Mootools 1.1, which means 140K downloads when moving to 1.2, as both versions are needed. This will also be a problem during development, when parts of the core use mootools 1.1 and others 1.2. Even from the developer stance it would make alot of sense to have a mode where mootools is not required.

emeyer
Joomla! Explorer
Joomla! Explorer
Posts: 352
Joined: Thu Sep 29, 2005 2:37 am

Re: [12]Upgrade to mootools 1.2

Post by emeyer » Sat Apr 18, 2009 4:17 am

p9939068 wrote:I don't see the problem of just adding the more package. When compressed, the entire package isn't really that big.
I can explain the problem. When it takes 10 seconds for a customer on a modem to open your website, they lose interest and go away. That's the problem. When I implemented a module requiring mootools on my site, new subscriber rate dropped by a factor of 10. One of the main benefits of Joomla used to be its speed, and if it dosn't stay faster than other CMS systems, it will inevitably lose appeal.

User avatar
mark_up
Joomla! Guru
Joomla! Guru
Posts: 849
Joined: Sun Oct 29, 2006 10:51 am
Location: Fiji
Contact:

Re: [12]Upgrade to mootools 1.2

Post by mark_up » Sat Apr 18, 2009 9:16 am

emeyer wrote:When it takes 10 seconds for a customer on a modem to open your website, they lose interest and go away. That's the problem. When I implemented a module requiring mootools on my site, new subscriber rate dropped by a factor of 10. One of the main benefits of Joomla used to be its speed, and if it dosn't stay faster than other CMS systems, it will inevitably lose appeal.
Exactly! Except where I live, and in most other 2nd and 3rd world countries where most people rely on dial-up and >256Kbps internet, its more like 40 seconds (20 seconds of which is mootools loading).
ianmac wrote: Contributions regarding development of the CMS can be directed to the http://groups.google.com/group/joomla-dev-cms Joomla Development CMS list. Everything is open. All are welcome to participate.

Ian
Thanks, I'll make an appeal there when I have 10 minutes to spare next week.
http://twitter.com/mark_up.
Opinions expressed are mine alone and don't necessarily represent the views of any organisation I am associated with.

emeyer
Joomla! Explorer
Joomla! Explorer
Posts: 352
Joined: Thu Sep 29, 2005 2:37 am

Re: [12]Upgrade to mootools 1.2

Post by emeyer » Sat Apr 18, 2009 9:59 am

By starting a migration to a new mootools version, the load time will double from 20secs to 40secs as some components use different versions. That's the end of joomla basically. I'll offer to help in Google, thanks.

User avatar
ianmac
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4784
Joined: Sat Sep 24, 2005 11:01 pm
Location: Toronto, Canada

Re: [12]Upgrade to mootools 1.2

Post by ianmac » Sat Apr 18, 2009 12:47 pm

emeyer wrote:By starting a migration to a new mootools version, the load time will double from 20secs to 40secs as some components use different versions. That's the end of joomla basically. I'll offer to help in Google, thanks.
You do not have the required permissions to view the files attached to this post.

emeyer
Joomla! Explorer
Joomla! Explorer
Posts: 352
Joined: Thu Sep 29, 2005 2:37 am

Re: [12]Upgrade to mootools 1.2

Post by emeyer » Sat Apr 18, 2009 8:41 pm

Thanks for making me smile :)

I did succeed in knocking out swfobject.js for flash display. By replacing jwplayer with a custom flash player and removing swfobject.js, I reduced initial file load size by another 50KB. I'm hardly going to add it back by putting mootools in! The technique is described here:

http://forum.joomla.org/viewtopic.php?f=472&t=393538

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

Re: [12]Upgrade to mootools 1.2

Post by jiggliemon » Mon Apr 27, 2009 5:42 am

I see this request was added the the accepted white papers. Nice.

User avatar
ianmac
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4784
Joined: Sat Sep 24, 2005 11:01 pm
Location: Toronto, Canada

Re: [12]Upgrade to mootools 1.2

Post by ianmac » Thu May 07, 2009 2:53 pm


Hund
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Tue Jul 07, 2009 3:06 pm
Contact:

Re: [12]Upgrade to mootools 1.2

Post by Hund » Tue Jul 07, 2009 3:52 pm

Upgrading to motools 1.2 was a nightmare. Load time increased about 5 seconds which is extremely much. My site now takes about 11 seconds to load and that is too much.
My dog has it's own website at: http://www.hundefeber.no

lga1983
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Thu Jul 16, 2009 1:42 pm
Contact:

Re: [12]Upgrade to mootools 1.2

Post by lga1983 » Fri Jul 24, 2009 8:12 am

I updated my webpage to motools 1.2 and it is really not working fine... Is there anything that I can do to recover my speed?? This is extremelly slow


Locked

Return to “Accepted - Archived”