JQuery- Do developers need it?

  • (3 Pages)
  • +
  • 1
  • 2
  • 3

36 Replies - 904 Views - Last Post: 05 February 2014 - 07:20 AM

#16 e_i_pi  Icon User is online

  • = -1
  • member icon

Reputation: 795
  • View blog
  • Posts: 1,681
  • Joined: 30-January 09

Re: JQuery- Do developers need it?

Posted 31 January 2014 - 05:29 AM

The last place I worked for used their own in-house Javascript libraries (don't worry, this is on topic, read on). I asked why we didn't use jQuery. The boss said jQuery sucked. When I asked a co-worker, we said that the boss got burnt by jQuery when it was in early development, and has hated it ever since. The result for the company? Javascript that worked in IE8, sometimes worked in IE9, and borked in everything else. The dev team didn't have time to get it cross browser compliant, so the customers were told to use outdated versions of browsers and suck it up.

The big benefit I see to using jQuery (apart from the ubiquity) is that the jQuery is very cross browser compliant. If I write a line of code in jQuery, there's a very strong chance that I don't need to hack in some shitty code in order to get it working in Version Old of XYZ Browser (read: IE). I'm sure people can come up with examples where I'm wrong - I'm not saying jQuery is the magic bullet, but it does make life a lot easier.

This post has been edited by e_i_pi: 31 January 2014 - 05:29 AM

Was This Post Helpful? 0
  • +
  • -

#17 andrewsw  Icon User is online

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3325
  • View blog
  • Posts: 11,244
  • Joined: 12-December 12

Re: JQuery- Do developers need it?

Posted 31 January 2014 - 06:16 AM

View Poste_i_pi, on 31 January 2014 - 12:29 PM, said:

The big benefit I see to using jQuery (apart from the ubiquity) is that the jQuery is very cross browser compliant. If I write a line of code in jQuery, there's a very strong chance that I don't need to hack in some shitty code in order to get it working in Version Old of XYZ Browser (read: IE). I'm sure people can come up with examples where I'm wrong - I'm not saying jQuery is the magic bullet, but it does make life a lot easier.

But isn't this part of the argument: that this kind of browser-hackery is no longer necessary, unless you are really obligated to support such old (IE!) browsers? So, as mentioned in that vanilla.js link and elsewhere, one of the main benefits of jQuery was its cross-browser-eness - this can no longer be a main reason for using it.
Was This Post Helpful? 0
  • +
  • -

#18 ge∅  Icon User is offline

  • D.I.C Regular

Reputation: 62
  • View blog
  • Posts: 476
  • Joined: 21-November 13

Re: JQuery- Do developers need it?

Posted 31 January 2014 - 06:26 AM

Quote

The big benefit I see to using jQuery (apart from the ubiquity) is that the jQuery is very cross browser compliant. If I write a line of code in jQuery, there's a very strong chance that I don't need to hack in some shitty code in order to get it working in Version Old of XYZ Browser (read: IE). I'm sure people can come up with examples where I'm wrong - I'm not saying jQuery is the magic bullet, but it does make life a lot easier.


On the other hand, if you come across a jQuery code that isn't cross browser, you will be having a very hard time fixing it (silent failings pop into my mind). And you don't want to overwrite a jQuery method so you will end up mixing jQuery code and native code...

jQuery is ok if you reproduce known patterns because it is cheap and you know it'll work, but if you have a cross-boundary approach of programming and design it will hamper your creativity and slow the development down IMO.

There are plenty of standalone polyfills and a lightweight libraries / frameworks on the web. Have a look at this for example microjs.com

-

andrewsw, I don't have any example in mind but there are a lot of new functionalities that are not crossbrowser, and sometimes the bad guy is not IE but Chrome, Firefox, Safari or Opera

This post has been edited by ge∅: 31 January 2014 - 06:29 AM

Was This Post Helpful? 0
  • +
  • -

#19 andrewsw  Icon User is online

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3325
  • View blog
  • Posts: 11,244
  • Joined: 12-December 12

Re: JQuery- Do developers need it?

Posted 31 January 2014 - 06:46 AM

View Postge∅, on 31 January 2014 - 01:26 PM, said:

andrewsw, I don't have any example in mind but there are a lot of new functionalities that are not crossbrowser, and sometimes the bad guy is not IE but Chrome, Firefox, Safari or Opera

Yes, of course, newer functionality will still be a concern. In which case, jQuery remains an option.
Was This Post Helpful? 0
  • +
  • -

#20 blankwavercade  Icon User is offline

  • D.I.C Head

Reputation: 30
  • View blog
  • Posts: 115
  • Joined: 13-December 11

Re: JQuery- Do developers need it?

Posted 31 January 2014 - 07:42 AM

A way to make sure your functionality works cross browser is to always checkout http://caniuse.com/ to make sure the feature you want to add works in certain browsers. If it doesn't build a fall back that doesn't use the new functionality you're trying to implement. There's always a way to deal with old versions of IE. Even if it does mean not supporting it. I understand that if you're writing code for a company intranet you may have to support old versions of IE. then jQuery becomes useful for those things. In no way am I saying I don't like jQuery, but I am trying to move away from it and only use vanilla js.
Was This Post Helpful? 0
  • +
  • -

#21 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3716
  • View blog
  • Posts: 5,976
  • Joined: 08-June 10

Re: JQuery- Do developers need it?

Posted 31 January 2014 - 08:05 AM

andrewsw said:

But isn't this part of the argument: that this kind of browser-hackery is no longer necessary, unless you are really obligated to support such old (IE!) browsers? So, as mentioned in that vanilla.js link and elsewhere, one of the main benefits of jQuery was its cross-browser-eness - this can no longer be a main reason for using it.

blankwavercade said:

I understand that if you're writing code for a company intranet you may have to support old versions of IE.

There is still a high enough usage share of IE7 for it to be unacceptable for a business to lose those users because of a browser incompatibility issue.
Was This Post Helpful? 0
  • +
  • -

#22 ge∅  Icon User is offline

  • D.I.C Regular

Reputation: 62
  • View blog
  • Posts: 476
  • Joined: 21-November 13

Re: JQuery- Do developers need it?

Posted 31 January 2014 - 08:38 AM

IE7 wasn't that bad : PNG-24 support, native XMLHttpRequest support, proper box model, support of good CSS selectors like A[attr^="name"], A>B, A+B...
Ok, there is no AddEventListener but I prefer onevent properties... The only thing I miss a lot is canvas and ::before/::after pseudo-elements.

This post has been edited by ge∅: 31 January 2014 - 08:39 AM

Was This Post Helpful? 0
  • +
  • -

#23 ArtificialSoldier  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 357
  • View blog
  • Posts: 1,292
  • Joined: 15-January 14

Re: JQuery- Do developers need it?

Posted 31 January 2014 - 09:49 AM

Quote

There is still a high enough usage share of IE7 for it to be unacceptable for a business to lose those users because of a browser incompatibility issue.

It was a great day for me when we officially dropped support for IE6 and IE7. Today we'll fix issues in IE8+ on our dime, although we don't typically test with IE8. We don't even have IE6 or 7 in house any more. If someone comes to us to implement a new feature and they need IE6, or even if they come to us about a bug that only affects IE6 or IE7, they get charged extra. Fixing bugs in IE6/7 is the only time we ever charge someone for a bug fix, but usage of those is so low that we can't justify doing it for free any more. Besides, some of those bugs are really obscure (anyone who has ever had a Flash movie running inside of a frame and trying to send out requests to download Office documents with Office being installed knows what I'm talking about).

We do use a Javascript framework for our application though, although right now we're stuck on an old version of it until we roll out the next major version of our application. We're using ExtJS 2.3, which has good support for older browsers so we typically don't run into too many compatibility issues. The major reason I designed the application around ExtJS was so that I could take advantage of all of the UI elements, like draggable windows with chrome, tab panels, grids, trees, etc. I wanted to make it feel like a desktop application, with traditional buttons, dragging and dropping, double-clicking to open, etc. Then the mobile revolution came along...

Our experience is a little different from other companies though, we don't provide public services. Our customers come to us and we host their application for them on our servers, and I think that only 1 or 2 of our customers have their applications open for public registration. Everything else is closed off where only admins can add new users, so we don't get the general public using our stuff. A couple customers have some shopping cart integration so that new accounts get created when orders come in, I guess that would count as public registration.
Was This Post Helpful? 0
  • +
  • -

#24 blankwavercade  Icon User is offline

  • D.I.C Head

Reputation: 30
  • View blog
  • Posts: 115
  • Joined: 13-December 11

Re: JQuery- Do developers need it?

Posted 31 January 2014 - 04:50 PM

View PostAtli, on 31 January 2014 - 08:05 AM, said:

There is still a high enough usage share of IE7 for it to be unacceptable for a business to lose those users because of a browser incompatibility issue.



1.7% for ie7 which is not high, and unsurprisingly ~6% for ie6 which is high/low. supporting such old browsers really isn't that important. Especially for that fact that EOL is 4/8/14. Also why not just do what is needed in javascript to be cross browser compliant? If you support those old out dated browsers you probably have no reason writing code for those browsers. There is a point when a company needs to make a decision to drop support. A lot of businesses that are extremely tech savy are more than likely not aimed towards a demographic that uses these browsers anyways.

If we're going to talk about javascript not being cross browser compliant what about html5? ie6/7 doesnt support it so does that mean we shouldn't use html5? No you use html5shiv.

Writing fallbacks in your website is needed in this day and age, unless of course youre making web apps where theres not a chance in hell that it'll run in old browsers.

This post has been edited by blankwavercade: 31 January 2014 - 04:54 PM

Was This Post Helpful? 0
  • +
  • -

#25 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3716
  • View blog
  • Posts: 5,976
  • Joined: 08-June 10

Re: JQuery- Do developers need it?

Posted 01 February 2014 - 03:05 AM

View Postblankwavercade, on 31 January 2014 - 11:50 PM, said:

1.7% for ie7 which is not high, and unsurprisingly ~6% for ie6 which is high/low. supporting such old browsers really isn't that important. Especially for that fact that EOL is 4/8/14. Also why not just do what is needed in javascript to be cross browser compliant?

That depends on your perspective. For many companies, who depend on their public website for new customers, losing out on even 1% of visitors because you don't support their legacy browser is completely unacceptable. Writing native code to overcome these issues can take a lot of unnecessary effort (unnecessary development cost), so using a library like jQuery is really the only sensible option.
Was This Post Helpful? 0
  • +
  • -

#26 blankwavercade  Icon User is offline

  • D.I.C Head

Reputation: 30
  • View blog
  • Posts: 115
  • Joined: 13-December 11

Re: JQuery- Do developers need it?

Posted 01 February 2014 - 08:21 AM

You still missed the point of win XP EOL is coming soon. Now yes it's not guaranteed that everyone will upgrade. However it will take out a huge chunk of both of those numbers. In no way am I saying jQuery is bad, it's a great library it's just not as needed as it once was. There's still the option of writing a fall back page. Then you can write all the jQuery spaghetti you want for ie6/7. A lot of people would be against this because it takes extra development time to do. But When it's better to write a fast page for new browsers than it is to take performance hits because you're supporting a small percent of users. Also yes jQuery is easier for ajax calls in older browsers, but its not terrible to write without it.
Was This Post Helpful? 0
  • +
  • -

#27 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3716
  • View blog
  • Posts: 5,976
  • Joined: 08-June 10

Re: JQuery- Do developers need it?

Posted 01 February 2014 - 09:23 AM

Quote

Now yes it's not guaranteed that everyone will upgrade.

It's pretty much guaranteed that not everyone will upgrade. In fact, given past experience, I'd say it's far more likely that most will not upgrade. It costs a lot of money for companies to upgrade their systems, so they will stubbornly keep using their current systems as long as humanly possible, even if that puts them at risk.

Even if 85% of XP users were to upgrade to Win7/Win8 in the next couple of years, and therefore IE8+, the market-share left is still an unacceptable loss for many. You were talking about a ~7% usage share for IE6 and IE7. If we assume it goes down to 1% combined, that's still too much to ignore just to not use jQuery.

You're also overstating the "performance hit" a bit. Keep in mind that in order to see an actual difference in most operations, you've got to run benchmarks with thousands of calls. For normal usage, the performance hit is practically non-existent.
Was This Post Helpful? 0
  • +
  • -

#28 ge∅  Icon User is offline

  • D.I.C Regular

Reputation: 62
  • View blog
  • Posts: 476
  • Joined: 21-November 13

Re: JQuery- Do developers need it?

Posted 02 February 2014 - 05:42 AM

I agree with the performance hit part, but for another reason : it's not because your site is running smoothly in your up to date browser with no other opened tabs, with no CPU intensive programs running in background, on your cutting-edge PC, that every body is going to use your site in the same conditions. Users running IE6 on an old PC with no multi-threading and low amount of memory will definitely prefer an optimised or less interactive site. Visual effects like fadings are ugly on IE 6 to 8 anyway and there is nothing jQuery can do about it. Sometimes you have to tell your client that you can make his site running on every machine, but not with the same features.

Another thing that bothers me is that, because developers want to save time, they make jQuery sites, especially AJAX sites, that don't work at all when javascript is disabled.I'm not saying that people actually use their browser this way, but if developers keep doing that, upgrade to jQuery 2 (because they obviously don't know what they are doing), their site will simply stop working on IE8 and below.

The web is going less and less accessible because of the jQuery way of coding. It has become too easy to make a good looking website that wouldn't work at all without jQuery. When I was learning Javascript I was told that Javascript should only be a layer on top of a fully functional site and it is still the way I code today. Progressive enhancement is healthy and it doesn't require fallbacks. Of course, if you use recent functionalities like cross-domain AJAX requests, you need to think of the compatibility and a library is time saving, but do you need something as big, as general purpose and as invasive as jQuery ? It's not even Javascript-like syntax, you have to relearn everything and pass through its ass crack every time you need to do something, even if it's native.

And I don't get the point with AJAX. People using jQuery always talk about element selections, AJAX, events, loops, animations... It's Javascript basics. If you need only that you can do it as easily with a 200 or 300 lines library.

This post has been edited by ge∅: 02 February 2014 - 05:45 AM

Was This Post Helpful? 0
  • +
  • -

#29 blankwavercade  Icon User is offline

  • D.I.C Head

Reputation: 30
  • View blog
  • Posts: 115
  • Joined: 13-December 11

Re: JQuery- Do developers need it?

Posted 02 February 2014 - 09:32 AM

View PostAtli, on 01 February 2014 - 09:23 AM, said:

Quote

Now yes it's not guaranteed that everyone will upgrade.

You're also overstating the "performance hit" a bit. Keep in mind that in order to see an actual difference in most operations, you've got to run benchmarks with thousands of calls. For normal usage, the performance hit is practically non-existent.


Sure I see what you're saying. But why pull in a library with a ton of functionality you aren't going to use? And only use 5 or so for ajax? Isn't it just a bit easier to just write the 10-15 extra lines of code to deal with older versions of ie? What happens when jQuery drops support for older versions of ie? You have to go in and place the ie comment conditionals in so that you have an older version of the library incase it is ie6/7/8. So writing the ajax calls in plain javascript is not terrible like most people seem to think. When pure js runs faster and more efficiently then jQuery why not just use it? I guess there is the possibility of using zepto.js which is just a small javascript framework with a bunch of the jQuery api baked in.

This post has been edited by blankwavercade: 02 February 2014 - 09:33 AM

Was This Post Helpful? 0
  • +
  • -

#30 ArtificialSoldier  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 357
  • View blog
  • Posts: 1,292
  • Joined: 15-January 14

Re: JQuery- Do developers need it?

Posted 03 February 2014 - 09:49 AM

Quote

1.7% for ie7 which is not high, and unsurprisingly ~6% for ie6 which is high/low.

If those numbers are worldwide, then the vast majority of IE6 usage is coming from China. If you exclude China from the stats then IE6 usage plummets. There's simply no reason to use it anymore, but there are a lot of users in China running pirated copies of Windows XP who use IE6 still because they aren't eligible for Windows updates, and either don't know or don't care about alternative browsers.

Quote

For many companies, who depend on their public website for new customers, losing out on even 1% of visitors because you don't support their legacy browser is completely unacceptable.

That's a good sentiment, but the number of websites I go to which tell me that I need to upgrade Opera to a "modern browser" would speak otherwise. For a long time it was just "best viewed in IE", but a lot of big sites are finally getting away from browser detection. Back on topic, the rise of Javascript libraries like jQuery or Bootstrap is probably a major factor in reducing the browser requirements.

Quote

You're also overstating the "performance hit" a bit. Keep in mind that in order to see an actual difference in most operations, you've got to run benchmarks with thousands of calls. For normal usage, the performance hit is practically non-existent.

ge∅ hit on this as well, but we are talking about IE6/IE7 here. That's the dark ages of Javascript performance. Running a modern site in a 10 year old laptop with XP/IE6 will definitely create a noticeable performance hit. Microsoft destroyed Netscape and sat on their laurels (even closing the IE department) before Firefox popped up, and eventually Chrome. Google poured so many resources into Javascript development and moved Javascript performance up by many orders of magnitude and essentially forced all of the other vendors to do the same or else look like a dinosaur. I credit Google with Javascript being as powerful and useful as it is today, Firefox was doing a decent job and at least forced Microsoft to start development on IE again, but Google saw that their future was in Maps and Gmail and things like that and took the initiative to really jumpstart Javascript engine development. Microsoft still required several years and eventually got IE9 more or less in the same ballpark as the other browsers regarding Javascript performance, but eventually they got there. With all of the improvement that has gone into browsers in general, and Javascript engines in particular, I am very hard-pressed to find any reason to support a browser that is 12 years old. Hell, I almost feel like trying to support IE6 is an insult to all of the engineers at Google, Mozilla, and Microsoft (and Opera; I love you Opera) who have been working to improve things for us.

Hell, I was just happy when IE started supporting PNG transparency. I refuse to go back!

If you disagree though, there's a petition for you:

http://www.saveie6.com
Was This Post Helpful? 0
  • +
  • -

  • (3 Pages)
  • +
  • 1
  • 2
  • 3