jQuery 1.4 upgrade?

Discussions pertaining to programming of backend systems and released UNL template code.

jQuery 1.4 upgrade?

Postby cbourke3 » Sat Jan 16, 2010 7:39 pm

jQuery 1.4 has just been released (see http://jquery14.com) and touts major performance improvements. Is anyone planning on upgrading the templates with this new version? Looking at the backwards-incompatibility issues it doesn't look like there is anything that would break. I would have submitted a tracker item, but it would have assigned it to me and I'd rather someone closer to the project do the upgrade (I'm unsure how and what has been hacked for WDN purposes).

In addition, I notice that several plugins are loaded by default but in some cases its loading the full plugin when a minified version is available (the qtip plugin for example). Was this done for any particular reason, or can the minified versions be loaded without problem instead? Finally, I notice in the code that the php JavaScript compressor script is not recommended by the jQuery dev team (see http://docs.jquery.com/Frequently_Asked_Questions, How do I compress my code?) which recommends using the YUI compressor from Yahoo: http://developer.yahoo.com/yui/compressor/. Again, I'm not comfortable with contributing these changes as I'm not part of the core development team, but it is something to think about.
cbourke3
 
Posts: 13
Joined: Sun Aug 16, 2009 9:54 am

Postby bbieber2 » Fri Jan 22, 2010 11:25 pm

I've tried 1.4 and everything seems to work ok, but there are many more js warnings which cause a significant slowdown when trying to debug js errors during development. In particular the internal object caching has a few minor bugs in it.

The minified versions of the plugins should be loaded by default, and actually, anything used by default in the templates should be compressed if it isn't already, and added to all_compressed.js.

When we tried the yui compressor it caused quite a few issues... so I'm sure it won't be just a drop-in replacement, but I'm fine with switching compressors if someone is willing to do the work.
bbieber2
 
Posts: 58
Joined: Mon Nov 05, 2007 1:28 pm

Postby bbieber2 » Mon Jan 25, 2010 11:20 pm

jQuery 1.4.1 was released today which fixed almost all the problems I encountered, so I have no objections to including it in the templates now.

I've committed the developer version of jquery 1.4.1 to the repository, and modified the build scripts to use the YUI compressor. Unfortunately all these changes have increased the compressed js from 125K to 175K, which I'm not too excited about. I'm going to try the closure compiler from google to see if we can trim it down more, and I'll be working out ways to minimize the default set of js over the next few days... any suggestions or assistance for improvements would be appreciated.
bbieber2
 
Posts: 58
Joined: Mon Nov 05, 2007 1:28 pm

Postby cbourke3 » Tue Jan 26, 2010 2:58 pm

From the SVN I see that you went with the Google compressor. I don't have any first hand experience with it, but if its Google, its gold.

The main concern I have is with international students and applicants. In the US, high speed internet and decent hardware running the latest browsers can be expected. This is not the case with international students where internet may still be slow and hardware is not up to smoothly running intense javascript like jquery. Thus even small improvements in speed (like those touted by jQuery 1.4.x) and size (better compressors, though the hit you take on uncompressing them client side may not be worth it) are welcome.

When will you update these on the WDN download page?
cbourke3
 
Posts: 13
Joined: Sun Aug 16, 2009 9:54 am


Return to Coding

Who is online

Users browsing this forum: No registered users and 1 guest

cron