>>24
it does not return a DOM object, but a jQuery object
Very clever
/prog/lodyte, very clever. You have obfuscated the fallacies in your argument by creating a framework of circular reasoning, laid as a foundation for all of your further points. You argue that jQuery is better, because someone can use $() to "chain calls to the jQuery API." In the same vein, I could argue jQuery is unnecessary on the basis that document.getElementById() returns a DOM object that you can use to make calls to the Javascript API. In fact- I need not as it wouldn't matter; jQuery shoulders the burden of proving it is useful and perhaps necessary. Simply stating jQuery is useful because you can use it to access the jQuery library isn't doing anything for me.
Douglas Crawford has stated that the various DOM libraries demonstrate functionality that should be in the language specification
Some specific functions, yes, it's hard to argue against that. Every language has this problem. That doesn't change the fact most of jQuery is duplicating the specification word for word using slightly different syntax. From the API we have: selectors, attributes, traversing, manipulation, css, events, effects, ajax, utilities. Only Ajax, effects, and events differ from the specification more than a grain of salt; and neither the jQuery event additions nor effects warrant inclusion in the standard.
This is a contradiction; the difference between the languages is absolutely a proper part of what you're trying to argue.
No, I'm arguing there is a particular breed of programmers that use C, and none of them would consider using a cQuery that simplified string processing, namespaces, or memory management. Javascript has issues in that a lot of people using it don't know what they are doing, how the specification works or really have a clue. They can write
<?php echo "I'm going to hax your anus ".$_SERVER["REMOTE_ADDR"]."."; ?> easily enough and being able to write
$(document).ready(function() { $("#hax").fadeIn(); } is very appealing to them. This is really the only reason for widespread DOM library adoption, and in that regard I commend jQuery and others for filling a niche. I will not however; accept that because of this jQuery is a useful or necessary library.
Do you suggest that developers should be rewriting their own animation code every time they want to make something fade in and out, and add extra time to their production schedule to test for cross-browser consistency?
No, I'm suggesting they actually learn the language they are using and write their own fadeIn or fadeOut function if they need it, once. They could share said function on the internet, and other developers could use it if they see fit; much like any other programming language. I don't know why you tacked on the part about testing for cross-browser consistency; maybe you have never actually developed a website or web application before but this is clearly nonsensical and I'm not even going to point out why.
Take your isArray(), for example -- which no one said you're required to use.
A library which you use, but don't use at the same time. Interesting idea.
Which one will compress better when run through a minifier?
This is absolutely ridiculous. Notwithstanding my example actually WOULD compress better through a minifier (in-fact jQuery probably uses the same kind of thing for their isArray function) I'm also not including AN ENTIRE LIBRARY with my function.
You've yet to make a concrete argument as to what it is precisely about jQuery that causes performance to suffer
The fact they can achieve a "2X speedup" in one release cycle says it all. There is a reason V8 is being developed, tracemonkey is being developed. Libraries like jQuery set the standard very low and browser developers understand they need to make their own performance improvements to accommodate. In some sense, you are right. There isn't a performance problem (in most cases). There is a quality degradation problem and a very large downward spiral going on thanks in no small part to jQuery and friends.
whereas there are plenty of arguments as to what makes jQuery beneficial for developers.
Name them? I will concede the AJAX library is beneficial but anyone can write their own in a matter of hours and never need to worry about it again. I fail to see what it is that makes jQuery beneficial.