views:

183

answers:

11

In a recent discussion I had, somebody told me that is incorrect to say that because Ajax is Javascript already.

The contenxt:

"How do I blablablabal in a webpage so it doesn't have to do a page refresh"

My answer:

"Use JavaScript + Ajax"

EDIT

Ok, it is, so... how should I say it? "Use AJAX"? or "Use Javascript"?

+1  A: 

Yes, it is redundant.

UNLESS....... you can provide an example of AJAX that does NOT use JavaScript... but then maybe it shouldn't be called AJAX. ;)

FrustratedWithFormsDesigner
+5  A: 

AJAX = asynchronous JavaScript and XML

So, yea, AJAX has JavaScript as one of its building blocks.

DA
And the irony is that there ain't much XML in it any more, but I guess AJAJ doesn't make a nice acronym.
Dan Diplo
But AJAJ just runs off the tongue so smoothly
Justin Johnson
@Dan and good riddance to XML. Sometimes XML is useful and sometimes it's just not necessary.
extraneon
How about `JAAJ` JSON and Asynchronous Javascript ?
SeanJA
A: 

Well, I would agree that you can't really do Ajax without JavaScript...

AJAX = Asynchronous JavaScript and XML

Eric Eijkelenboom
+1  A: 

Yes.

AJAX stands for Asynchronous Javascript And XML.

Aistina
True, but lots of Ajax uses JSON instead of XML these days, so what it stands for isn't all that reliable :)
David Dorward
@David: Correct, but the Javascript certainly is still correct, and AJAX requests are made using XMLHttpRequest objects.
Aistina
Except those that are made by dynamically generating `<script>` elements, and those made with iframes, etc, etc.
David Dorward
A: 

"somebody" is right, javascript is ajax - but "javascript" can be very much, so saying you mean ajax would be right in this way... wy don't you just say "use ajax!" ?

oezi
Because I didn't knew it :P
OscarRyz
A: 

Ajax is a buzzword which means "Using JavaScript to make HTTP requests without leaving a webpage". So yes, it is redundant. There are contexts where "JavaScript, including Ajax" makes more sense then "Ajax", but "JavaScript + Ajax" is somewhat silly.

In this context though, I would say:

"Use Ajax, here is a link to a guide that explains what it is and how to use it"

or I'd explain what it is there and then. Don't just throw the buzzword out there.

David Dorward
I'd be happy to call it an asynchronous request simply, but fortunately as the nature of things goes, historical naming reasons have little impact on contemporary understanding or usage, like why does February have 28/29 days.
Anurag
Because a year is 365.242199 days.
Justin Johnson
@Justin, Thanks for the tip, but the point was why not March or any other month for that reason. The reasons actually have a long political history.
Anurag
A: 

Most likely simply stating "ajax" to someone who is asking this question will just confuse them further. If they know about ajax then they know, it is a technique used to "blablablabal in a webpage so it doesn't have to do a page refresh".

In a forum post or similar, simply stating "ajax" would be sufficient if you wanted to be as terse as possible. I'd expect someone reading to simply google "Ajax" and find out about it.

However, if you want to be more helpful, then perhaps a slightly more lengthy answer is in order..

JohnFly
+3  A: 

In this context, I think that it is redundant because you're specifically talking about how to get data onto the page without a full request. If you were talking about how you implemented your interface, including many behaviors that aren't strictly making requests, then I would say no. You'd simply be making a distinction between using javascript alone for some things and AJAX (including javascript) for dynamically updating the page with data from the server. It wouldn't be correct to say, for example, that you used AJAX to do some page animations if you never make an asynchronous request -- so they are not interchangeable. It should be sufficient, though, in the context of retrieving data via AJAX that it involves javascript. In that context it doesn't need to be stated.

tvanfosson
+1 for actually thinking and not just stating the obvious.
nikc
A: 

Not technically redundant - in IE you can do ajax with vbscript (AVAX?).

But you will probably get mocked...

Ray
A: 

Well, saying "Use JavaScript" implies only the use of JavaScript and saying "Use AJAX" implies, well, using AJAX. AJAX is more of an extension to JavaScript that allows for HTTP requests, so if you really think about it, it's more of like a program you would install to add functionality, except it's already installed with JavaScript, like Notepad comes with Windows. By saying "Use Windows", you are not implying to use Notepad as well, but by saying "Use Notepad" you are indirectly implying to use Windows since that is a program on Windows.

animuson
A: 

AJAX has taken on its own meaning beyond its original acronym. You can do AJAX without javascript, without xml, and you don't even have to use asynchronous coding (although you probably should). People will still be calling it AJAX when we're using web sockets and when all browsers support the freaky new programming language beyond functional programming that makes multithreaded programming easy and intuitive in 2050.

Think of "ajax" as meaning "dynamic web stuff with communication between web page and server"--that's how it's used nowadays. To specify you're using javascript to achieve it is not redundant in that interpretation.

Plynx