Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I learn Xml and Javascript before learning Ajax?

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?

like image 605
SourceC Avatar asked Sep 16 '09 18:09

SourceC


3 Answers

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.

like image 196
Jerry Avatar answered Oct 04 '22 04:10

Jerry


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.

like image 33
Matthew Groves Avatar answered Oct 04 '22 03:10

Matthew Groves


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.

like image 36
Chetan S Avatar answered Oct 04 '22 02:10

Chetan S