英语翻译How does AJAX work?When an application uses AJAX,a new layer is added to the communication model.Inthe classic web application,communication between the client (the browser) and the webserver were performed directly,using HTTP requests.Ti

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/29 04:50:23

英语翻译How does AJAX work?When an application uses AJAX,a new layer is added to the communication model.Inthe classic web application,communication between the client (the browser) and the webserver were performed directly,using HTTP requests.Ti
英语翻译
How does AJAX work?
When an application uses AJAX,a new layer is added to the communication model.In
the classic web application,communication between the client (the browser) and the web
server were performed directly,using HTTP requests.
Tip:HTTP is the acronym for HyperText Transfer Protocol,the communication protocol
used throughout the Internet.
When the visitor requests a page,the server will send the full HTML and CSS code at
once.After the visitor fills in a form and submits it,the server processes the information
and rebuilds the page.It then sends the full page back to the client.And so on.
When using AJAX,the page is loaded entirely only once,the first time it is requested.
Besides the HTML and CSS code that make up the page,some JavaScript files are also
downloaded:the AJAX engine.All requests for data to the sever will then be sent as
JavaScript calls to this engine.The AJAX engine then requests information from the web
server asynchronously.Thus,only small page bits are requested and sent to the browser,
as they are needed by the user.The engine then displays the information without
reloading the entire page.This leads to a much more responsive interface,because only
the necessary information is passed between the client and server,not the whole page.
This produces the feeling that information is displayed immediately,which brings web
applications closer to their desktop relatives.
To better illustrate the communication between the client (browser) and the remote
server,as well as the differences between the classic and the AJAX-powered
applications,take a look at the diagram below:
At the heart of the AJAX method of communicating with the server lies the AJAX
engine.This is nothing more than some JavaScript code that instantiates and uses the
XMLHttpRequest object.This is a JavaScript object that allows sending,receiving and
processing HTTP requests to and from the server without refreshing the entire page.
In AJAX-powered applications,HTTP requests for data can be made completely in the
background,without the user experiencing any interruptions.This means the user can
continue working and using the application,while the necessary page sections are
received from the server.The XMLHttpRequest object was implemented as an ActiveX
object in Internet Explorer,and has later become a native JavaScript object in most
modern browsers (FireFox,Safari).
Although adding an extra layer to any kind of model should add to the response time,this
is an exception.Through the use of this new layer – the AJAX engine – response time
shortens and the user interface seems much more connected to the application logic.
Moreover,the user no longer has to wait around for the page to load.
If you want to get a grip on AJAX development and learn to manipulate the
XMLHttpRequest object,check out this tutorial from the Mouse Whisperer website.
1楼的好强好快……
如能将该系列4篇全部翻译,必将高分重谢:

英语翻译How does AJAX work?When an application uses AJAX,a new layer is added to the communication model.Inthe classic web application,communication between the client (the browser) and the webserver were performed directly,using HTTP requests.Ti
AJAX技术是如何工作的?
当一个应用程序使用AJAX技术,一个新层添加到通信模型.在
典型的Web应用程序,沟通客户端(浏览器)和Web
服务器进行直接使用HTTP请求.
提示:HTTP是缩写超文本传输协议,通信协议
使用整个互联网.
当请求网页时,服务器会发送完整的HTML和CSS代码
一次.参观后,填写表格并提交,服务器进程的信息
和重建网页.然后它发送整页回客户端.等等.
当使用AJAX ,网页加载完全只有一次,第一次请求.
此外,HTML和CSS代码,弥补了网页上,一些JavaScript文件也
下载:在AJAX引擎.所有这些请求数据的服务器然后将发送
JavaScript的呼吁这个引擎.AJAX引擎的请求信息,然后从Web
服务器异步.因此,只有小一页位要求和发送到浏览器,
因为他们所需要的用户.发动机然后显示信息
重新加载整个页面.这就导致了更多的反应界面,因为只有
必要的信息是通过用户端与伺服器之间,而不是整个网页.
这产生的感觉是,资料显示,立即使网络
应用接近桌面亲属.
为了更好地说明这个沟通客户端(浏览器)和远程
服务器,以及之间的分歧和经典的AJAX供电
应用程序,来看看下面的图表:
的核心,AJAX的方法与服务器通讯的AJAX的谎言
引擎.这只不过是一些JavaScript代码实例,并使用
XMLHttpRequest对象.这是一个JavaScript对象,允许发送,接收和
处理HTTP请求和从服务器无需刷新整个页面.
在AJAX的供电的应用,HTTP请求的数据可以完全在
背景下,在用户遇到任何中断.这意味着用户可以
继续工作,并使用该应用程序,而必要的网页板块是
收到服务器.XMLHttpRequest对象是一个ActiveX实施
对象在Internet Explorer中,并随后成为本地JavaScript对象的最
现代浏览器( Firefox ,Safari浏览器) .
虽然增加额外的层,以任何形式的模式应增加反应时间,这
是一个例外.通过使用这种新的层-的AJAX引擎-响应时间
缩短了与用户界面似乎更多地联系在一起的应用程序逻辑.
此外,用户已不再等待大约为页面加载.
如果你想抓住AJAX开发和学习操纵
XMLHttpRequest对象,请参阅本教程从小鼠语网站.