[RFC] AJAX via jQuery / jQuery UI

Note: We are moving the topics of this forum and it will be deleted at some point

Publish your own request for comments/change or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.2/Rhea and 3.3.
GameCharmer
Registered User
Posts: 11
Joined: Tue Feb 16, 2010 7:03 pm

Re: [RFC] AJAX via jQuery / jQuery UI

Post by GameCharmer »

Hav U dun any resurch on hte matter? I hav tstd thm bof an jQuery sems fasr thn MooTools.

I don't see any options when downloading MooTools.


jQuery -> http://docs.jquery.com/Downloading_jQuery
Minified - 26,776 bytes (~26.15 KB)

MooTools -> http://mootools.net/download
MooTools Core 1.3 with compatibility YUI Compressor - 84 kb

Well, it would seem that the jQuery download is significantly smaller than the MooTools standard download.

MooTools Components (No Compatability & Compressed)
Core -> 5.71 KB (5,848 bytes)
Core W/ Element Option -> 43.2 KB (44,256 bytes)
Core W/ Element & JSON -> 44.1 KB (45,198 bytes)

Well, so much for that I suppose...

You can also try out the jQuery Lazy Loader (http://www.unwrongest.com/projects/lazy/). This plugin loads components as they are needed rather than all at once. Despite all of this, when you load a single page site, you don't have to reload the JS libraries.

User avatar
Kudlaty
Registered User
Posts: 4
Joined: Fri Oct 22, 2010 7:31 am

Re: [RFC] AJAX via jQuery / jQuery UI

Post by Kudlaty »

by self, im not test it, but i search for it on google...
there are few ppl that says that jQuery have complicated mechanism for selectors, and sometimes jQuery just hangup,
and with MooTools they don't have any problem...

And thats why i was thinking that MooTools will be better :)

dwieeb
Registered User
Posts: 6
Joined: Mon Mar 09, 2009 3:11 pm

Re: [RFC] AJAX via jQuery / jQuery UI

Post by dwieeb »

GameCharmer wrote: jQuery -> http://docs.jquery.com/Downloading_jQuery
Minified - 26,776 bytes (~26.15 KB)
Actually jQuery runs about 80kb minified. But the actual filesize of the application doesn't always correlate to the speed of the application and the filesize of a javascript library is something we need not be concerned with since, like you said:
GameCharmer wrote:when you load a single page site, you don't have to reload the JS libraries.
As far as the should we host locally or on Google. Let me offer my 2 cents.

Security: Not really an issue in my opinion. It's jQuery...a javascript library used by everyone from huge corporations around the world to individual developers like you and me. Every release is beat to death with testing by many people. Even if something is wrong with a certain release, it's not like it wouldn't be tough to require an update to phpBB just to update jQuery. I'm sure by 4.0 you'll have an automatic updater like WordPress, right? ;)

Parallel downloads: jQuery will load in parallel with other files regardless of whether or not it's on a different server. Try loading jQuery along with some other random JS files using <script src=""></script> while looking at the Net tab of FireBug. Servers can throw out more than one file at a time ;)

Dependence: If you host something on Google, you are depending on another server for your content. The more you offload your files, the more at risk you are of having something broken - whereas if you host it locally with your installation of phpBB, the only time something would break is if your entire server went down.

Note: WordPress has jQuery hosted in wp-includes/js, not loading it off of some random Google server.

Speaking for AJAX:

AJAX is gonna be key for the survival of forums on the internet. I'm gonna be a bit harsh, but too many forum projects are kind of in the stone ages. Having an AJAX interface in 4.0 might spark a fresh interest in forums and keep the forum community alive. AJAX is extremely easy with jQuery, I hope to see some work done with it :D

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

Re: [RFC] AJAX via jQuery / jQuery UI

Post by Oleg »

An issue with linking to google javascript libraries is privacy. Due to referer header google knows which sites you visit. Especially forums, being a social thing may be powerful information to have. They may then tie this into your other activity they keep track of (search, gmail).

GameCharmer
Registered User
Posts: 11
Joined: Tue Feb 16, 2010 7:03 pm

Re: [RFC] AJAX via jQuery / jQuery UI

Post by GameCharmer »

I'm not saying to make everything depend on google. I'm just saying that the users should be given an option. Granted, it's not a lot of space, but if you could save a few KB on bandwidth over X number of users over a given time, it could be worth it. I'm currently mid-process of hosting my images on a generic shared hosting package with unlimited storage / bandwidth to cut costs on bandwidth for my VPS service.

dwieeb
Registered User
Posts: 6
Joined: Mon Mar 09, 2009 3:11 pm

Re: [RFC] AJAX via jQuery / jQuery UI

Post by dwieeb »

nn- wrote:An issue with linking to google javascript libraries is privacy. Due to referer header google knows which sites you visit. Especially forums, being a social thing may be powerful information to have. They may then tie this into your other activity they keep track of (search, gmail).
Very true.
GameCharmer wrote:I'm not saying to make everything depend on google. I'm just saying that the users should be given an option. Granted, it's not a lot of space, but if you could save a few KB on bandwidth over X number of users over a given time, it could be worth it. I'm currently mid-process of hosting my images on a generic shared hosting package with unlimited storage / bandwidth to cut costs on bandwidth for my VPS service.
Personally, I don't think they should be given an option. That opens the door for version mismatches which may break certain plugins for 4.0. Plus, the average phpBB user doesn't even need to know about jQuery, or which repository to grab it from. It would only confuse them with more bloated options.

igorw
Registered User
Posts: 500
Joined: Thu Jan 04, 2007 11:47 pm

Re: [RFC] AJAX via jQuery / jQuery UI

Post by igorw »

dwieeb wrote:That opens the door for version mismatches which may break certain plugins for 4.0.
No, it is possible to specify the exact version google should serve. The privacy and and the bloated options arguments I agree with.

dwieeb
Registered User
Posts: 6
Joined: Mon Mar 09, 2009 3:11 pm

Re: [RFC] AJAX via jQuery / jQuery UI

Post by dwieeb »

I know that, I'm just saying it opens the door for the possibility of requesting one version from Google and having a different version in the phpBB install. I doubt anyone would make that mistake, I'm just saying ;)

GameCharmer
Registered User
Posts: 11
Joined: Tue Feb 16, 2010 7:03 pm

Re: [RFC] AJAX via jQuery / jQuery UI

Post by GameCharmer »

It could be something as simple as a text box an "Advanced Options" panel with some various system configuration settings. For instance, I have never had to mess with the authentication system at all, along with a couple of other admin panel options.

Anyway, it really doesn't matter. Anyone running their site with enough knowledge to know what jQuery is will more than likely just edit the phpBB files anyway to include whatever version they want. Case closed I suppose...

uk_martin
Registered User
Posts: 8
Joined: Thu Jun 30, 2011 12:26 pm

Re: [RFC] AJAX via jQuery / jQuery UI

Post by uk_martin »

AJAX or HTML5?

Or both???

Post Reply