Should I learn Xml and Javascript before learning

2019-06-23 01:33发布

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?

7条回答
虎瘦雄心在
2楼-- · 2019-06-23 02:05

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.

查看更多
冷血范
3楼-- · 2019-06-23 02:11

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.

查看更多
等我变得足够好
4楼-- · 2019-06-23 02:17

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.

查看更多
来,给爷笑一个
5楼-- · 2019-06-23 02:18

Yes, you should.

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

查看更多
Rolldiameter
6楼-- · 2019-06-23 02:25

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.

查看更多
兄弟一词,经得起流年.
7楼-- · 2019-06-23 02:27

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.

查看更多
登录 后发表回答