创建网站宝典英文文献翻译
创建网站
Ajax
Ajax is short for ‘‘Asynchronous JavaScript and XML.’’ It is cross-platform. It is effectively open source. It is supported by these versions of the major browsers:
■ Internet Explorer 5.0 and up
■ Netscape 7 and up
■ Firefox, Opera 8+
■ Safari 1.2 a nd up
Although it would be a stretch to call Ajax a new technology, and it is certainly not a programming language, it is an adaptive implementation of preexisting tools to provide an integrated, efficient new tool that can be used to make better, faster, more versatile Web applications.
As you may know, Ajax, which is a mix or reformulation of existing technologies, facilitates server interaction with elements of a Web page. This, in turn, results in a more responsive application with lower bandwidth usage, and, hence, lower costs, resulting in a win-win situation for all concerned. It is also these features that make it attractive to the so-called Web 2.0 crowd and, those who are involved in software design and development for mobile handheld devices.
Following are the major components of Ajax:
■ JavaScript as the scripting language to call functions
■ XMLHttpRequest is used for asynchronous data transfer from a server
■XHTML and Cascading Style Sheets (CSS) are used for uniform encoding and
presentation cross-platform
■ Document Object Model (DOM) is used for precise mapping and data display
■ XML and XSLT (although, ironically, does not require use of XML for data fetch and
transfer)
Ajax provides that slight margin of advantage to get ahead of the competition. But you must know when to use it, and then use it judiciously. Y ou would tend to defeat one of its appealing features — fast, efficient downloads of small segments of data —if you repeatedly called for updates or refreshes of information. Y ou would constantly be tying up system resources with repeated calls for new data, which may not be new at all (or necessary). Would you, for example, find it necessary to refresh the temperature field every 3 seconds on a weather page? It could be better done where a refresh of that field is only done when the new temperature does not equal the old temperature.
Async (asynchronous) just means that requests and data may be exchanged across the Internet from the client Web page to the server and back at any time. The JavaScript object used to do this is called XMLHttpRequest. However, there is no requirement that the asynchronous content be formatted in XML.


