[RFC|Merged] Include and use jQuery (originally for 3.2)
- DarkBeing
- Registered User
- Posts: 83
- Joined: Sun Jul 19, 2009 2:32 pm
- Location: Currently Estonia
- Contact:
Re: [RFC] Include and use jQuery
I am also in favor of a localized copy of jQuery or at least a switch where the user can decide if he wants to use the local version or the Google hosted one. To add what others already said in favor of a localized version, there is also those phpBB boards to be considered whose server stands in a country where Google tends to get in trouble with the local government (China), Goggle may be still up, but the access to Google from there might not be.
Re: [RFC] Include and use jQuery
If it hasn't been said before, I'll say it now:
PLEASE ADD JQUERY to PHPBB!!!
More and more MODs and styles are using Jquery. This can be very frustrating to board admins, as they could end up with multiple inclusions of Jquery as well as multiple/redundant Jquery files that came with their MODs or Styles, and different versions - it can get real messy.
If phpBB added Jquery to the core, not only could phpBB make use of it, but it would mean no MODs or styles would have to include it, thus eliminating redundant files and header-inclusions of the script.
I think the best solution would also be to simply include it directly from Google's API. That way, phpBB does not have to supply the Jquery library files (licensing conflicts??) and whenever Jquery updates, phpBB simply needs to update the link to Jquery in the headers. Not to mention including it through Google means you get to make use of Google's vast CDN, which in many cases is better than including it directly from your own server.
In other words, all phpBB has to add the following line to the overall_header.html:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jq ... "></script>
With such a simple change, I really don't see why it can't be added to 3.1 or even 3.0.8!
FWIW: I have run a large (Jquery intensive web2.0) website for years using the Google hosted Jquery, and have never personally seen nor been alerted to any issue that has every made me feel the need for a "fallback". Google simply does not go down on a world-wide scale.
PLEASE ADD JQUERY to PHPBB!!!
More and more MODs and styles are using Jquery. This can be very frustrating to board admins, as they could end up with multiple inclusions of Jquery as well as multiple/redundant Jquery files that came with their MODs or Styles, and different versions - it can get real messy.
If phpBB added Jquery to the core, not only could phpBB make use of it, but it would mean no MODs or styles would have to include it, thus eliminating redundant files and header-inclusions of the script.
I think the best solution would also be to simply include it directly from Google's API. That way, phpBB does not have to supply the Jquery library files (licensing conflicts??) and whenever Jquery updates, phpBB simply needs to update the link to Jquery in the headers. Not to mention including it through Google means you get to make use of Google's vast CDN, which in many cases is better than including it directly from your own server.
In other words, all phpBB has to add the following line to the overall_header.html:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jq ... "></script>
With such a simple change, I really don't see why it can't be added to 3.1 or even 3.0.8!
FWIW: I have run a large (Jquery intensive web2.0) website for years using the Google hosted Jquery, and have never personally seen nor been alerted to any issue that has every made me feel the need for a "fallback". Google simply does not go down on a world-wide scale.
Has an irascible disposition.
Re: [RFC] Include and use jQuery
jQuery is dual-licensed under under the MIT license and the GPL, which are both compatible with the GPL. http://jquery.org/licenseVSE+ wrote:licensing conflicts?
- callumacrae
- Former Team Member
- Posts: 1046
- Joined: Tue Apr 27, 2010 9:37 am
- Location: England
- Contact:
Re: [RFC] Include and use jQuery
This is a good idea, I think it should be implemented
I can see it killing a lot of MODs XD
~Callum
I can see it killing a lot of MODs XD
~Callum
- DavidIQ
- Customisations Team Leader
- Posts: 1904
- Joined: Thu Mar 02, 2006 4:29 pm
- Location: Earth
- Contact:
Re: [RFC] Include and use jQuery
I see quite the oposite. It would add more incentive to create jQuery-dependent MODscallumacrae wrote:I can see it killing a lot of MODs XD
Re: [RFC] Include and use jQuery
I would like to see it included too.
Google's hosted version is going to be more reliable than anything, plus faster (parallel download since it's a different domain to other files, and their CDN is fast and geo-aware).
Google's hosted version is going to be more reliable than anything, plus faster (parallel download since it's a different domain to other files, and their CDN is fast and geo-aware).
Re: [RFC] Include and use jQuery
I think jquery is a great library, and is considered the most popular and usable almost as an industry standard, but I think all the pro and cons of several javascript libraries should be compared for overall purpose and functionality which suits phpbb the most, and is likely to have constant features that are unlikely to suddenly pose either a security threat, or make certain parts of the website incompatible.
For example how each framework would perform ajax requests of all types the least complicated and most consistent, which has the best ui options, accessing the dom and changing it (obviously a strong point for jquery), plugin support, event handlers, speed, and in depth documentation so that the code can be treated as an open system, rather than a blackbox solution.
Although I do think either jquery, dojo, or sencha (most people will know if from extJS) really are the best solutions to consider for implementation.
For example how each framework would perform ajax requests of all types the least complicated and most consistent, which has the best ui options, accessing the dom and changing it (obviously a strong point for jquery), plugin support, event handlers, speed, and in depth documentation so that the code can be treated as an open system, rather than a blackbox solution.
Although I do think either jquery, dojo, or sencha (most people will know if from extJS) really are the best solutions to consider for implementation.
Re: [RFC] Include and use jQuery
Good point, I have added an "Alternatives" section to the first post.
If somebody has experience with many different libraries it might be interesting to get some insight. Since jQuery is such a buzzword, most people use it exclusively, I am guilty of this myself. The amount of people (developers and modders) familiar with it is a key factor. You are the first to bring up alternative libraries.
If somebody has experience with many different libraries it might be interesting to get some insight. Since jQuery is such a buzzword, most people use it exclusively, I am guilty of this myself. The amount of people (developers and modders) familiar with it is a key factor. You are the first to bring up alternative libraries.
Re: [RFC] Include and use jQuery
Yes to including jQuery
No to loading from Google (or another CDN). While google's servers may be reliable, my connection to them is not. Particularly here in China, various Google services are often arbitrarily blocked. All JS should be served from the phpBB instance itself.
The loading needs to be overridable by mods and themes.
J
No to loading from Google (or another CDN). While google's servers may be reliable, my connection to them is not. Particularly here in China, various Google services are often arbitrarily blocked. All JS should be served from the phpBB instance itself.
The loading needs to be overridable by mods and themes.
J
Re: [RFC] Include and use jQuery
You bring up an interesting point for China. Well, in that case, how about Microsoft, they offer Jquery on their CDN too:Jhong wrote:Yes to including jQuery
No to loading from Google (or another CDN). While google's servers may be reliable, my connection to them is not. Particularly here in China, various Google services are often arbitrarily blocked. All JS should be served from the phpBB instance itself.
The loading needs to be overridable by mods and themes.
J
Code: Select all
<script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js" type="text/javascript"></script>
Has an irascible disposition.