The point still stands. They block things arbitrarily, there is no chance of predicting.VSE+ wrote: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.
JCode: Select all
<script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js" type="text/javascript"></script>
[RFC|Merged] Include and use jQuery (originally for 3.2)
Re: [RFC] Include and use jQuery
-
- Registered User
- Posts: 523
- Joined: Sat Apr 22, 2006 10:29 pm
- Contact:
Re: [RFC] Include and use jQuery
I'm all for JQuery.
As previously stated, many mods use it and adding it to the default will help prevent conflicts.
However, I'm against relying on Google or any other 3rd party. Security and trust are the main issues. Let it reside on the individual server.
As previously stated, many mods use it and adding it to the default will help prevent conflicts.
However, I'm against relying on Google or any other 3rd party. Security and trust are the main issues. Let it reside on the individual server.
Re: [RFC] Include and use jQuery
More details and actual links for verification would be nice.keith10456 wrote:As previously stated, many mods use it and adding it to the default will help prevent conflicts.
Re: [RFC] Include and use jQuery
Hmm, I just tested out Invision IP.Board.
They provide an option in the Admin section that lets you choose to have javascript files (they use scriptaculous and prototype) load from Google's servers or from your own server.
Kind of a nice option. Maybe phpBB could implement it that way. In terms of html output, bandwidth, and speed, loading from Google would be best. Of course, if China is an issue for your particular situation, you could choose to have them loaded from your own servers instead.
They also have an option to use regular or Minified javascript and CSS. That would also be a good feature to see in phpBB.
They provide an option in the Admin section that lets you choose to have javascript files (they use scriptaculous and prototype) load from Google's servers or from your own server.
Kind of a nice option. Maybe phpBB could implement it that way. In terms of html output, bandwidth, and speed, loading from Google would be best. Of course, if China is an issue for your particular situation, you could choose to have them loaded from your own servers instead.
They also have an option to use regular or Minified javascript and CSS. That would also be a good feature to see in phpBB.
Has an irascible disposition.
Re: [RFC] Include and use jQuery
I'm currently working on this MOD:eviL3 wrote:More details and actual links for verification would be nice.keith10456 wrote:As previously stated, many mods use it and adding it to the default will help prevent conflicts.
http://www.phpbb.com/community/viewtopi ... &t=2101869
Problems occur if you already have jQuery included and include it again, i.e. if your style already uses jQuery and you include it for example by using my MOD.
That will result in a Stack overflow error in Internet Explorer. Currently the only way to prevent this is by checking if the jQuery functions already exits. If jQuery would be included by default, you wouldn't have to spend time checking if jQuery is loaded.
Also, jQuery would help prevent issues with browsers. For example if your javascript works for Firefox, it might not work in IE or Opera.
Re: [RFC] Include and use jQuery
I first thought Dojo would be better for phpBB because it has more resources and tools for styling themes and UI, aswell as DOM and AJAX stuff that would not doubt be used by developers, and it is very nicely documented.
Although the fact that jQuery is a lot more familliar to most people may be another reason to avoid it.
Although I would encourage designers and developers to look at the features )http://www.dojotoolkit.org/) dojo offers. It seems more suitable in terms of features that phpbb would actually use, and plugins would be simpler. A big problem that could arise if phpbb used jquery in future would be jquery plugins. They would have to be optimized for phpBB hooks, layout, and fitting in code.
Looking at a lot of current jquery plugins they could seriously mess up your layout, cause javascript errors for other plugins, and possabily open vunerabilities. Not that code using dojo couldn't do this but Jquery is much more prone to it. Just something to seriously consider.
Although the fact that jQuery is a lot more familliar to most people may be another reason to avoid it.
Although I would encourage designers and developers to look at the features )http://www.dojotoolkit.org/) dojo offers. It seems more suitable in terms of features that phpbb would actually use, and plugins would be simpler. A big problem that could arise if phpbb used jquery in future would be jquery plugins. They would have to be optimized for phpBB hooks, layout, and fitting in code.
Looking at a lot of current jquery plugins they could seriously mess up your layout, cause javascript errors for other plugins, and possabily open vunerabilities. Not that code using dojo couldn't do this but Jquery is much more prone to it. Just something to seriously consider.
Re: [RFC] Include and use jQuery
IMO popularity is important, getting developers to learn Dojo to use some javascript isnt the best way forward - jQuery is very popular and this should be a reason to use it. I understand you may be thinking about the Apple AppStore effect thing where making an app for the iphone is so easy alot of the apps are useless, to be honest because there is more to a plugin than javascript this shouldnt be the case.
What would hooks have to do with this? jQuery would let everyone do hat they do know with so mch less lines of javascript, and more effectively.
Its easier to code efficiently with a framework as opposed to pure javascript, so inclusion of some framework would be good. jQuery would be the best imo for functionality, popularity and ease of use.
What would hooks have to do with this? jQuery would let everyone do hat they do know with so mch less lines of javascript, and more effectively.
Its easier to code efficiently with a framework as opposed to pure javascript, so inclusion of some framework would be good. jQuery would be the best imo for functionality, popularity and ease of use.
-
- Registered User
- Posts: 523
- Joined: Sat Apr 22, 2006 10:29 pm
- Contact:
Re: [RFC] Include and use jQuery
Off the top of my head a couple of my mods by Ian use Jquery. So does the Instant Messenger mod.igorw wrote:More details and actual links for verification would be nice.keith10456 wrote:As previously stated, many mods use it and adding it to the default will help prevent conflicts.
- DavidIQ
- Customisations Team Leader
- Posts: 1904
- Joined: Thu Mar 02, 2006 4:29 pm
- Location: Earth
- Contact:
Re: [RFC] Include and use jQuery
It won't matter for 3.1 or 3.2 anyways since none of those MODs are going to work without significant changes.
Re: [RFC] Include and use jQuery
I'm against yet more options, we could make it a hidden setting however.VSE+ wrote:Hmm, I just tested out Invision IP.Board.
They provide an option in the Admin section that lets you choose to have javascript files (they use scriptaculous and prototype) load from Google's servers or from your own server.
Kind of a nice option. Maybe phpBB could implement it that way. In terms of html output, bandwidth, and speed, loading from Google would be best. Of course, if China is an issue for your particular situation, you could choose to have them loaded from your own servers instead.
They also have an option to use regular or Minified javascript and CSS. That would also be a good feature to see in phpBB.