开发者

Is it redundant to say: "JavaScript + AJAX"?

开发者 https://www.devze.com 2022-12-28 08:27 出处:网络
In a recent discussion I had, somebody told me that is incorrect to开发者_开发技巧 say that because Ajax is Javascript already.

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"?


AJAX = asynchronous JavaScript and XML

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


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.


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. ;)


Yes.

AJAX stands for Asynchronous Javascript And XML.


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

But you will probably get mocked...


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

AJAX = Asynchronous JavaScript and XML


"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!" ?


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..


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号