phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

[RFC|Merged] Use Google's jQuery

These requests for comments 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.

[RFC|Merged] Use Google's jQuery

Postby sooskriszta » Thu Sep 22, 2011 6:34 pm

I understand that 3.1 will ship with jQuery. This is great!

Can you also add the option for admin who can decide to use Google's libraries instead (via AJAX libraries API http://code.google.com/apis/libraries/)? There are at least 2 benefits:
1) Many large sites use Google's libraries so there's a very high probability that these are already cached on the user's computer.
2) Even if the libraries aren't already cached, it could speed things up as
a) The libraries are coming from a different domain, so for browsers that limit parallel threads from 1 domain this can help,
b ) Google has a very massive CDN and serving anything through that implicitly speeds things up

If I understand corectly, Google has following libraries available:
Dojo
Ext Core
jQuery
jQuery UI
MooTools
Prototype
script.aculo.us
SWFObject
WebFont Loader

Ticket: http://tracker.phpbb.com/browse/PHPBB3-10390
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
User avatar
sooskriszta
Registered User
 
Posts: 85
Joined: Wed Dec 29, 2010 7:23 pm

Re: Use Google's jQuery

Postby callumacrae » Thu Sep 22, 2011 9:35 pm

While I kind of like the idea, I don't think it will ever be accepted. There are two reasons for this: firstly, if the google CDN goes down then tonnes of boards go down - this is not true, as it is really easy to write a fallback (see html5bp and how it does it). Secondly is security - phpBB does not allow remote scripts in case the third party server is hacked and malicious code sent. This being google CDN, I can't see that happening.
"In JavaScript, there is a beautiful, elegant, highly expressive language that is buried under a steaming pile of good intentions and blunders"
—Douglas Crockford

View my MOD, phpBB Mobile
User avatar
callumacrae
Website Team
Website Team
 
Posts: 883
Joined: Tue Apr 27, 2010 9:37 am
Location: England

Re: Use Google's jQuery

Postby bantu » Thu Sep 22, 2011 10:17 pm

There are quite a few reasons why phpBB should not use a CDN by default.
  • Private networks: phpBB has to function properly without an internet connection.
  • Privacy: A request to a phpBB board sends a request to the CDN.
Considering this, JavaScript libraries have to be shipped with phpBB and have to be delivered from the webserver where phpBB is running on by default.

However, we should make it pretty easy to use a service like a CDN.
User avatar
bantu
3.0 Release Manager
3.0 Release Manager
 
Posts: 438
Joined: Thu Sep 07, 2006 11:22 am
Location: Karlsruhe, Germany

Re: Use Google's jQuery

Postby callumacrae » Thu Sep 22, 2011 11:29 pm

bantu wrote:There are quite a few reasons why phpBB should not use a CDN by default.
  • Private networks: phpBB has to function properly without an internet connection.
  • Privacy: A request to a phpBB board sends a request to the CDN.
Considering this, JavaScript libraries have to be shipped with phpBB and have to be delivered from the webserver where phpBB is running on by default.

However, we should make it pretty easy to use a service like a CDN.

I hadn't considered the privacy argument, but the connection argument is invalid - a one line fallback is all that is required.
"In JavaScript, there is a beautiful, elegant, highly expressive language that is buried under a steaming pile of good intentions and blunders"
—Douglas Crockford

View my MOD, phpBB Mobile
User avatar
callumacrae
Website Team
Website Team
 
Posts: 883
Joined: Tue Apr 27, 2010 9:37 am
Location: England

Re: Use Google's jQuery

Postby sooskriszta » Sat Sep 24, 2011 1:22 am

bantu wrote:phpBB should not use a CDN by default.

I agree - by default phpbb should use the libraries it ships with. However, I would submit that it is very beneficial to many boards to have an option to check a box in ACP that makes phpbb use Google libraries instead.
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
User avatar
sooskriszta
Registered User
 
Posts: 85
Joined: Wed Dec 29, 2010 7:23 pm

Re: Use Google's jQuery

Postby callumacrae » Sat Sep 24, 2011 11:08 am

sooskriszta wrote:I agree - by default phpbb should use the libraries it ships with. However, I would submit that it is very beneficial to many boards to have an option to check a box in ACP that makes phpbb use Google libraries instead.

+1 (and a text input to allow the user to specify a remote library, although it should default to google)
"In JavaScript, there is a beautiful, elegant, highly expressive language that is buried under a steaming pile of good intentions and blunders"
—Douglas Crockford

View my MOD, phpBB Mobile
User avatar
callumacrae
Website Team
Website Team
 
Posts: 883
Joined: Tue Apr 27, 2010 9:37 am
Location: England

Re: Use Google's jQuery

Postby nickvergessen » Sat Sep 24, 2011 12:08 pm

This could be an easy MOD
cheers nickvergessen :geek:
Member of phpBB Development-Team
No Support via PM — My MODs for phpBB 3.0.x
User avatar
nickvergessen
Development Team
Development Team
 
Posts: 350
Joined: Sun Oct 07, 2007 11:54 am
Location: Esslingen, Germany

Re: Use Google's jQuery

Postby naderman » Sat Sep 24, 2011 12:40 pm

I agree that we should provide this option by default.
www.naderman.de
Move your forum to Forumatic - we'll take care of maintenance & spam
User avatar
naderman
Development Team Leader
Development Team Leader
 
Posts: 1650
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany

Re: Use Google's jQuery

Postby VSE+ » Sun Sep 25, 2011 7:59 am

nickvergessen wrote:This could be an easy MOD


naderman wrote:I agree that we should provide this option by default.


Didn't I already present this many months ago? ;)

viewtopic.php?f=108&t=33747&start=50#p224199
User avatar
VSE+
Registered User
 
Posts: 209
Joined: Mon Mar 08, 2010 9:18 am

Re: Use Google's jQuery

Postby naderman » Sun Sep 25, 2011 8:18 am

VSE+ wrote:
nickvergessen wrote:This could be an easy MOD


naderman wrote:I agree that we should provide this option by default.


Didn't I already present this many months ago? ;)

viewtopic.php?f=108&t=33747&start=50#p224199

Yup and I still agree with you. Maybe you want to write a patch for this? :)
www.naderman.de
Move your forum to Forumatic - we'll take care of maintenance & spam
User avatar
naderman
Development Team Leader
Development Team Leader
 
Posts: 1650
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany

Next

Return to [3.1/Ascraeus] Merged RFCs

Who is online

Users browsing this forum: No registered users and 8 guests