views:

347

answers:

11

Aside from the framework, is jQuery worth using rather than creating your own javascript? I've always debated if the framework was better to use than to create your own calls. Are their disadvantages of using it?

Sorry for beginner question, I'm trying to feel out if it would be better to use this and create some of the ajaxish workings of my site rather than develop it from scratch.

Are there other frameworks out there that would be better to use to create an ajaxish website?

+7  A: 

jQuery (and most other framework) are for making difficult things simple. It keeps you from having to write cross-browser compatabile code. It keeps you from having to write recursive methods to update multiple dom-elements. It basically cuts your development time down substantially, and saves you a lot of frustration.

Stackoverflow Archive:

Jonathan Sampson
+3  A: 

jQuery is a big project with many users. By that nature, it will be better tested than anything you write by yourself.

It is a great framework for most uses I've come to need.

Is there anything in particular you are trying to do?

Robert Rouse
+12  A: 

Yes, jQuery is worth it. I speak as someone who resisted using any library for a long time, then finally saw the light.

I do recommend that you build some hand-rolled Ajax interactions before you dive into using jQuery for Ajax, so that you understand exactly what is happening with Ajax. Once that's achieved, though, let the library do the dirty work.

chaos
True for me as well! I didn't like the idea of frameworks/libraries until I actually tried them.
alecwh
+5  A: 

If you like reinventing the wheel, write your own. For me, I prefer to spend my time focusing on solutions rather than lines and lines of javascript code. I'll use JQuery to save resources and frustration

Cody C
I'll also agree with chaos that it is important to understand the plumbing behind JQuery and rolling your own AJAX JS will do that. If you find a JQuery function that fits exactly what you need, take some time POST implementation to really dive deep into what it is doing.
Cody C
+3  A: 

jQuery helps you avoid worrying too much about cross-browser JavaScript issues, and helps you get things done quickly. As far as I'm concerned, the key reason for using it vs your own hand-rolled JavaScript probably is the "don't re-invent the wheel" cliché.

Dominic Rodger
+3  A: 

Apart from added productivity, JQuery's main plus is that it takes all (most) of the pain out of cross-browser testing.

Galwegian
+3  A: 

I would highly recommend using jQuery (or any comparable framework) over straight JavaScript. It just makes common programming tasks easier, most notably cross-browser development.

brian newman
+3  A: 

There is no reason you cannot write your own code and splash in JQuery where needed. JQuery is incredibly lightweight for what it provides and you will quickly find that you can do most takes easier in JQuery (especially once you start using the plugins for it) than by hand. I am a big believer in not reinventing the wheel. The JQuery code is tested by tons of people and there are so many plugins to chose from I could almost guarantee that what I want to do has already been done before.

If you are starting with a clean site, now is the perfect time to take JQuery for a spin though, because if you do get hooked on it your code will be more consistent if you solve similar tasks using the same technique. Go give it a try :)

Jim Petkus
+2  A: 

jquery makes js related work easier and more important standardised/compliant.

If you need re-assurance as to its use:

  • MS & Nokia are bundling it in their dev platforms.
  • Its compatible with many of the newest web technologies.
  • It has a large developer community supporting it.
  • There are many plug-ins available to aid RAD.
  • and more...

Give it a go!!

ForerMedia
+1  A: 

Definutly! Jquery wil save you a lot of time struggling over code and makes your code easier to read to non-experts.

codedude
+4  A: 

One thing I want to add is for the past couple of months, I was trying to fill a web developer position for my team, and it proved to be a difficult task.

Lots of folks knew how to use a JS framework (JQuery, ExtJS, YUI...), but once outside of the framework, they found themselves in an unfamiliar ground. I had a self-claimed senior JS developer with over 10 years of experience couldn't tell me how to use function.call() or function.apply() or how to implement simple inheritance in JavaScript.

Framework is great and definitely useful, but you will also want to make sure to know how to implement the basic OO concept and DOM manipulation without the framework.

BTW, we use ExtJS and if you are starting to pick a JS framework, you may want to look around to see which one suits you the most.

badallen