News for hackers. Stuff that matters.
Re:JQuery 2.0 Drops Support for IE6/7/8; API-Compatible with... by wycats on Thursday June 28, 2012 @08:41PM (#4174674)
The premise is that jQuery 1.9 and 2.0 are API-compatible, so you can do something like:

    <!--[if lt IE 9]>
        <script src="jquery-1.9.0.js"></script>
    <![endif]-->
    <!--[if gte IE 9]><!-->
        <script src="jquery-2.0.0.js"><</script>
    <!--<![endif]-->
New browsers will get a lighter download and a faster runtime. oldIE will still work with all the hacks required to make it work.
Re:JQuery 2.0 Drops Support for IE6/7/8; API-Compatible with... by tambourine_man on Thursday June 28, 2012 @08:58PM (#4174727)
We deal with enough conditionals already. Besides, sharing the same API won't stop you from bumping into some bug that's present in one version and not the other.

We'll have to deal with two codebases.

Download and runtime speed are not a problem on the Desktop.

They should have had the guts to admit that this is all about mobile. Their denial at the end of the post is symptomatic.

Re:JQuery 2.0 Drops Support for IE6/7/8; API-Compatible with... by dspillett on Friday June 29, 2012 @06:55AM (#4176052)
> Download and runtime speed are not a problem on the Desktop.

When I'm stuck in the wilderness with nothing but an atom based netbook tethered to a patchy and expensive GPRS connection, I beg to differ.

Anyway, it isn't just about your bandwidth to your desktop - if each user is transferring less it can be significant for the server-side.

If they make proper efforts to maintain 1.9.x for a goodly amount of time the "hitting a bug in one version but not the other" issue shouldn't be more significant than the current "hitting a bug in a third party library (jQuery) which I don't have the expertise to locate+fix" issue that we already have to consider. Of course the "if" at the start of that sentence could be cause for concern but I think the jQuery project has done well enough at QA in the past for me to give them the benefit of the doubt (or at least to reserve judgment) at this point.

Re:JQuery 2.0 Drops Support for IE6/7/8; API-Compatible with... by betterth on Friday June 29, 2012 @08:36AM (#4176290)
>When I'm stuck in the wilderness with nothing but an atom based netbook tethered to a patchy and expensive GPRS connection, I beg to differ.

Who cares about outliers like that? How many people using your webpage are connecting like that? 1%? 0.1%? Less? Are you really going to make major decisions based on 0.1% of your users?

And what's more, if you're building a website for that kind of usage, you probably shouldn't be using a big javascript library in the first place. And the people on those connections should experiment with scriptblocking and selective script whitelisting so they're in control of their poor connection.

Know your audience, I think, is the most important factor when deciding how to go forward.

Re:JQuery 2.0 Drops Support for IE6/7/8; API-Compatible with... by tambourine_man on Friday June 29, 2012 @09:05AM (#4176382)
>When I'm stuck in the wilderness with nothing but an atom based netbook tethered to a patchy and expensive GPRS connection, I beg to differ.

That's not a Desktop. That's a cellphone conection and processing power that, by todays standards, reassembles a phone more than a laptop.

But even on mobible, latency is a much bigger problem than file size.

>"hitting a bug in one version but not the other" issue shouldn't be more significant than the current "hitting a bug in a third party library (jQuery) which I don't have the expertise to locate+fix" issue that we already have to consider.

All things being equal, you have twice as many chances of hitting a bug with two code bases than with one.

Re:JQuery 2.0 Drops Support for IE6/7/8; API-Compatible with... by CrazedGeek on Thursday June 28, 2012 @11:51PM (#4175145)
Download and runtime speed are definitely a problem on desktop OSes -- mobile broadband, slow DSL, netbooks, that sort of thing.
Re:JQuery 2.0 Drops Support for IE6/7/8; API-Compatible with... by alecr on Friday June 29, 2012 @02:57AM (#4175561)
If you don't like conditionals, then don't use them. Stick with 1.9 or 1.8

Download and runtime are absolutely a problem on the desktop. There will always be a decent amount of people on unreliable connections and mobile devices with slow processors

Re:JQuery 2.0 Drops Support for IE6/7/8; API-Compatible with... by tambourine_man on Friday June 29, 2012 @09:14AM (#4176418)
>Stick with 1.9 or 1.8

That's a terrible solution.

>unreliable connections and mobile devices with slow processors

Which are not Desktops, so I don't see your point.

Re:JQuery 2.0 Drops Support for IE6/7/8; API-Compatible with... by alecr on Friday June 29, 2012 @09:31AM (#4176497)
Why is it a terrible solution? What jQuery API features (that might be developed in 2.x) are missing that you need? The current API fulfils the purpose of the jQuery Project; many of the recent API changes have been syntactic sugar changes and I imagine most future ones will be as well.

>Which are not Desktops, so I don't see your point Oops... Well anyway, I know plenty of people who cannot get DSL or cable in their area and rely on spotty wireless connections

Re:JQuery 2.0 Drops Support for IE6/7/8; API-Compatible with... by rohansingh on Saturday June 30, 2012 @08:47AM (#4181478)
> We'll have to deal with two codebases.

You already have to deal with two codebases, IE8 and IE9. One can have bugs that the other doesn't.

Right now, you deal with:

* IE8 + jQuery 1.9 * IE9 + jQuery 1.9

I assume you are testing both? If so, then all you will have to do is instead test:

* IE8 + jQuery 2.0 * IE9 + jQuery 2.0

Re:JQuery 2.0 Drops Support for IE6/7/8; API-Compatible with... by solox3 on Thursday June 28, 2012 @09:13PM (#4174761)
Will running functional tests help?
Re:JQuery 2.0 Drops Support for IE6/7/8; API-Compatible with... by calvin on Friday June 29, 2012 @02:26PM (#4178209)
I can think of a lot of reasons this approach won't work well for most of the sites I work on (other than a few blogs).

1) Combining jQuery with other JavaScript at build time (to reduce HTTP requests). At built-time, we don't know which browser they're using. We'll end up with two assets (the combined version w/ jQuery 1.9 and the combined version w/ jQuery 2.0).

2) Testing costs. For larger sites it's not a trivial thing to test and support two different versions of jQuery. For any site that still needs to support IE8 (and 7 and 6), it will not be feasible to test and support two different versions of jQuery. As such, we'll never get the benefits of using jQuery 2.0 and would not be able to do so for many years.

3) Plugins will be written that only work for one of the two versions (1.9 or 2.0). This will divide the plugin ecosystem. Ideally, plugins should work for both, but many people will only test and support their plugins on one of the versions.

Re:JQuery 2.0 Drops Support for IE6/7/8; API-Compatible with... by gnarf on Sunday July 01, 2012 @02:18PM (#4185616)
It will be very difficult to develop a plugin for 2.0 that won't work on 1.9 - they will be 100% API compatible, and pass the same set of unit tests.
Re:JQuery 2.0 Drops Support for IE6/7/8; API-Compatible with... by mkmcdonald on Thursday June 28, 2012 @08:45PM (#4174693)
You do realize that IE 10 dropped conditional comments, right?
Re:JQuery 2.0 Drops Support for IE6/7/8; API-Compatible with... by wycats on Thursday June 28, 2012 @08:48PM (#4174698)
If you look at the second conditional comment, it will not be parsed as a comment in browsers without conditional comment support.

In other words, it will correctly use jQuery 2.0, like any other browser without conditional comment support.

Re:JQuery 2.0 Drops Support for IE6/7/8; API-Compatible with... by seldo on Thursday June 28, 2012 @08:55PM (#4174722)
It's a conditional conditional comment. I feel ill.
Re:JQuery 2.0 Drops Support for IE6/7/8; API-Compatible with... by WickyNilliams on Friday June 29, 2012 @10:01AM (#4176617)
It's known as a downlevel revealed conditional comment. You will see it in use in the HTML5 boilerplate. That said, I echo your sentiment, it is an immensely horrid syntax. For more info: http://css-tricks.com/downlevel-hidden-downlevel-revealed/
Re:JQuery 2.0 Drops Support for IE6/7/8; API-Compatible with... by Zarel on Thursday June 28, 2012 @11:17PM (#4175065)
You do realize that IE 10 will be supported by jQuery 2.0, right?
Re:JQuery 2.0 Drops Support for IE6/7/8; API-Compatible with... by jcromartie on Friday June 29, 2012 @07:49AM (#4176171)
You do realize that saying "you do realize, right" is about the rudest and most condescending way to pass on information, right?
Re:JQuery 2.0 Drops Support for IE6/7/8; API-Compatible with... by acavailhez on Thursday June 28, 2012 @09:08PM (#4174752)
Elegant solution, but it's not possible if you bundle/minify all your scripts in one giant file, as more and more do.
Re:JQuery 2.0 Drops Support for IE6/7/8; API-Compatible with... by secoif on Thursday June 28, 2012 @09:14PM (#4174767)
It is only not possible if you are incapable of changing your build script.