Author Topic: A Primer on AJAX, jQuery, and JSON  (Read 1540 times)

Offline JGadrow

  • Level 35
  • **
  • Posts: 1,133
  • Reputation: +23/-2
    • View Profile
A Primer on AJAX, jQuery, and JSON
« on: September 23, 2009, 02:27:46 PM »
Because I've noticed quite a bit of confusion on what exactly each of these technologies accomplishes (AJAX, jQuery, and JSON), I decided to create a post quickly identifying what each technology "does." Afterwards, I provide links to descriptive pages for each on wikipedia for those who want further information.

Asynchronus JavaScript And XML (AJAX) creates a separate server request for updating a portion of the browser window without requiring the user to refresh the page.

jQuery is a JavaScript library that, largely, focuses on retrieving or interacting with DOM elements.

JavaScript Object Notation (JSON) is a data format similar to XML, HTML, or any other data format that you can think of. It's not truly a 'technology' in and of itself, but a method of exchanging data between systems.

Thus, you would use jQuery to retrieve a particular segment of your page (maybe a rotating advertisemet banner) so that you could store it in a variable. You would use AJAX to make a server request for the next advertisement and the object would be returned to your script in JSON format.

I hope this helps to clarify the role of each of these technologies in your web project.

And here's the wiki links:
AJAX wiki
jQuery wiki
JSON wiki
Idiocy - Never underestimate the power of stupid people in large groups.


Offline codestryke

  • Administrator
  • Level 33
  • *****
  • Posts: 589
  • Reputation: +22/-0
    • View Profile
    • eXtremeCast Games
Re: A Primer on AJAX, jQuery, and JSON
« Reply #1 on: September 24, 2009, 12:00:59 AM »
Very nice write up.

I would like to add that jQuery isn't the only JavaScript library on the block. There are many other libraries out there like Prototype, YUI, ExtJS, DOJO and countless others. So you may see names like those get throw around like jQuery but in the end it's just another JavaScript library.



Creating online addictions, one game at a time:

Offline JGadrow

  • Level 35
  • **
  • Posts: 1,133
  • Reputation: +23/-2
    • View Profile
Re: A Primer on AJAX, jQuery, and JSON
« Reply #2 on: September 24, 2009, 08:45:28 AM »
Thanks and I agree, there are many libraries out there. However I think these technologies are the ones I encounter as being most commonly confused. Even my own boss didn't know the differences! lol

I think part of the confusion comes from the fact that jQuery has functions that utilize AJAX so people just think that jQuery itself is the technology making the request. An, of course, since JSON is a data format available to AJAX it's easy to see where the confusion comes in there. lol
Idiocy - Never underestimate the power of stupid people in large groups.


 


SimplePortal 2.3.3 © 2008-2010, SimplePortal