SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Evangelist fs_tigre's Avatar
    Join Date
    Feb 2009
    Location
    Close to Chicago, Illinois
    Posts
    517
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Confused about what AJAX is

    Hi,

    This is probably a stu:;@$t question or something I should know by now but I dont, sorry.

    What is AJAX?

    I thought AJAX was some sort of mix of JavaScript and XML but after looking at the article below I started wondering if pure JavaScript or jQuery could be considere Ajax?

    http://css-tricks.com/ajax-load-container-contents/

    Can someone explain this a little?

    Thanks
    Thank you very much!!!

  2. #2
    Utopia, Inc. silver trophy
    ScallioXTX's Avatar
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    9,070
    Mentioned
    153 Post(s)
    Tagged
    2 Thread(s)
    In it's essence AJAX is a technique javascript uses to download and process information from a web server without needing to refresh the page.

    jQuery has methods to use AJAX, but jQuery can by no means be considered to be the same as AJAX (apples and oranges).
    Rémon - Hosting Advisor

    SitePoint forums will switch to Discourse soon! Make sure you're ready for it!

    Minimal Bookmarks Tree
    My Google Chrome extension: browsing bookmarks made easy

  3. #3
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,702
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by fs_tigre View Post
    What is AJAX?
    AJAX is an answer to a problem faced with standard web pages.

    What is that problem? It's where actions that you perform on a web page cause the entire page to unload, and a new page to be loaded. When you click a link you are taken to a new page. When you submit a form you are taken to either a new page, or a completely new version of the same page.

    The problem is that the existing page contents cannot remain, while information is communicated in the background, or content is transferred so that you can perform an update to only a small part of the page.

    • Aysynchronous means you can send data or make requests from the server without needing to reload the entire page
    • Javascript is the language that you use to perform those data requests
    • And that data is commonly transferred as JSON or
    • XML data


    It is the technique of using that asynchronous communication which makes up fundamental core of what AJAX is.

    A resource that has proven to be very useful when writing your own AJAX code is the Bulletproof Ajax book, which also provides code and working examples.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  4. #4
    SitePoint Evangelist fs_tigre's Avatar
    Join Date
    Feb 2009
    Location
    Close to Chicago, Illinois
    Posts
    517
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you both for the good explanation!

    So this means that AJAX uses some sort of a middle program to comunicate between the server, XML and JavaScript?
    Thank you very much!!!

  5. #5
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,702
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by fs_tigre View Post
    So this means that AJAX uses some sort of a middle program to comunicate between the server, XML and JavaScript?
    Only javascript is used as the communicating program. The data that is sent back and forth is only a string, so you can use XML, or JSON, or HTML, or plain text, each one depending on the intended use.

    JSON is becoming the more popular communication format now for data structures, due to its the ease of use, and relatively small size compared to XML.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  6. #6
    SitePoint Evangelist fs_tigre's Avatar
    Join Date
    Feb 2009
    Location
    Close to Chicago, Illinois
    Posts
    517
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Starting to make sense, thanks a lot!
    Thank you very much!!!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •