Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Dennis Castillo
Dennis Castillo
16,018 Points

Curiosity, AJAX???

what is AJAX and what is the use of this? what is good for? and what is the differences of AJAX and JQuery?

Thanks and God Bless....

2 Answers

Ruben Leija
Ruben Leija
4,051 Points

Ajax stands for Asynchronous Javascript And XML. Ajax is used to create fast and dynamic web pages.

Ajax allows web pages to be updated asynchronously by exchanging small amounts of data with the server behind the scenes. This means that it is possible to update parts of a web page, without reloading the whole page.

Ajax and is a jQuery function. In the end its all javascript; they have no difference;

Here is explanation : http://en.wikipedia.org/wiki/Ajax_(programming)

as you can see there - Ajax is not a single technology, but a group of technologies

Ajax is used for making request to server in background (without preloading page). As you know for example PHP is server side language - it means that it takes from client parameters and returns html.

Example: If you want to add some digits you have to run script


PHP gets two parameters and returns for example : <p>sum is: 32</p>

you can do this using link in your page or entering url directly in browser. But if you dont want to preload whole page to get result - you can post request in background - using AJAX.

Have you seen validation in forms while filling it? For example you gining you email addres and after you gave it - it shows "Email exist in database" - this is done by ajax request - javascript is making request in background while you are filling form and asking server if email exists.

jQuery is javascript library that helps js conding, making it easier. jQuery have built in AJAX mechanisms too to simplify it (there is a lot of cross browser complication that are soled in jQuery).

Dennis Castillo
Dennis Castillo
16,018 Points

ah okay, I think I understand what you're saying... so it seems you said AJAX is not a single technology, but a group of technologies. same principle with server side language but it is more advance... correct me if I'm wrong :)

and the jQuery is a framework for javascript?