views:

370

answers:

7

A) Since Ajax is based on Javascript and Xml …should I learn Xml and Javascript before trying to learn Ajax?

B) Even if knowing Javascript and Xml is not a must … will I be able to understand and use Ajax more efficiently if I know Javascript and Xml?

+1  A: 

AJAX is not a separate language. If you use AJAX, you use JavaScript and XML, so by learning how to use AJAX, you will be learning JavaScript and XML. That said, it's probably a good idea to have a grasp of the syntax of JavaScript and the purpose, strengths, and weaknesses of XML before working with AJAX.

Thomas Owens
A: 

Yes, you should.

AJAX is utilizes both of those those technologies, and you'll be severely hampered if you don't understand them.

Randolpho
AJAX doesn't utilize both technologies...it IS both those technologies.
Thomas Owens
Excellent point. :)
Randolpho
+13  A: 

Learn javascript, but in my opinion it is best to use json for data transfer and not xml. This does depend on the technology you are using server side to handle requests.

Update: Also, look into jQuery. There are a lot of examples out on the web, and it makes cross browser javascript significantly easier.

Jerry
+3  A: 

The "XML" part of AJAX isn't strictly XML--very often it's JSON or HTML.

You will not be able to really use AJAX without knowing at least some JavaScript. I'd start with some basic JavaScript, maybe write a rudimentary AJAX library for yourself. Once you've written a very basic AJAX library, ditch it and use jQuery (or MooTools or Prototype) instead.

mgroves
+3  A: 

XML is not a requirement. You can use XML, JSON, HTML or even plain text as the media. However, javascript knowledge is required to implement AJAX and use it correctly.

It is also good if you learn one of the javascript libraries (jQuery, dojo, Prototype etc) that will simplify a lot of things in doing AJAX.

Chetan Sastry
A: 

AJAX == Asynchronous Javascript And XML, so yeah, you have to learn both things.

Of course, as some have noted, you can use HTML or JSON instead of XML. But then you could call it AJAJ or AJAH. Not very marketable ;)

You should first learn what XML is, what it is used for. As its just a file format, its the fastest to get enough functional knowledge of.

Then, learn plain Javascript. Learn to make an XMLHTTPRequest. Only jump into a JS framework to simplify AJAX calls and abstract browsers differences once you know what they do behind the curtains.

Once you've done all this, learn json and decide if it is for you.

voyager
Ajax as a term has been used as a general term to just mean asynchronous JS requests for some time now.
mgroves
Either you use XML or not for AJAX, you still need to learn Javascript and, I'd argue, XML, as its the most used format [citation needed] for AJAX, and has some features that, once learned, you understand better JSON too.
voyager
+2  A: 

I think that having a general fundamental understanding of what AJAX is and what it is not, it far more important than knowing the ins and outs of Javascript and XML.

To learn more about AJAX, click here...

Rather than digging up details of XML and Javascript, you'd be better off to identify what the industry has deemed to be best practices for doing certain things.

RSolberg
"Rather than digging up details of XML and Javascript, you'd be better off to identify what the industry has deemed to be best practices for doing certain things." Could you elaborate on that?
SourceC
@SourceC: It is probably easier to learn the technology by starting with how to utilize it within commonly accepted practices or best practices. For example, in ASP.NET you can utilize the UpdatePanel or you can create AJAX functionality using jQuery and JSON data. I think your type would be better spent to know the pros and cons in this area, which will help you form an understanding of the underlying technology. Let the best practice and pros/cons lead you to knowledge of the technologies...
RSolberg
thank you all for your help cheers
SourceC
In my previous comment, replace "think your type" with "think your time"...
RSolberg