0

Its kinda difficult to get into Web development. I've been working on winforms for the last 5 years. So i'm struggling to switch from the one to the other. Some time ago, I worked with JavaScript, but no-a-days there are tons of JavaScript libraries - JQuery, JSON, MooTools...

My Question:

Perhaps this is a stupid question. What are the diff. between all there libraries? Can I work with only one of them? If i'm using JQuery, will I need JSON? Basically, is there a right tool for certain jobs?

Thanks

PhiLho
  • 40,535
  • 6
  • 96
  • 134
Morph
  • 299
  • 1
  • 4
  • 11
  • 9
    JSON is not a library - it is a format which can for example be used as an alternative for XML for communicating between your AJAX webapp and the server. See http://json.org/ – Jesper Oct 09 '09 at 07:47
  • Also see this question: http://stackoverflow.com/questions/35050/comparison-of-javascript-libraries – Jesper Oct 09 '09 at 08:12

4 Answers4

2

You can use any library independently.

JSON (JavaScript Object Notation) is a lightweight data-interchange format.

and jQuery supports some builtin methods for dealing with JSON data.

The main advantage ( which I think ) of using jQuery is that it has a large user base and has plenty of plugins.

rahul
  • 184,426
  • 49
  • 232
  • 263
1

Personally I use jQuery but rather oddly, to my mind, it does not have good JSON support - lacking a stringify function for example. However you can fill the gap at JSON.org.

Whichever library you end up using it is a good idea to pull it from a free CDN such as Google's AJAX CDN or Microsoft's AJAX CDN.

Andrew
  • 6,231
  • 2
  • 29
  • 37
0

It really depends on what you want from a JavaScript framework/library as to which one is best for you. Although there are plenty of similarities between them, I think they embrace different philosophies, and it really depends on which philosophy fits you best as to which one you should go with.

I'd definitely recommend reading jQuery and MooTools, an article by Aaron Newton (a MooTools developer) discussing the differences between these two frameworks and why he prefers MooTools.

Also, as others have noted, JSON isn't a library—it's a data format. json2.js is a library, but only for encoding/decoding the JSON format. Most JavaScript libraries like jQuery, MooTools, etc. contain their own JSON encoding/decoding functions.

Steve Harrison
  • 121,227
  • 16
  • 87
  • 72
0

You can choose the library you like, but jQuery seems to be more popular than others and is my personal favorite too. Check out the why does everyone like jquery more than other libraries question.

As the others pointed out, JSON is not a library.

Community
  • 1
  • 1
Tim Büthe
  • 62,884
  • 17
  • 92
  • 129