Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #26271 > unrolled thread
| Started by | Andrew Poulos <ap_prog@hotmail.com> |
|---|---|
| First post | 2014-12-03 08:30 +1100 |
| Last post | 2014-12-16 12:56 -0800 |
| Articles | 16 — 10 participants |
Back to article view | Back to comp.lang.javascript
jquery and hoi polloi Andrew Poulos <ap_prog@hotmail.com> - 2014-12-03 08:30 +1100
Re: jquery and hoi polloi "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-12-02 23:33 +0100
Re: jquery and hoi polloi "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-12-04 21:46 -0800
Re: jquery and hoi polloi "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-12-10 00:47 +0100
Re: jquery and hoi polloi danca <cyberdanny@tiscalinet.it> - 2014-12-03 00:14 +0100
Re: jquery and hoi polloi Erwin Moller <erwinmollerusenet@xs4all.nl> - 2014-12-03 14:47 +0100
Re: jquery and hoi polloi Gregor Kofler <usenet@gregorkofler.com> - 2014-12-03 16:44 +0100
Re: jquery and hoi polloi Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-12-04 22:06 +0100
Re: jquery and hoi polloi RobG <rgqld@iinet.net.au> - 2014-12-08 18:39 -0800
Re: jquery and hoi polloi Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2014-12-09 13:23 -0800
Re: jquery and hoi polloi RobG <rgqld@iinet.net.au> - 2014-12-10 17:00 -0800
Re: jquery and hoi polloi "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-12-11 03:16 +0100
Re: jquery and hoi polloi RobG <rgqld@iinet.net.au> - 2014-12-10 18:37 -0800
Re: jquery and hoi polloi Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2014-12-11 11:08 -0800
Re: jquery and hoi polloi "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-12-11 22:52 +0100
Re: jquery and hoi polloi Scott Sauyet <scott.sauyet@gmail.com> - 2014-12-16 12:56 -0800
| From | Andrew Poulos <ap_prog@hotmail.com> |
|---|---|
| Date | 2014-12-03 08:30 +1100 |
| Subject | jquery and hoi polloi |
| Message-ID | <svOdnVxF-e8OrePJnZ2dnUVZ8q2dnZ2d@westnet.com.au> |
For years the many of the experts here have clearly explained why libraries like jquery are "rubbish". The FAQ even states that no library is endorsed by the group. Their arguments have been persuasive. I've attended a number of interviews recently and everyone has specifically asked about my level of ability with jquery (which currently is next to zero). So the moral of the story is, if the hoi polloi have adopted it you still need to learn things that experts have deemed crap. Andrew Poulos
[toc] | [next] | [standalone]
| From | "Christoph M. Becker" <cmbecker69@arcor.de> |
|---|---|
| Date | 2014-12-02 23:33 +0100 |
| Message-ID | <m5leoa$kh0$1@solani.org> |
| In reply to | #26271 |
Andrew Poulos wrote: > For years the many of the experts here have clearly explained why > libraries like jquery are "rubbish". The FAQ even states that no library > is endorsed by the group. Their arguments have been persuasive. > > I've attended a number of interviews recently and everyone has > specifically asked about my level of ability with jquery (which > currently is next to zero). > > So the moral of the story is, if the hoi polloi have adopted it you > still need to learn things that experts have deemed crap. Even though I am no expert in browser side scripting, I like to add a comment nonetheless. IMHO the biggest problem with libraries such as jQuery is that they obscure what's going on behind the scenes -- even up to the point where beginners think that jQuery and "Javascript" are competitors when it comes to browser scripting. Therefore I strongly suggest that beginners should avoid such libraries, and learn ECMAScript and the browser APIs (DOM etc.) first. When they have reached a good understanding of these, they are able to decide if and when to use a (certain) library (if they have the freedom), and are able to make the best use of the library. Furthermore it seems sensible to point out that different libraries shouldn't be lumped together -- it seems to me there are big differences between them, and some libraries might have been able to improve over time. -- Christoph M. Becker
[toc] | [prev] | [next] | [standalone]
| From | "Michael Haufe (TNO)" <tno@thenewobjective.com> |
|---|---|
| Date | 2014-12-04 21:46 -0800 |
| Message-ID | <acf61d1f-94c8-4973-8ba9-3e760027093d@googlegroups.com> |
| In reply to | #26272 |
On Tuesday, December 2, 2014 4:33:52 PM UTC-6, Christoph M. Becker wrote: > IMHO the biggest problem with libraries such as jQuery is that they > obscure what's going on behind the scenes -- even up to the point where > beginners think that jQuery and "Javascript" are competitors when it > comes to browser scripting. If my memory serves me correctly, I think it was even advertised this way. More than once I've considered it a shame that the jquery didn't splinter off with its community back in 2007 when Resig was playing with a "compiler": <http://ejohn.org/apps/jquery2/>
[toc] | [prev] | [next] | [standalone]
| From | "Christoph M. Becker" <cmbecker69@arcor.de> |
|---|---|
| Date | 2014-12-10 00:47 +0100 |
| Message-ID | <m681m0$m8i$1@solani.org> |
| In reply to | #26277 |
Michael Haufe (TNO) wrote: > On Tuesday, December 2, 2014 4:33:52 PM UTC-6, Christoph M. Becker > wrote: > >> IMHO the biggest problem with libraries such as jQuery is that >> they obscure what's going on behind the scenes -- even up to the >> point where beginners think that jQuery and "Javascript" are >> competitors when it comes to browser scripting. > > If my memory serves me correctly, I think it was even advertised this > way. That would have been sad. > More than once I've considered it a shame that the jquery didn't > splinter off with its community back in 2007 when Resig was playing > with a "compiler": > > <http://ejohn.org/apps/jquery2/> Thanks for the link -- I didn't know this. Apparently, no browser vendor was interested in implementing support for <script type="text/jquery">[1] -- probably for good reasons. [1] <http://de.slideshare.net/jeresig/meta-programming-with-javascript> -- Christoph M. Becker
[toc] | [prev] | [next] | [standalone]
| From | danca <cyberdanny@tiscalinet.it> |
|---|---|
| Date | 2014-12-03 00:14 +0100 |
| Message-ID | <m5lh3p$17b$1@dont-email.me> |
| In reply to | #26271 |
Il 02/12/2014 22:30, Andrew Poulos ha scritto: > For years the many of the experts here have clearly explained why > libraries like jquery are "rubbish". The FAQ even states that no library > is endorsed by the group. Their arguments have been persuasive. > > I've attended a number of interviews recently and everyone has > specifically asked about my level of ability with jquery (which > currently is next to zero). > > So the moral of the story is, if the hoi polloi have adopted it you > still need to learn things that experts have deemed crap. > > Andrew Poulos "some" experts in "this" newsgroup, and specifically from a technical (not always) point of view. Windows was crap and probably still is a bit crappy. Who cares? My 2 cents. Dan
[toc] | [prev] | [next] | [standalone]
| From | Erwin Moller <erwinmollerusenet@xs4all.nl> |
|---|---|
| Date | 2014-12-03 14:47 +0100 |
| Message-ID | <547f1473$0$2910$e4fe514c@news2.news.xs4all.nl> |
| In reply to | #26271 |
On 12/2/2014 10:30 PM, Andrew Poulos wrote: > For years the many of the experts here have clearly explained why > libraries like jquery are "rubbish". The FAQ even states that no library > is endorsed by the group. Their arguments have been persuasive. > > I've attended a number of interviews recently and everyone has > specifically asked about my level of ability with jquery (which > currently is next to zero). > > So the moral of the story is, if the hoi polloi have adopted it you > still need to learn things that experts have deemed crap. > > Andrew Poulos Yes, the masses have adopted to JQuery. Now they demand you use it. My take on it: I kept my (professional) distance to JQuery after reading comments in here, many years ago. Especially the reviews by David Mark were convincing to me. In those days I wasn't good enough to judge the quality of JQuery myself, but I got a bad impression of the framework online, caused by a lot of fanboys, with their fanboy-behaviour. What I read then, seldom showed any understanding of DOM, and they were often confused. That, combined with their fanboy-behaviour online, was a clear sign (for me) to be on guard when it comes to JQuery. On the bright side, you CAN make a buck out of JQuery, and still stay sane, if you want. I believe above mentioned David Mark hires himself often as a consultant that de-crapifies websites that were done with JQuery, and then ran into all kinds of technical problems when things get more complex. The only solution is calling in the cavalry. ;-) One last thought: You *can* explain in a jobinterview why you avoid JQuery, and have some real-world examples at hand. Some (good) interviewers will be interested then in what you have to say. (Worked for me on occasion) Regards, Erwin Moller -- "That which can be asserted without evidence, can be dismissed without evidence." -- Christopher Hitchens
[toc] | [prev] | [next] | [standalone]
| From | Gregor Kofler <usenet@gregorkofler.com> |
|---|---|
| Date | 2014-12-03 16:44 +0100 |
| Message-ID | <m5nb54$tbc$1@dont-email.me> |
| In reply to | #26271 |
Am 2014-12-02 um 22:30 schrieb Andrew Poulos: > For years the many of the experts here have clearly explained why > libraries like jquery are "rubbish". The FAQ even states that no library > is endorsed by the group. Their arguments have been persuasive. > > I've attended a number of interviews recently and everyone has > specifically asked about my level of ability with jquery (which > currently is next to zero). At this point you can safely claim that you are a jQuery "expert", since it can be assumed that the interviewers are clueless anyway and were just namedropping.
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2014-12-04 22:06 +0100 |
| Message-ID | <7897329.NcQaMDjD4R@PointedEars.de> |
| In reply to | #26275 |
Gregor Kofler wrote: > Am 2014-12-02 um 22:30 schrieb Andrew Poulos: >> For years the many of the experts here have clearly explained why >> libraries like jquery are "rubbish". The FAQ even states that no library >> is endorsed by the group. Their arguments have been persuasive. >> >> I've attended a number of interviews recently and everyone has >> specifically asked about my level of ability with jquery (which >> currently is next to zero). > > At this point you can safely claim that you are a jQuery "expert", since > it can be assumed that the interviewers are clueless anyway and were > just namedropping. I can tell from personal experience that this is a fallacy. -- PointedEars FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/> Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix> Please do not cc me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | RobG <rgqld@iinet.net.au> |
|---|---|
| Date | 2014-12-08 18:39 -0800 |
| Message-ID | <3e25f0fa-4c3f-4d51-a6a0-da69bd8b3677@googlegroups.com> |
| In reply to | #26271 |
On Wednesday, December 3, 2014 7:35:21 AM UTC+10, Andrew Poulos wrote:
> For years the many of the experts here have clearly explained why
> libraries like jquery are "rubbish". The FAQ even states that no library
> is endorsed by the group. Their arguments have been persuasive.
>
> I've attended a number of interviews recently and everyone has
> specifically asked about my level of ability with jquery (which
> currently is next to zero).
>
> So the moral of the story is, if the hoi polloi have adopted it you
> still need to learn things that experts have deemed crap.
>
> Andrew Poulos
I don't think jQuery users are any more clueless than other programmers, it just takes them very much longer to learn how to write good code as they must first work out how to use jQuery, then discover a whole new world of javascript.
It's very dispiriting to see:
if ( $( this ).is( "#stop" ) )
in the jQuery documentation (http://api.jquery.com/each/), which must be classified as gratuitous use of a library.
I recently worked on a large, complex application where the use of Bootstrap + jQuery lead to absolutely dreadful performance, mostly linked to the UI. Why Bootstrap? Someone mentioned early that it might need to run on mobile devices, and even after that was dismissed, the use of Bootstrap continued.
Of course loading 63 scripts that were various libraries, plugins, helpers and application code totalling over 1.5MB should have been an indicator to someone that maybe there was something wrong with the architecture.
You'll often seen things like:
$(this).attr('id') === 'foo'
instead of:
this.id == 'foo';
which is explained away as "I use jQuery for everything to keep it consistent, besides, it fixes cross-browser issues". It kills performance, doesn't fix any issues here and is more to type. But I guess if your only tool is a hammer...
I suppose it doesn't descend to the depths of:
$(this).is('#foo')
though.
Yesterday I attempted to use a corporate administrative web application built using SharePoint with Safari 7.1 (you know, the ones with a doctype of "XHTML 1.0 Strict", use document.write to include scripts and bulk out to over 3MB for a simple page). It didn't work, throwing script errors.
After advising the service desk, I was told "cross browser web sites are too hard, use Firefox". I mentioned another application written 15 years ago that hasn't had any significant upgrades, yet it works on every platform I've tried (even IE 4). They also use jQuery in there somewhere, doesn't seem to have fixed whatever cross-browser issue they have.
Seems cross browser web sites were simpler back then...
--
Rob
[toc] | [prev] | [next] | [standalone]
| From | Cezary Tomczyk <cezary.tomczyk@gmail.com> |
|---|---|
| Date | 2014-12-09 13:23 -0800 |
| Message-ID | <27938323-9eca-480c-8ead-2000865bcecc@googlegroups.com> |
| In reply to | #26282 |
On 2014-12-09 03:39, RobG wrote: [...] > which is explained away as "I use jQuery for everything to keep it > consistent, besides, it fixes cross-browser issues". It kills > performance, doesn't fix any issues here and is more to type. But I > guess if your only tool is a hammer... [...] Regarding jQuery performance (and other similar libraries) I had recently discussion around that as well and there is always question: "If we remove jQuery then what's the gain of performance?". Well, mostly not so much. Only in some critical parts. And because there are no critical parts then... they don't need to remove jQuery. So, there are always arguments: 1. Consistency in the source code (this can be handled in many ways, at least for example Grunt task + ESLint). 2. Cross-browser functionality (today's browsers are relatively good and there is no need to do so many fixes and hacks to get the cross-browser job done). 3. We don't have to spend time on writing unit tests (there is no need, I think, to write tons of unit tests; only for some edge cases). 4. We want to speed up development process (5 years ago that was true, but not today). Whenever I am trying to explain that everything above today's day is easy doable and we can learn low level details of JavaScript then people repeating the same points, as I described, like mantra. It's like fruitless discussion :-( -- Cezary Tomczyk http://www.ctomczyk.pl/
[toc] | [prev] | [next] | [standalone]
| From | RobG <rgqld@iinet.net.au> |
|---|---|
| Date | 2014-12-10 17:00 -0800 |
| Message-ID | <82684c28-b567-4b2c-8d2b-eb0c41376cd2@googlegroups.com> |
| In reply to | #26296 |
On Wednesday, December 10, 2014 7:23:43 AM UTC+10, Cezary Tomczyk wrote: > On 2014-12-09 03:39, RobG wrote: > [...] > > which is explained away as "I use jQuery for everything to keep it > > consistent, besides, it fixes cross-browser issues". It kills > > performance, doesn't fix any issues here and is more to type. But I > > guess if your only tool is a hammer... > [...] > > Regarding jQuery performance (and other similar libraries) I had recently discussion around that as well and there is always question: "If we remove jQuery then what's the gain of performance?". Well, mostly not so much. Only in some critical parts. And because there are no critical parts then... they don't need to remove jQuery. Yes, jQuery isn't so bad for performance if used judiciously. However, because many who use it have no idea what it's doing, they don't understand the performance risk until it becomes an issue. Often it's the result of using selectors based on complex DOM structures, fixing that later means virtually re-writing the application. Also, the mantra of "do more with less" doesn't necessarily deliver. Many seem to think that if they use jQuery, the equivalent POJS must be more code when likely it isn't. -- Rob
[toc] | [prev] | [next] | [standalone]
| From | "Christoph M. Becker" <cmbecker69@arcor.de> |
|---|---|
| Date | 2014-12-11 03:16 +0100 |
| Message-ID | <m6aupe$esl$1@solani.org> |
| In reply to | #26307 |
RobG wrote:
> Yes, jQuery isn't so bad for performance if used judiciously.
However, there are some cases where the perfomance of jQuery is really
bad. These cases might not be relevant for the overall performance, but
nonetheless I won't call avoiding them micro-optimizations. See for
instance <http://jsperf.com/document-getelementbyid-vs-jquery/3>.
What's wrong with using document.getElementById()?
> However, because many who use it have no idea what it's doing, they
> don't understand the performance risk until it becomes an issue.
> Often it's the result of using selectors based on complex DOM
> structures, fixing that later means virtually re-writing the
> application.
From my limited experience, not seldom it's just the matter of repeating
yourself. Apparently, jQuery enforces this technique. For instance:
$(".foo .bar .baz").do_something();
// ...
$(".foo .bar .baz").do_something_else();
instead of:
var elems = $(".foo .bar .baz");
elems.do_something();
// ...
elems.do_something_else();
(I'm aware that the two snippets are not necessarily equivalent, but too
often they are.)
> Also, the mantra of "do more with less" doesn't necessarily deliver.
> Many seem to think that if they use jQuery, the equivalent POJS must
> be more code when likely it isn't.
"POJS"? Plain old JavaScript?
--
Christoph M. Becker
[toc] | [prev] | [next] | [standalone]
| From | RobG <rgqld@iinet.net.au> |
|---|---|
| Date | 2014-12-10 18:37 -0800 |
| Message-ID | <c3ef0bfe-dc43-4d8d-af46-7d718f31153d@googlegroups.com> |
| In reply to | #26309 |
On Thursday, December 11, 2014 1:16:20 PM UTC+11, Christoph M. Becker wrote: > RobG wrote: [...] > > Also, the mantra of "do more with less" doesn't necessarily deliver. > > Many seem to think that if they use jQuery, the equivalent POJS must > > be more code when likely it isn't. > > "POJS"? Plain old JavaScript? Yes. :-) -- Rob
[toc] | [prev] | [next] | [standalone]
| From | Cezary Tomczyk <cezary.tomczyk@gmail.com> |
|---|---|
| Date | 2014-12-11 11:08 -0800 |
| Message-ID | <43afda5d-d558-475d-bf46-4a9e69d99b8e@googlegroups.com> |
| In reply to | #26309 |
On 11.12.2014 03:16:20 UTC+1 user Christoph M. Becker wrote: [...] > However, there are some cases where the perfomance of jQuery is really > bad. These cases might not be relevant for the overall performance, but > nonetheless I won't call avoiding them micro-optimizations. See for > instance <http://jsperf.com/document-getelementbyid-vs-jquery/3>. > What's wrong with using document.getElementById()? There is nothing wrong with document.getElementById. However, if the whole application is already using jQuery and then you'll start "mixing" it with native JavaScript (in some places $(...) and in some places getElementById) then you might get feedback from others that you are breaking consistency of code. -- Cezary Tomczyk http://www.ctomczyk.pl/
[toc] | [prev] | [next] | [standalone]
| From | "Christoph M. Becker" <cmbecker69@arcor.de> |
|---|---|
| Date | 2014-12-11 22:52 +0100 |
| Message-ID | <m6d3lr$d2c$1@solani.org> |
| In reply to | #26314 |
Cezary Tomczyk wrote: > There is nothing wrong with document.getElementById. However, if the > whole application is already using jQuery and then you'll start > "mixing" it with native JavaScript (in some places $(...) and in some > places getElementById) then you might get feedback from others that > you are breaking consistency of code. Good point. However, sometimes you have to use native APIs, because jQuery doesn't offer wrappers for all of them, anyway. And, for instance, the official "How to Create a Basic Plugin" tutorial[1] says: | Notice also that we're not using the .attr() method to retrieve the | href attribute, because the native DOM API gives us easy access with | the aptly named href property. ... and it saves you a dollar. ;) [1] <http://learn.jquery.com/plugins/basic-plugin-creation> -- Christoph M. Becker
[toc] | [prev] | [next] | [standalone]
| From | Scott Sauyet <scott.sauyet@gmail.com> |
|---|---|
| Date | 2014-12-16 12:56 -0800 |
| Message-ID | <c0f09544-9c97-40dc-a0ce-815da0ef6099@googlegroups.com> |
| In reply to | #26271 |
Andrew Poulos wrote: > I've attended a number of interviews recently and everyone has > specifically asked about my level of ability with jquery (which > currently is next to zero). > > So the moral of the story is, if the hoi polloi have adopted it you > still need to learn things that experts have deemed crap. I think the moral is slightly different. My experience has been that one has to be able to elucidate clearly *why* it's crap, and to explain when and how one would choose to use it as opposed to its competitors and when to avoid them altogether. I've gotten several jobs and consulting gigs in large part by insulting the tools being used by those doing the hiring. Badmouthing jQuery has been a large part of that. But I have an advantage here, having used it fairly often and seen where it works well and where it falls on its face. And in insulting jQuery, I can also note that almost all of its competitors are quite bad as well. So it's not that you have to learn the crap; instead, you have to have to be able to back up the argument that it's crap. "Because David Mark says so," is not going to impress an interviewer. But if you can point to specific crap in an API or an implementation, if you can demonstrate experience with performance problems or code instability, if, in short, you actually can make the interviewer understand *why* its crap, then you can proceed happily. At least that's been my experience. -- Scott
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.javascript
csiph-web