[RFC|Merged] Use Google's jQuery

These requests for comments/change have lead to an implemented feature that has been successfully merged into the 3.1/Ascraeus branch. Everything listed in this forum will be available in phpBB 3.1.
Post Reply
User avatar
VSE
Extension Customisations
Extension Customisations
Posts: 670
Joined: Mon Mar 08, 2010 9:18 am

Re: [RFC] Use Google's jQuery

Post by VSE » Mon Sep 26, 2011 5:13 pm

callumacrae wrote:jQuery use the google CDN, and then themselves as a fallback. They don't like people using them as a CDN.

(iirc)
True that jQuery's site uses the google CDN.

But I was referring to the CDN jQuery.com has set up, which is provided through MediaTemple.com, using this link (http://code.jquery.com/jquery-1.6.4.min.js).

(All 3 CDNs are listed here: http://docs.jquery.com/Downloading_jQuery)

So even that kind of proves the point that although jQuery has set up a CDN of their own, even they still prefer to use Google's CDN! And if anybody is going to need jQuery to reliably work more than anybody else, it is jQuery.com!! :D
Has an irascible disposition.

User avatar
VSE
Extension Customisations
Extension Customisations
Posts: 670
Joined: Mon Mar 08, 2010 9:18 am

Re: [RFC] Use Google's jQuery

Post by VSE » Mon Sep 26, 2011 6:34 pm

So I'm looking for some sort of consensus here:

Are we going to go super simple with On/Off - Hosted using Google CDN?

Or keep the current version which offers local or the 3 CDN options?

(Personally I'm now actually leaning towards just the simple on/off for serving from Google's CDN option)
Has an irascible disposition.

User avatar
callumacrae
Infrastructure Team
Infrastructure Team
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: [RFC] Use Google's jQuery

Post by callumacrae » Mon Sep 26, 2011 7:52 pm

VSE+ wrote:So I'm looking for some sort of consensus here:

Are we going to go super simple with On/Off - Hosted using Google CDN?

Or keep the current version which offers local or the 3 CDN options?

(Personally I'm now actually leaning towards just the simple on/off for serving from Google's CDN option)
imo, on / off with googles CDN.
Made by developers, for developers!
My blog

User avatar
VSE
Extension Customisations
Extension Customisations
Posts: 670
Joined: Mon Mar 08, 2010 9:18 am

Re: [RFC] Use Google's jQuery

Post by VSE » Mon Sep 26, 2011 10:29 pm

Here are the two options:
Screen Shot 2011-09-26 at 3.27.08 PM.png
Simple Google On/Off
(55 KiB) Downloaded 1620 times
Screen Shot 2011-09-26 at 12.32.37 PM.png
multiple CDN choices
(77.67 KiB) Downloaded 1620 times
Has an irascible disposition.

User avatar
ToonArmy
Registered User
Posts: 335
Joined: Fri Mar 26, 2004 7:31 pm
Location: Bristol, UK
Contact:

Re: [RFC] Use Google's jQuery

Post by ToonArmy » Mon Sep 26, 2011 11:44 pm

Oleg wrote:As I said, you need to have certain conditions. Try loading a script from a site which blackholes all traffic sent to it, or that accepts a request and sleeps for 1 hour. On freebsd, https://bugzilla.mozilla.org/show_bug.cgi?id=684758 causes firefox 3.x-6.x to burn 100% cpu indefinitely when it tries to connect to a port where nothing is listening.
The argument against the fallback based on these conditions is flawed, it doesn't matter if the fallback is employed or not you're still in trouble.

However I would adjust the language of the ACP to make it clear that in the event of a failure "phpBB will attempt to fallback".

But, another ACP option makes me cry. If this is off by default (as it should be imo) do we really need an admin interface for it? Do we just hide it away as an advanced feature?
Chris SmithBlogXMOOhlohArea51WikiNo support via PM/IM
Image

Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: [RFC] Use Google's jQuery

Post by Oleg » Tue Sep 27, 2011 12:55 am

ToonArmy wrote: The argument against the fallback based on these conditions is flawed, it doesn't matter if the fallback is employed or not you're still in trouble.
I was making an observation, not arguing against the fallback.
ToonArmy wrote: However I would adjust the language of the ACP to make it clear that in the event of a failure "phpBB will attempt to fallback".
Good idea.
ToonArmy wrote: But, another ACP option makes me cry. If this is off by default (as it should be imo) do we really need an admin interface for it? Do we just hide it away as an advanced feature?
I suppose this depends on whether the target audience of this feature is more or less technically inclined.

On the same note, I'm thinking people want buzzword compliance out of this feature (and shipping data to google) more than selecting a cdn. Unless there is actual demand for using a cdn other than google, cutting the options down to "included" and "google" seems like the way to go.

If we do decide to go with just two options, the url should be overridable either via a configuration entry or constant. Somewhat inconveniently, right now editing a constant is probably easier, but when (if?) we implement an about:config-style editor editing configuration there would be easier.

Edit: considering that different cdns apparently munge version numbers in different ways, I'm wondering if the other cdns can be provided via extensions.

User avatar
naderman
Product Manager
Product Manager
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany
Contact:

Re: [RFC] Use Google's jQuery

Post by naderman » Tue Sep 27, 2011 1:01 am

I guess I'll say it again. Any constant for configuration is worse than not having the option at all. If something is not worth enough to receive its own option in the ACP, it's not worth having in the software at all. This particular feature is definitely worth having and should become a new option in the ACP under load settings. We have plenty of less import options we should review and potentially remove. This is not one of them.

Hiding options is worse than having too many options. When adding hidden options, you still increase the number of options. However you now have options that are no longer easily configurable, it's a lose/lose situation.

You should also consider that pretty much nobody is going to make use of a hidden option. You would have to be in some really bad circumstances to start looking for a hidden option for something you didn't even know was possible. This setting is useful to a large majority of all phpBB boards, and improves user experience, it deserves to be used.

User avatar
VSE
Extension Customisations
Extension Customisations
Posts: 670
Joined: Mon Mar 08, 2010 9:18 am

Re: [RFC] Use Google's jQuery

Post by VSE » Tue Sep 27, 2011 2:44 am

I will bring this down to a single Yes/No option using the Google CDN then.

Of course, using the included version of jQuery is the default setting.

The Google CDN url will be stored in the database as a config variable, where as Naderman suggested earlier, an adept user really wanting to switch to another CDN than Google can do so through the db, or they could ask the MOD community to build a more advanced jQuery service MOD.

PS: What is the best location for this?:

General->Board Configuration->Board Features->Load Settings
-or-
General->Server Configuration->Load Settings->General Options
Has an irascible disposition.

sajaki
Registered User
Posts: 86
Joined: Mon Jun 21, 2010 8:28 pm

Re: [RFC] Use Google's jQuery

Post by sajaki » Tue Sep 27, 2011 8:12 am

You all seem to forget that having a hosted cdn means you're forced to use the latest version of jquery, whereas quite alot of frequently used jquery plugins are not up to date to the latest. Just an example, jquery Tools. it's just awesome, but it's only compatible until jquery 1.6.2, and that's only for jqt 1.2.6-dev. So letting modders decide if they wish to include a jquery 1.6.2 instead of let's say 1.6.4 is essential to me.

User avatar
sooskriszta
Registered User
Posts: 85
Joined: Wed Dec 29, 2010 7:23 pm

Re: [RFC] Use Google's jQuery

Post by sooskriszta » Tue Sep 27, 2011 10:10 am

sajaki wrote:You all seem to forget that having a hosted cdn means you're forced to use the latest version of jquery
Not true at all. Google offers several versions.
OC2PS
Testfestés, Arcfestés, Csillámfestés

Alapanyagok, Képzések, Ismertetők
Hennafestés
GMAT coaching and MBA Admissions Consulting
formerly known as sooskriszta

Post Reply