r/programming • u/Tafkas • Apr 18 '13
jQuery 2.0 Released
http://blog.jquery.com/2013/04/18/jquery-2-0-released/94
u/giscope Apr 19 '13
Features: -No more support for IE 6/7/8.
105
u/Kalium Apr 19 '13
Sounds like a feature to me.
28
6
u/Poltras Apr 19 '13
Except when you have a significant percentage of users on windows XP.
33
u/kosmotron Apr 19 '13
Sounds like a bug.
2
u/Poltras Apr 19 '13
I know, losing customers and not making money is definitely a bug, not a feature like Kalium is saying.
7
u/TheNosferatu Apr 19 '13
Doubt it. When I started working as web-dev I asked my would-be-employer what his stand on IE (and old versions of IE in particular) were.
His responds? We make sure it works on IE9+ and if it can be done without too much effort we do lower versions aswell. (NOTE: it has to work on IE, rounded corners, fancy effects and space between stuff are not functionality) If, however, it would require more then a little effort. We fix it only if the client is willing to pay for that fix (which is less and less, people want it to be IE6+ compatible, untill they have to pay for that, then suddenly IE9 or even IE10 becomes accaptable).
I had another interview with a potential employer that just said they would double the prize if it had to be IE-compatible.
Back in the day, it would be a bad idea to use Firefox because every website was designed for IE and would look like crap on Firefox. Nowadays, it's the opposite. Websites are designed for Firefox and Chrome. If it also works on IE thats a bonus.
12
u/Poltras Apr 19 '13
Until you work for BigCorp Inc. which are still using IE8 or forcing IE9 to run in compatible mode because, historically, their intranet services were developed by a company that were experts in IE6 because it sold well at the time.
Or just MediumCorp Inc. which cares about the 5% of the users it receives and you're stuck with building a website with IE8 compatibility. You can't charge more because, surprise, you're not just a freelancer you're a dev.
That debate was done for IE6, IE7 and now IE8. And way before that, music players and VCRs and whatnot. Technology evolves faster than its user, and if you never had to support deprecated systems then more power to you. But don't ignore the large majority of developers who do. Just don't insult them by saying either "it's your fault for accepting the job" or "your users are dumb".
1
u/TheNosferatu Apr 19 '13
I'm not the one making the deals with the clients, I'm just the one building the stuff :) We got a couple BigCorps as companies, and we do pay more attention to IE for them, but still not as much to say we're fully supporting it. Issues will get fixed faster but the client still pays for IE-only stuff unless it's actualy preventing something to work.
2
u/Poltras Apr 19 '13
You're still working as a consultant. That's not the case of everyone; some people can't say no to their boss or ask for a raise simply because they have to support IE8.
1
u/Kalium Apr 20 '13
If their users are, in fact, morons then they should be aware and treating them accordingly. And not expecting to use the latest and greatest in awesome stuff.
If you choose to play in the sandbox full of antiques, you don't get to play with the shiny new stuff.
2
u/ggggbabybabybaby Apr 19 '13
I guess this is going to split the jQuery userbase then.
1
u/c00ki3z Apr 19 '13
It's been split for a while now... Drupal doesn't like versions > 1.8
Not a big deal IMO- I can live without binding events with the 'on' method, and appreciate the support on a wider array of browsers.
1
u/flying-sheep Apr 19 '13
so chinese and/or business?
1
u/Poltras Apr 19 '13
Which is a surprisingly big market. 5% of the requests on average is not insignificant.
1
u/Kalium Apr 20 '13
It's fairly significant when it adds a lot more than 5% to development time and cot.
1
u/Poltras Apr 20 '13
It doesn't if you plan accordingly.
1
u/Kalium Apr 21 '13
If by "plan accordingly" you mean "sacrifice everything you can gain from cool new technologies", then sure.
Otherwise, it's not a small addition.
1
u/ryankearney Apr 20 '13
Microsoft has ended mainstream support for Windows XP over 4 years ago. Extended support is ending in less than 1 year. It's no jQuery's job to make sure their code is supported on the default web browser on an unsupported OS.
6
Apr 19 '13
[removed] — view removed comment
4
u/ryankearney Apr 20 '13
Yep, so does Opera and Safari and Firefox. People don't seem to understand this. Not to mention Windows XP has ended mainstream support over 4 years ago, and extended support is ending in less than 1 year.
1
1
u/ErstwhileRockstar Apr 21 '13
Except when you have a significant percentage of corporate users on Windows XP.
1
Apr 20 '13
Ahhh... I remember doing Javascript before jQuery with Netscape Communicator.
I still feel dirty.
92
Apr 19 '13
I'm not sure what I was expecting, but I think I was expecting something more.
99
Apr 19 '13
It seems like they intend to use this release as a stable base to build new features on top of going forward; it's not meant to be a big deal in and of itself as far as new stuff.
19
2
u/StrmSrfr Apr 19 '13
Like Linux 3.0?
9
u/flying-sheep Apr 19 '13
no, afaik linux 3.0 was an arbitrary version scheme change.
from what /u/goldfire said, i gather that JQuery 2.0 has internal architecture changes that allow better/different extension
2
u/JW_00000 Apr 19 '13
No, like Python 3.0.
0
u/StrmSrfr Apr 19 '13
I heard Python 3.0 made a bunch of terrible incompatible changes.
4
u/AgentME Apr 20 '13
Python 3's changes were good: the biggest of which was separating the concepts of strings and bytearrays in order to make text encoding sane.
2
u/r3m0t Apr 20 '13
Good but they made too many changes and made it impossible to migrate from 2 to 3 less than an entire application at a time, which is why almost everybody is still using Python 2. Version 3.3 improves this a bit but I still can't use any of the new Python 3 features, so to me they are useless.
87
u/rallison Apr 19 '13
The point of 2.0 was not to add new features, but to be the breaking off point of no longer supporting IE < 9. Consider it to basically be exactly what 1.9 is feature-wise, just without oldIE support.
Given their previous blog posts discussing their rationale, I think this was a great way to start the 2.0 line. Basically, since 2.0 and 1.9 are API-compatible, I can include the 2.0 build on a site for modern browsers, and the 1.9 build on oldIE. Modern browsers get the benefit of a smaller (and hopefully faster) code base, while oldIE still works.
Had the team introduced new features in 2.0 (thus making it no longer API-compatible), I could no longer do so, and would be stuck with the choice of: do I upgrade to 2.0 and break oldIE support, or do I stick with 1.9 and accept the larger download size and slower code base?
6
2
u/thatblondebird Apr 19 '13
This is good to know, if there wasn't a graceful fallback to 1.9 (i.e. you had to write lots of additional code) -- I wouldn't be able to justify using it to clients ("just use 1.9, don't waste time writing the code twice" etc etc)
33
u/Bognar Apr 19 '13
It follows the Semantic Versioning rule to increment the major version number since they're making backwards incompatible changes. Though, I agree, usually you expect a host of new features with a new major version.
2
Apr 19 '13
Yeah, I think it was the "2.0" that got me excited. Ah well, jQuery is still a pretty awesome lib.
33
Apr 19 '13
I'm glad they're dropping IE6/7/8 support, personally. Sometimes you have to react to the market, and other times you have to drag people along kicking and screaming to keep the technology moving forward. Microsoft is dropping XP support next year, which hopefully means more IT departments will be migrating people to Windows 7 and we'll see IE9+ grow in market share.
But maybe I'm just glad because it's a pain in the ass to have something work perfectly fine in every other browser but break in IE8 or below.
4
1
u/achuy Apr 19 '13
I do not think this is a reaction to the market, but instead a perfect library to use for dedicated mobile websites. We are still YEARS away from being able to drop support for IE8.
2
Apr 19 '13
I think "years" is a bit extreme. Maybe a year or two. After that, I think its up to developers to start including notices to urge users to upgrade.
52
Apr 19 '13
I would like to see some proper speed benchmarks between 1.9.1 and 2.0. I think they're just making more work for themselves managing two branches. But at the same time I support the decision because I run an HTML5 only site and literally block IE8 and lower users from using it with a message to upgrade.
32
u/mahacctissoawsum Apr 19 '13
high five The one nice thing about not getting paid to develop sites is that we don't have to give a shit about who we aren't supporting. Well...not "one". Clients and they're ridiculous requests suck too......
0
Apr 19 '13
[deleted]
3
u/ChipmunkDJE Apr 19 '13
But what about HTML 5 stuff? Most of HTML 5 is not supported in IE 8, so if you are using any new stuff like the canvas tag, you wouldn't want an IE 8> user to access your site, because it won't really work for them anyways...
2
Apr 19 '13
Exactly, that was my reasoning too. And the hundreds of hours I would save from trying to implement fallback solutions.
3
u/TurboGranny Apr 19 '13
But who has time for that on personal projects? I think it is for the greater good to actively shit on people for not upgrading aware from non-compliant browsers. Exclusion and humiliation are the strongest motivators of change.
5
u/pirhie Apr 19 '13
I think it is for the greater good to actively shit on people
You sound like a nice person.
6
1
Apr 19 '13
Exclusion is the ONLY motivator for change when it comes to software. People adopt upgrades and new software only because it allows them to do something they can't currently do. If they could have stayed on Windows 3.1 and still do all the things they can do with modern operating systems, they most certainly would have. Most people hate change and will resist it as long as humanly possible.
8
u/Klathmon Apr 19 '13
give them the option of google chrome frame, after providing that i saw some of the lower IE's come back.
It can also be installed without administrative rights, so corporate users can use it as well.
also, its like 4 lines of html to include it.
1
u/kenman Apr 19 '13
It can also be installed without administrative rights, so corporate users can use it as well.
There's 2 sides to that coin:
Google Chrome Frame supports enterprise features such as an offline (MSI) installer, control of automatic updates, and centralized management via Group Policy.
1
u/Klathmon Apr 19 '13
those are for rolling out Chrome Frame yourself if you are a system's administrator.
You would have to jump through some extreme hoops to make sure it can't be installed
2
u/kenman Apr 19 '13
That's what I meant by 2 sides of the coin:
You can install it on a per-user basis.
You can install it enterprise-wide (or departmentalized) without the users having to do anything at all.
If more than a few people need Chrome Frame, then it's going to be much more efficient for IT to install it than every single user.
2
1
Apr 19 '13
For high-performance situations where you are updating thousands of nodes on a page constantly, I'm sure it makes a pretty significant improvement. Plus, the real efficiency is probably more likely found in the development time for the developers going forward. They most likely just wanted to shed old cruft
11
u/ddevil63 Apr 19 '13
Figures, we literally just migrated to 1.9.
21
u/VikingCoder Apr 19 '13
It's API-compatible with 1.9
1
u/Omikron Apr 19 '13
Except they dropped all IE8 support right?
16
u/rallison Apr 19 '13
API-compatible, not browser-compatible. As in, all your jQuery function calls continue to work, but support for oldIE is dropped.
14
u/Disgruntled__Goat Apr 19 '13
<!--[if lt IE 9]> <script src="jquery-1.9.1.js"></script> <![endif]--> <!--[if gte IE 9]><!--> <script src="jquery-2.0.0.js"></script> <!--<![endif]-->-1
u/Thimble Apr 19 '13
Which one will IE10 (doesn't support conditional comments) load? I can't test because I'm on IE9...
3
→ More replies (3)3
u/sharth Apr 19 '13 edited Apr 19 '13
If your browser does not support conditional comments, like firefox and webkit, then lines 1,2,3,4 and 6 are all traditional comments. So line 5 will be executed, which loads 2.0.0.
If you are using a browser that does not understand conditional comments, these are the comments you would see. I've marked with ☞ and ☜ what would be parsed as a comment. Note that the entire include for 1.9.1 is within a comment.
☞<!--[if lt IE 9]> <script src="jquery-1.9.1.js"></script> <![endif]-->☜ ☞<!--[if gte IE 9]><!-->☜ <script src="jquery-2.0.0.js"></script> ☞<!--**<![endif]**-->☜-3
u/Uberhipster Apr 19 '13
Except that IE 10 has dropped support for conditional comments.
http://blogs.msdn.com/b/ie/archive/2011/07/06/html5-parsing-in-ie10.aspx
5
u/Klathmon Apr 19 '13
and using this blurb will include 2.0 in IE 10...
Just like firefox and chrome (which also do not support conditional comments)
2
1
Apr 19 '13
Not completely.
Removing legacy features
Because some features in earlier versions of IE aren’t compatible with HTML5 parsing, we’ve removed them from IE10 mode. Sites that rely on these legacy features will still work when running in legacy modes. This way, sites that work today will continue to work with IE10 even if the developers of the site don’t have the time to update them.
2
17
u/trezor2 Apr 19 '13
To the people complaining about lack of support for very, very old versions of MSIE and Windows: Cry me a river.
People made these exact arguments that people "require XP and MSIE8" and that they "can't upgrade" years ago, when Vista was released, then when Windows 7 was released and now with Windows 8's release.
Here's news for you: You've had 2 or 3 advance warnings from Microsoft that your IT platform will be obsoleted and unsupported and 2 non-ordinary support-extensions. You've had more than half a decade to plan and execute the migration.
If you haven't completed that migration yet and are still whining, you are incompetent as an IT manager. There is no other way to describe this. If you are still running XP, that is because of incompetence. No excuses.
XP is older than the very first release of Ubuntu. Microsoft has supported XP for longer than Ubuntu's entire existance. As a basis for comparison any version of Ubuntu is supported for 2 years and that's it. XP has been around for 12 years now, and will be supported for yet another year before support is finally dropped. Sometimes enough is enough.
This is a good move by jQuery to streamline their code-base. Sometimes you need to do the spring-cleaning if you want your code to be manageable and have any chance of effectively improving your product, and this is just that spring-cleaning.
17
u/fork1 Apr 19 '13
In our case it's not about us.
We would love to drop IE7. But our clients still use it, and not supporting it is a "no-sale"
So no 2.0 for quite a awhile, since there is also IE8 afterwards to drop.
4
u/kenman Apr 19 '13
We're just now getting clients weaned off of IE6, which to my chagrin is obviously way overdue. I've been telling them IE7 is already in the same boat, but it's a losing argument. So, yeah... it'll probably be at least a year -- if not three -- before we can drop IE7.
Of course, we just upgraded jQuery from 1.4.2 to 1.7.2 less than a year ago, and so we still have plenty of time to work it all out seeing as 1.9 should keep us relevant for the next 5 years, give or take. With that said, I'm happy with the split-release.
6
u/Silhouette Apr 19 '13
The trouble is, you're looking at the wrong end of the spectrum. If you bought a PC even 3-4 years ago, there's still a fair chance it came with XP, and that means you're not running IE9+.
The reality is that 3-4 years is well within the useful lifetime for a modern PC. No-one just assumes you throw a machine out after 3 years and buy a new one any more. Pretending that IE8 is somehow IE6 is unrealistic, and for many sites such a policy is going to exclude a significant number of visitors for a while yet.
Yes, this sucks if your job as a web developer would be easier using modern web technologies. Yes, it will be a cost effective decision for some sites to drop support for IE8 and below anyway. Yes, this is something a site operator should decide by looking at their own metrics and marketing plan, and different people will come to different conclusions in their particular circumstances.
But please spare us the nauseating "You should have known better" speech. Microsoft can announce upgrades and EOLs all they want, but if you release turkeys like Vista and Windows 8, you lose a lot of credibility, and that's why so many people are still running XP and IE8 in 2013.
0
u/trezor2 Apr 19 '13 edited Apr 19 '13
The trouble is, you're looking at the wrong end of the spectrum. If you bought a PC even 3-4 years ago, there's still a fair chance it came with XP
Not fucking likely. I haven't seen a single new PC sold the last 5 years not delivered with Vista or newer.
5
u/Silhouette Apr 19 '13 edited Apr 19 '13
Really? Here in the UK, I saw a substantial wave of suppliers whose PCs came with XP installed (or, later, with an easy way to "downgrade" to XP) because there was so much negative reaction to Vista that advertising XP instead was a major plus point. And that went for both home and business users, too.
We didn't see the same thing happen with Windows 7, which didn't attract the same widespread hostile reaction, so I'd say it was normal for anything shipping since about 2010 to have Windows 7.
I do see hints of the same thing happening with Windows 8, but not to anything like the same degree that people avoided Vista. This time, it seems like a lot of people/businesses just aren't buying many new Windows PCs at all at the moment, and they're either upgrading what they've already got or spending a lot of their budget on other devices or back-end equipment instead this year.
[Edit: Typo]
1
u/trezor2 Apr 19 '13
Anyway that's a moot point. If you bought your own laptop a few years ago, you Can install a new browser.
The people typically complaining about the sky falling when XP support is getting dropped always mention big fortune 500 companies and internal apps using ancient technology.
These people no longer have any excuses. They've had time to plan and execute a migration by now.
3
u/ogre_pet_monkey Apr 19 '13
If you'd like, with every other release of ubuntu there is an lts release with support for 5 years.
(Not trying to undermine the rant about upgrading xp)
4
Apr 19 '13
Apparently James Burke is a man of [many talents](http://en.wikipedia.org/wiki/Connections_(TV_series)).
4
Apr 19 '13
I'm really not sure if you're kidding, but.... it's a different person: https://github.com/jrburke
5
Apr 19 '13
haha of course I'm kidding :) I recently re-watched Connections so that name stood out to me.
5
1
2
u/ghjm Apr 19 '13
IE8 still has more users than all versions combined of either Firefox or Chrome. Most people are not going to be able to use this for quite a long time.
-2
u/Unomagan Apr 19 '13
ssshhhhh dont tell anyone. You will be downvoted. Anyone who does real programming know this.
Will this change? Oh hell no!
Is this frustrating? Oh YES!
0
1
u/kagaku Apr 19 '13
Any benchmarks to show a speed improvement with this release? I understand a large reasoning was the code simplification, but I wonder what that translates to?
2
u/woxorz Apr 19 '13
That translates to the developers being able to add new features and improvements in a fraction of the time it took before.
That's all really. I'm excited to see where they can take it now.
1
u/erwan Apr 19 '13
Why did they keep Sizzle? They could cut the size if half by getting rid of that.
2
u/moleculo Apr 19 '13
The build system allows you to drop it.
The readme on github explains it all.
I've used the Beta without Sizzle and it works. Of course, doesn't change the fact that they're supporting a huge chunk of code that isn't used much and/or can be refactored out of existing codebases quite easily.
1
-1
-36
u/Soothe Apr 19 '13
Talk about disappointing. 12% code decrease as the main feature, and in exchange for IE 6-8 compatibility? That's not even an upgrade that's a downgrade.
69
Apr 19 '13
Of course! It should have been full of whiz-bang untested features that wouldn't work properly until jQuery 2.2.1, like most frameworks would have done!
This is the sanest major version change I've ever seen. The reason to change the major version number is because you're breaking compatibility, not because you're just looking for attention. So they dedicated an entire release to nothing but breaking compatibility with IE (and therefore making it simpler and faster), and announced it a year in advance.
Their choice to add no features to 2.0 means that your decision to upgrade is entirely based on whether you want the simpler version. There are no features forcing you to upgrade. If you want to do what 2.0 does with IE 6-8 compatibility, there's already a well-supported thing that does that called jQuery 1.9.
They thought about your requirements and have already fulfilled them. Be happy about that and don't shit on people's good work.
→ More replies (2)
-5
Apr 19 '13
You can (and should) continue to use jQuery 1.9 (and the upcoming 1.10) on web sites that need to accommodate older browsers.
Is someone going to tell them?
13
-14
-6
u/kietyo Apr 19 '13
Someone explain this to me so that a 5 year old can understand this.
5
u/cha0s Apr 19 '13
Damn, jQuery lost 10 kilos! She lookin' goooood! Some of the older guys don't find her cute anymore though, and won't talk to her. :(
4
u/jcampbelly Apr 19 '13 edited Apr 19 '13
jQuery was indecisive about going to college, so a team of scientists cloned her.
jQuery 1.9 decided to not graduate high school. So she's just going to stick around their home town. She'll keep helping out her old granny in the nursing home, run the family business down on main street and generally just be the kind of person who doesn't need the shiniest new things.
jQuery 2.0 is going to college so she can learn all of the new things being developed by the best scientists and help the world be able to use all their great work which is sometimes simply too complicated for most other scientists to understand.
For now though, jQuery 1.9 and jQuery 2.0 are still so similar nobody can tell them apart except her old boyfriend Irvan Earl VIII, the violent drunkard meth addict (whose family traces lineage back to the first slave traders, the KKK and founding members of the Nazi party). jQuery 1.9 still has some emotional baggage for him and thinks she can change him. jQuery 2.0 has decided she's "had a bad fall" a few too many times and should get on with her life.
-10
0
Apr 19 '13
[deleted]
7
6
Apr 19 '13
Because there aren't that many hacks required to support older browsers, but the new features that will come with 2.1.0 will be build on top of the fact that IE < 9 support is no longer required to implement a feature.
3
4
u/MindStalker Apr 19 '13 edited Apr 19 '13
a 10% decrease in size is still substantial.
Edit: 93kb to 83kb, 10.7% change.
→ More replies (8)
0
Apr 19 '13
[deleted]
→ More replies (1)2
0
Apr 19 '13
[deleted]
53
u/kenman Apr 19 '13
That's not the case for everyone though, e.g. if you have a dedicated mobile site, or if you want to leverage the API for native Android/iPhone apps, or maybe if you're doing the whole Win8 metro app thing... IE support, especially legacy, literally does not matter in the slightest and is just bloat in the code, and for mobile, the bloat adds up in a hurry.
Also, there's sites like this guy's.
25
u/Iggyhopper Apr 19 '13
Or maybe you're creating a Chrome/Firefox/Safari/Opera extension where IE problems don't exist.
→ More replies (1)15
8
u/elechi Apr 19 '13
To quote Pam from Archer: Don't be a dick.
If you want to support older browsers, use the 1.9 line. That's what it's there for.
4
u/rDr4g0n Apr 19 '13
I am lucky in that I get to write web applications for use in-house, meaning I can require the users to use firefox or chrome. So yeah, there are lots and lots of people who use jquery for other stuff besides regular ol websites.
7
Apr 19 '13
You alienate nobody. You provide 1.9 for people who can't support 2.0. Read the damn release information.
3
u/mooisacow Apr 19 '13
They can add new fancy feature that don't have to works on IE6/7/8 in the future though
→ More replies (1)2
u/Sawny Apr 19 '13
So.. that means that you can save 100kb by alienating 100% of your visitors! Sound like a good deal!
34
u/tejp Apr 18 '13
No support for IE8 while it still has over 20% market share sounds like a bad idea...