Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

jQuery

Name: Anonymous 2010-02-17 21:26

Any good jQuery books you can suggest?

I was thinking going with jQuery in Action (manning).

Name: Anonymous 2010-02-17 21:37

SICP chapter 5 talks about jQuery.

Name: Anonymous 2010-02-17 22:01

You should go straight to the source and read John Resig's books. Although maybe they're not about jquery specifically, and more about javascript programming in general.

Name: Anonymous 2010-02-18 1:34

You should go straight to the source - literally. Assuming you already know javascript programming (why the fuck are you using jQuery then) - it is the closest thing to a formal specification you are going to get. Upon completion you should understand how inefficient and superfluous jQuery actually is and simply roll your own framework on demand. I recommend reading SICP concurrently to maintain pure of the sins committed by Resig et al.

Name: Anonymous 2010-02-19 10:40

>>why the fuck are you using jQuery then
>>roll your own framework on demand.

Internet toughguy nonsense. Real programmers want to get more work done with less effort. Contrary to what you're saying, if you know Javascript then you have a BETTER understanding of why this frameworks are necessary and a GREATER desire to use them. If you're not a very experienced and/or talented Javascript programmer then you compensate by chest-thumping and lashing out angrily

- Javascript is not implemented consistently across browsers. Sometimes the language itself, more often its treatment of the DOM. These libraries are an abstraction layer which smooth over the cross-browser problems

- All the frameworks (JQuery, Prototype, Mootols, Dojo, YUI, what the fuck ever) make the code simpler and let you be more productive. You're a clueless, inexperienced idiot if you don't see the advantage of $('something') rather than document.getElementById('something')

Name: Anonymous 2010-02-19 11:07

You know that he was trolling because jQuery is obviously one of the best javascript frameworks out there, if not the best. There's what, two global variables? No native object prototype overrides? Very clean. Chaining is a joy. The selector engine can take anything you throw at it. The way they handle browser inconsistencies by writing wrapper functions to replace missing or incorrect code (rather than browser sniffing and making assumptions about the code) is really smart. There's a reason John Resig writes books on cross-browser libraries -- he actually does know a thing or two

Name: Anonymous 2010-02-19 11:13

>>4
1.8/10*(revised troll scale).

Name: Anonymous 2010-02-19 12:46

>>3
This. If you already have a good understanding of JavaScript, jQuery sould be no big mystery to you. But if you fail to understand what's going on, read Resig's books on JavaScript (and not jQuery).

(function($){$(document).onload(function(e){alert("HAX MY ANUS");});})(jQuery); <-- this should make sense to you

Name: Anonymous 2010-02-19 12:48

>>8
Fuck! Shit! Fuck! I mean ready, not onload.

Name: Anonymous 2010-02-19 13:57

>>8
");});})(
Perl? Is that you?

Name: Anonymous 2010-02-19 14:15

Can someone explain to me what's with JavaScript people and putting code in one line and lacking indentation. Are they trying to save bandwidth? If that's the case, then it's terribly silly, that's what servier side compression is for. It also reminds me of how that "style" carries over to other languages like C. (an example is the one that I shall not name)

Name: Anonymous 2010-02-19 14:24

>>11
Easily copyable in the address bar without line breaks messing shit up also IHBT.

Name: Anonymous 2010-02-19 15:24

>>11
IIt encrytps your code. Can only be decoed with key.

Name: Anonymous 2010-02-19 18:30

>>5
Real programmers want to get more work done with less effort.
Javascript is not implemented consistently across browsers.

Do you know why there is no "jQuery" for C programmers? They face many of the same challenges supporting multiple platforms as Javascript "programmers" face supporting multiple browsers. The difference lies in the target audience.
No C programmer worth his salt will sacrifice the speed, sanctity, and control he has over his program to get some worthless extensions to the language; including among others noop()1, and isArray()2. Contrary to what you would have us believe, the real programmers aren't the ones who took a 10 minute course in using the internet at their community college and decided they could make it as a freelance web designer for their uncle and auntie. It's the people who are down in the machine, reading the specifications, understanding why implementors make the decisions they do who will make a difference in this world.

- If writing Javascript is so hard, why isn't jQuery written in Prototype? Then they wouldn't have to deal with browser inconsistencies and could focus on getting more work done with less effort. You're a clueless, inexperienced idiot if you don't see the advantage of document.getElementById('something') rather than $('something').

____________________________________
References:
1.http://api.jquery.com/jQuery.noop/
2.http://api.jquery.com/jQuery.isArray/

Name: Anonymous 2010-02-19 20:14

You're a clueless, inexperienced idiot if you don't see the advantage of document.getElementById('something') rather than $('something').
And vice versa.

Name: Anonymous 2010-02-19 23:55

>>14
IHBT. document.getElementById('something') is not the same as $('something'). jQuery has to write isArray because typeof(Array()) === 'Object'. There is no jQuery for C because th j in jQuery stands for Javascript. They are not the same language; not even close. The fact that you try to compare them shows that you don't know enough about perhaps either language; please do not repeat this behavior in the future.

Name: Anonymous 2010-02-20 0:49

ITTWHBTBATR1.8/10N

Name: Anonymous 2010-02-20 1:08

>>16
document.getElementById('something') is not the same as $('something')
I'm well aware of this. In fact, if you read the thread you will see that I was contrasting against the views of >>5-san. You and >>15 kind of proved my point in this regard.
jQuery has to write isArray because typeof(Array()) === 'Object'
Thanks jQuery genius. Let's not forget Object.prototype.toString.call([]) === "[object Array]". Again, you are kind of proving my point "oh noes, typeof(Array()) returns object, I will have to use jQuery because I am a professional web developer."
There is no jQuery for C because th j in jQuery stands for Javascript. They are not the same language; not even close. The fact that you try to compare them shows that you don't know enough about perhaps either language; please do not repeat this behavior in the future.
Thank you for giving me your well educated and well thought out opinion on the differences between C and Javascript. Let's completely ignore the fact I was drawing parallels in development pitfalls between them and never even came close to comparing language features.
Of course, I do commend you for pointing out that C and Javascript are different languages. I was completely unaware of this prior to your stating it was so and shall now sign up to the "HTML 2 Programming" course at my local community college so I can get more fascinating insights like this.

Name: Anonymous 2010-02-20 3:08

>>18
I'm well aware of this.
Then you recognize the comparison was fallacious and therefore irrelevant.
drawing parallels in development pitfalls
That's worse. You really think the types of problems one might face using a compiled strictly typed low-level language are at all similar to those found in an interpreted scripting language run in a web browser?

And another thing: jQuery isn't even an extension to the language (again, you seem to be unclear as what Javascript even is). jQuery is an library designed to access, control, and animate the DOM in a manner that is consistent among platforms. Are you really going to tell me that C programmers don't use libraries?

Name: Anonymous 2010-02-20 6:55

If your name is Pooey Dogs Bum you should become a veterenarian that specializes in removing the poo from a dogs bum. You would be Dr. Pooey Dogs Bum, the dogs bum doctor.

Name: Anonymous 2010-02-20 9:27

Hey guys, how about this: if you need to invent your own functions for determining whether something is an array, your language sucks ass.

Name: Anonymous 2010-02-20 10:19

>>21
I fucking hate when people say, "sucks ass" so kindly shut up.

Name: Anonymous 2010-02-21 0:02

>>19
Then you recognize the comparison was fallacious and therefore irrelevant.
I love your straw man. The original author forgot a #, I decided people would know what the intent was and decided to leave it rather than misquote him. The fact that this makes up for half of your entire argument is evidence of how pathetic you are. Clearly, leaving out the # makes it a very fallacious example and I am such a liar.
That's worse. You really think the types of problems one might face using a compiled strictly typed low-level language are at all similar to those found in an interpreted scripting language run in a web browser?
Are you fucking retarded? Did you completely miss the "development pitfalls" part? I don't give two flying cinnamon fucks what you think the differences are in C and Javascript. They both have cross platform (or cross browser) issues and if you are seriously trying to dispute this you need to just get the fuck out.
jQuery isn't even an extension to the language
jQuery isn't an extension to Javascript like C++ isn't an extension to C.
jQuery is an library designed to access, control, and animate the DOM in a manner that is consistent among platforms.
Yes, jQuery is a library that duplicates all of the functionality that is ALREADY IN THE LANGUAGE SPECIFICATION. That is not an library. It's plain and simple useless cruft. C programmers use libraries, what they don't do is download a "library" that simplifies preprocessing directives, for loops, and file manipulation, and then include the entire thing in every single C file they use.

Name: Anonymous 2010-02-21 0:54

>>23

I love your straw man.
What? There is no straw man. In fact, you are the only one that continues to throw personal insults, in particular toward developers using jQuery, but toward me as well. $() is a wrapper for the Sizzle selector engine. Furthermore (and this should be unnecessary for me to state, but I will for the sake of posterity), it does not return a DOM object, but a jQuery object, which allows you to chain calls to the jQuery API. Again, not at all the same as document.getElementById(). You've let this be a cornerstone to your argument that jQuery is needless and redundant, and yet your assertion is flat-out incorrect.


ALREADY IN THE LANGUAGE SPECIFICATION
Wrong again. Douglas Crawford has stated that the various DOM libraries demonstrate functionality that should be in the language specification, but is missing. He also speaks about innovations resulting from the varying development paths of the different browsers that should be included in the spec, and points to the difficulty in having W3C develop the API spec while ECMA develops the language spec1.


They both have cross platform (or cross browser) issues
Of completely different kinds. I think jQuery is a good solution to the cross-platform browser problem in Javascript.
You mention that C developers don't use libraries like jQuery, but then assert that this is not because the languages are different. This is a contradiction; the difference between the languages is absolutely a proper part of what you're trying to argue. The prototype model lends itself very well to lightweight object inheritance. jQuery is only 24k, less if you use gzip. That's less than a typical content-sized jpeg.


jQuery isn't an extension to Javascript like C++ isn't an extension to C.
jQuery is a Javascript library, to be included with other Javascript projects. C++ is a programming language with its own committee that is developed independently of C, that necessitates its own spec and compiler. This comparison is completely nonsensical.


jQuery is a reusable library that makes bugs easier to maintain and complicated dynamic DOM manipulation easier to execute. 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? jQuery code is easier to maintain. It brings down lines of code by a significant margin, and makes sometimes arcane javascript code more legible. Take your isArray(), for example -- which no one said you're required to use. Which one is more legible? if (jQuery.isArray(array)) { or if (Object.prototype.toString.call(array) === '[Object Array]) {'[/code]? Which one will compress better when run through a minifier? You've yet to make a concrete argument as to what it is precisely about jQuery that causes performance to suffer, whereas there are plenty of arguments as to what makes jQuery beneficial for developers.



___________________
References:

1. Javascript: The Good Parts, Google Tech Talk.
http://www.youtube.com/watch?v=hQVTIJBZook

Name: Anonymous 2010-02-21 10:31

I'd never think a jQuery troll could last so long.

Name: Anonymous 2010-02-21 16:21

>>25
But which one is the troll?

Name: Anonymous 2010-02-21 18:21

>>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.

Name: Anonymous 2010-02-21 18:41

>>27
Hi, I'm your friendly impartial judge, and I'm here to inform you that though your post did contain some interesting trolling points that might have been worth exploring further, you just lost by default in so many ways.

Name: Anonymous 2010-02-21 19:16

>>27
>You argue that jQuery is better, because someone can use $() to "chain calls to the jQuery API."
Never do I say that, nor were you able to correctly identify any circular reasoning. I have simply made the distinction that $() is not the same as document.getElementById(). I have done this time and time again, and yet you refuse to acknowledge or accept it. $() allows you to select much more than just the
id. Furthermore, it is curious that you would say that "simply stating jQuery is useful because you can use it to access the jQuery library" when you have already accepted that the DOM API is lacking functionality that jQuery provides.


No, I'm arguing there is a particular breed of programmers that use C.
A trolling favorite, the No True Scotsman. What about http://dis.4chan.org/read/prog/1266680903/, who is looking for a string library for C at this very moment? Is that person not of the same breed? In fact, APIs are very useful for programmers of any language.


That doesn't change the fact most of jQuery is duplicating the specification word for word using slightly different syntax.
First of all, it's not duplicating the spec in whole. It is simplifying some elements of the spec, consolidating others, and adding to it in still other ways. But you are ignoring the most important point: a big part of jQuery's goal is to make behaviors consistent across browsers. Unfortunately there are cases in which jQuery must correct, or even invent, behavior that some browsers have either improperly implemented or missed entirely. Or, looking more optimistically, jQuery provides functionality that old browsers don't support, or current browsers don't support yet (but are planning to).

Getting back to Doug Crawford, even he recommends adjusting for browsers the same way, by adding a simple function to the Object prototype called create(), which will mimic the new inheretence behavior in ECMAscript 3.1 (rather than using new, which is susceptible to error).


This is really the only reason for widespread DOM library adoption
Citation needed, please. I believe that the reason for widespread DOM library adoption is that it makes Javascript faster to write, easier to read, and more consistent across browsers and platforms; it affords programmers the opportunity to implement better features in shorter deadlines; and it raises the bar for what Javascript on the web could and should look like. I will cherish the day that libraries like jQuery are no longer needed, because the DOM API, in both spec and support, has improved to the point where one can write (without wrappers) with the same amount of concision and confidence that one achieves right now with jQuery. Until that day, the solution is ready and waiting at your disposal. You can choose not to use it: at your loss.

Name: Anonymous 2010-12-17 1:31

Are you GAY?
Are you a NIGGER?
Are you a GAY NIGGER?

If you answered "Yes" to all of the above questions, then GNAA (GAY NIGGER ASSOCIATION OF AMERICA) might be exactly what you've been looking for!

Name: Anonymous 2011-02-04 16:35


Don't change these.
Name: Email:
Entire Thread Thread List