« Hmmm
jQuery 1.7

MultiformeIngegno

  • Posts: 1,337

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: jQuery 1.7
« Reply #1, on November 4th, 2011, 10:50 AM »
Yeah, we knew about this but given that there were problems integrating 1.6 (not to mention bloat), that I think there needs to be something pretty special to encourage an upgrade.
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: jQuery 1.7
« Reply #2, on November 4th, 2011, 04:09 PM »
Well, as the primary front-end guy here, I'll have to say that 1.7 is a step in the right direction, with things such as simplifying event delegation and shortening function names (on/off).
There are still a few quirks that bother me though:

- it still has the 'zoom' bug in Opera 12. I don't understand why they removed a function on the basis that it generated errors in Chrome's console log, but they're not fixing this one which does the same in Opera -- when it's a relatively easy fix. (It's even VERY easy if you use browser sniffing, meh... The only reason for that zoom test is to... test for IE.)

- it's larger than 1.5.2, obviously. Not by a wide margin... About 10%. But it's still 10%. Actually, I could have stayed with v1.4.4 which was smaller than 1.5.2 but wanted to have the 'perfect' Ajax code which they advertised. I'm not even sure this changes anything actually... I'd love for jQuery to re-release the 1.4 branch with UglifyJS compression. I'm sure it would be of benefit... (Or, yeah, I could recompress it manually, but the CDN version would stay as it is.)

- a good way to reduce size would be to release versions of jQuery where all deprecated functions are just *removed*... There is no reason not to do that. If you're the author of the JavaScript code that relies on jQuery, and you choose to use the 'light' version, you're bound to know not to use some functions like .bind() or .delegate().

- they're fixing HTML5 tag use in .html() but it still requires HTML5Shiv. I'm not exactly sure which is best here... They could go ahead and integrate HTML5Shiv, couldn't they? But then it would mean IE fixes waste bandwidth for other browsers. And then... And then you start wondering, how about they release modular jQuery versions targeted to a specific browser and version, and they let us choose the target...? So what, "it's not a good thing to sniff browser versions"? Who are we kidding here? The only browser that needs special treatment, 99% of the time, is IE... Just do a test for IE and call a custom jQuery for it!

- well, it's a first iteration. Remember how the release of 1.6 went..? It was a mess. Let's wait...

Other than that... Having jQuery 1.6 in Wedge was a no-no, but v1.7 is a bit better in that respect. If only they could take bandwidth into account...

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: jQuery 1.7
« Reply #3, on November 4th, 2011, 04:28 PM »
Quote
simplifying event delegation and shortening function names (on/off).
It looked to me as though it could actually complicate matters and make the code harder to follow later, and it seems to me that it might encourage some ambiguity over elements but as ever, we'll wait and see.
Quote
I don't understand why they removed a function on the basis that it generated errors in Chrome's console log
Being the number 2 or number 3 browser, depending on who you listen to, gives you more clout than being number 4 or number 5 depending on who you listen to.
Quote
There is no reason not to do that.
Yes there is, one very, very good reason. A number of the CDN links out there for Google refer to "the current stable version". By deprecating methods a version ahead of removing them, it gives people time to fix their code now that the replacements are available.
Quote
They could go ahead and integrate HTML5Shiv, couldn't they?
Not really. A lot of projects that use jQuery don't expressly use HTML5 elements and so don't really need the shiv, and it means it can be included or not included depending on need, rather than bloating it for everyone.
Quote
So what, "it's not a good thing to sniff browser versions"?
It's not, but IE is incredibly brain-dead at times, and as such we have to account for it, and usually the fastest way to do that is to sniff.
Quote
- well, it's a first iteration. Remember how the release of 1.6 went..? It was a mess. Let's wait...

Other than that... Having jQuery 1.6 in Wedge was a no-no, but v1.7 is a bit better in that respect. If only they could take bandwidth into account...
This is the thing. 1.7 might have some of the same issues as 1.6, bandwidth aside.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: jQuery 1.7
« Reply #4, on November 4th, 2011, 07:24 PM »
- Might be the case.
- Bit sad. Then again, even IE6 has a larger market share than Opera, 'depending on who you listen to'... ;)
- I don't see what would prevent them from offering alternative CDN links. I'm sure Google would be glad to provide them, considering they'd save them some extra bandwidth... Hell, even Google pays for bandwidth, sometimes :P
- I mean that if it's not HTML5-ready to begin with, I'm not exactly sure why they provided support for HTML5 tags in .html()... Unless it takes the same amount of code, of course.

Re: version number, we have to take one thing into account: the longer we stay 'behind', the more chances we have to see people complain about not being able to use jQuery's latest features in their plugins... OTOH, many websites still use jQ 1.4 or even lower, and coders are pretty much 'used' to its way of doing things...

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841
The way it's meant to be

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: jQuery 1.7
« Reply #7, on November 9th, 2011, 07:02 PM »
Yeah :)

MultiformeIngegno

  • Posts: 1,337
Re: jQuery 1.7
« Reply #8, on November 9th, 2011, 09:30 PM »
good! ;)

« Hmmm