SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    whagwan? silver trophybronze trophy akritic's Avatar
    Join Date
    Nov 2006
    Posts
    2,780
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)

    AJAX is Javascript??

    Can comebody tell me what AJAX actually consists of?

    Is it mainly Javascript ( i dont know any of that language yet tho- just starting with XHTML & CSS )

    If it's not <em>all</em> Javascript, then what else is it?

    thanks for any help on this, but as SP doesn't have an AJAX thread of it's
    own, I was wondering..

    Cheers,

    Andy

    p.s please feel free to wax lyrical about either Javascript/AJAX or anything,
    as all replies will be read.

  2. #2
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ajax means "asynchronous javascript XMLHttpRequest", which is an advanced javascript technique.

    It allows you to change small bits of information on a page without reloading the whole page, for instance updating a stock ticker. The stock price will change but the page won't have to reload everytime a new stock price is added to the page. If you go here:

    http://finance.yahoo.com/

    wait until the page fully loads, and then watch the stock prices, they will magically change(if the stock market is open and you click on "streaming quotes--on").
    Last edited by 7stud; Jan 22, 2007 at 14:44.

  3. #3
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,789
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    There is some disagreement as to whether AJaX is an acronym for "Asynchronous Javascript and XML" or whether it is just a word. The person who "invented" the term claims that it is just a word and that the individual letters don't specifically stand for anything.

    Ajax consists of two or three component parts.

    Part one is the part that runs in the web browser and is always written in Javascript (the J in Ajax).

    Part two is thhe data being retrieved from the server. This can be XML, JSON, plain text, or any proprietary format you choose. The original concept was that XML would be used (the X in Ajax).

    The third optional part is a server side language of your choice to build the data to be retrieved if it isn't statically stored on the server. As any server side language can be used (or none if the data to be retrieved is static).

    Most calls done to retrieve information like this run Asynchronously which means that the web page doesn't lock up while waiting for a response from the server. While you could use Ajax to run synchronous requests it sort of defeats the purpose somewhat as it makes your visitor wait while the new data downloads just the same as if it were done via any other non-Ajax method.

    Also there are a couple of other techniques for retrieving data asynshronously from the server which don't use the XMLHttpRequest object. Whether these are also considered to be Ajax or not depends on who you talk to. Some of the books I have on Ajax also cover these other methods while other books on Ajax concentrate on XMLHttpRequest (and the activeX equivalent that IE4,5,and 6 use).

    Overall Ajax is a rather old technology that has just become popular recently after being given a new name. Support for calls to the server to retrieve info without updating the page dates back to the introduction of version 4 browsers (IE4 and Netscape 4) nearly 10 years ago (Netscape 4 supports one of the other methods that doesn't use XMLHttpRequest).
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  4. #4
    whagwan? silver trophybronze trophy akritic's Avatar
    Join Date
    Nov 2006
    Posts
    2,780
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    thanks guys.. your explainations were a great help...and starting point for
    some other study.. i think it always helps to have someone explain the bare
    bones...gives you something to pick at

  5. #5
    SitePoint Enthusiast Nick Karpov's Avatar
    Join Date
    Jan 2007
    Location
    Toronto Ontario
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm starting to read more and more about AJAX in my quest to be able to utilize this technology. Thanks for the posts, they were a great help!

  6. #6
    Web Genius
    Join Date
    Nov 2001
    Location
    Canada
    Posts
    708
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have also been reading up on AJAX and I see there are a few different frameworks available to use to interact with PHP and retrieving data from the server. Which one is more popular?

  7. #7
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,426
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    Wikipedia: ajax

  8. #8
    SitePoint Addict
    Join Date
    Apr 2001
    Location
    Devon, UK
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That was a brilliant summary from felgall. I think most AJAX confusion comes from marketing people who tend to use it to describe any web system (like the term 'web service' was used a few years ago.)

    AJAX is not a technology. It's set of technologies that describe a concept: obtaining data from a web server without refreshing the loaded page. JavaScript is used to handle the server communication and the message is encoded in XML.

    There are other ways of communicating and encoding the message. These probably shouldn't be called 'AJAX', but it's a buzzword that everyone knows.

    So, what do you do once you have some data? You change the page, e.g. update a table, show a response, etc. A few years ago, this would have been referred to as Dynamic HTML (or DHTML), but 'DOM scripting' is more preferable today. But, again, many people refer to it as AJAX although it's not!

    There are many frameworks that support AJAX and DOM scripting, but they can be just as complex and they have their own issues. It's certainly worth learning JavaScript and trying for yourself.

  9. #9
    SitePoint Enthusiast
    Join Date
    Nov 2006
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This was in the website review section, may well be able to give you soome insight

    http://www.ajaxlines.com
    Cirrus - The leading Digital Legacy Service Provider


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
  •