views:

3105

answers:

11

As someone who is only barely proficient in javascript, is jQuery right for me? Is there a better library to use? I've seen lots of posts related to jQuery and it seems to be the most effective way to incorporate javascript into ASP.NET applications.

I've been out to jQuery's site and have found the tutorials and other helpful information. Any other reference material (i.e books, blogs, etc.) would be helpful.

Thanks!

+11  A: 

Pros: you don't have to deal with the tangled mess that is cross-platform Javascript compatibility. You don't have to worry about which browsers support standard event handlers and which have their own event systems. You don't have to write two hundred lines of DOM manipulation withHugeLongFunctionNamesFromHell to get nice dynamic pages.

Cons: It's an extra 15KB of code your users have to download the first time they load your page.

John Millikin
I think It's 55 KBs even in minified form.
Cyril Gupta
jQuery 1.3 is 18kb
Paolo Bergantino
+19  A: 

The great thing about libraries like jQuery and Prototype is that they take care of a lot of the cross-browser kwirks that can make Javascript such a pain to write. Either one of those or maybe even mootools will be good to you, their respective websites being about as good as a resource as it's gonna get.

edit: as far as the 'con' of having extra loading size on your page, I suggest using Google to host these for you. Optimistically, some people will have it cached from other websites, plus Google takes care of versions/compression for you.

Paolo Bergantino
Mootools is definitely another good option
jmein
I mislike using Google for hosting, because from time to time their AJAX host has been unavailable for minutes to an hour. Better to keep it on your own server, at least then if it breaks you can fix it.
John Millikin
One distinct advantage to letting Google host the script is that your visitors won't have to reload it if they have been to another site that referenced the Google source. The source would already be in their cache.
Dscoduc
A way to fix the google issue when unavailable is to check it and when down load your own local version.
RJD22
+2  A: 

The biggest thing that I've found helpful in learning jQuery is other people's plugins. I'd find some stuff that you like, and read the plugin code. You may find some pretty cool stuff to learn.

Wes P
+3  A: 

I just started using jQuery as well, and have found it to be very helpful. For me, the biggest advantage is having some really nice intellisense in VS for it, and not having to look up every archaic method in the world to accomplish simple tasks. To me, it just seems a lot better organized than plain old javascript, and like someone else said, it has a ton of good built in libraries.

Sam Schutte
+1  A: 

Pros: Write less, do more.

Cons: You have to learn it ( only VS gets the intellisense, not the brain [:)] )

If you are interested in jQuery here is a good Review of jQuery Books by Rick Strahl

naveen
I think that with the quality of their documentation, the cons of "having to learn it" are minimal.
nickf
+6  A: 

Pros: jQuery is a great library which lets you get what you want done in much much much less code, with a lot less hassle. The plugin architecture is incredibly simple, and the community producing plugins is very strong and active. If you can think "wouldn't it be nice if I could..." then chances are there's a plugin for it.

Cons: You are being abstracted away from the raw Javascript. Don't underestimate the effect of this "con". Though working in vanilla JS (that is, javascript without libraries), can be a massive pain, it gives you a much better understanding of what you're actually doing. You might find that your jQuery based solutions could actually be done in vanilla JS with a lot less overhead.

nickf
I'd agree with your 2nd point for "someone who is only barely proficient in javascript" until he gets a good handle on the concepts, then use more jQuery. BTW, by "a lot less overhead" do you mean less of his _code_ or less _execution_ overhead?
NVRAM
less execution overhead. I can't think of any situation where jQuery is more verbose than plain javascript.
nickf
+2  A: 

While just beginning to learn JavaScript I looked at the various libraries with amazement. Then I looked more closely at jQuery and was hooked. No longer will I work with DOM without loading jQuery. Not just for websites, jQuery brings powerful utilities, reduced code, and simple handling of local administrator JavaScripts.

Local JavaScripts + jQuery + msHta = awesome interface driven scripts!

For more information about using jQuery on local administrator scripts check out my posts about using jQuery and HTA's...

Chris

Dscoduc
A: 

Jquery is also the first javascript framework I used as well. I find the syntax rather use to pick up and the library of plugin and the support from it user very helpful in picking up this language. Although eventually I still continue to borrow books on javascript, I felt jquery is perhaps a good way to show the power of javascript.

A: 

If you are only looking for javascript tool that is browser compatible and quite small in size to do DOM manipulation and ajax, then jQuery might be the one you are looking for.

But jQuery is lack in these two areas:

  1. Fullblown widgets (Think of extjs). Note: jQuery-UI is not as complete and quite slow.
  2. Object oriented support (Mootools).
jpartogi
A: 

Adobe TV has some cool video tutorials and seminars for jQuery it gave me a basic understanding in a short space of time.

Rachel
A: 

Pros: Cross browser, User friendly function names.

  Many plug-Ins.

  Only 15KB on the client Side.

  Community is pretty huge to guide you.

  Easy to work with Services(.svc,asmx) etc. I believe it is wonderful.

Cons: You may forget Java Scripting

So, I suggest for beginners, learn Java Scripting first and pull your socks for JQuery.

Naresh