8/15/2005

技术女青年的两天AJAX之旅-- 遭遇AJAX

bitty browser

东溜西溜,发现了Bitty Browser,就是可以页面中再嵌一个浏览器!虽然有点简陋,但是有点意思。它使得我们的web页面向桌面更贴近了一步!本来想做一个sample,放在自己的blog上,但是没有想好让它来显示什么,本来想用它来显示我的标签云。后来发现不行。失败。

下面是个例子,显示的是:del.icio.us/midi的页面。可以看到浏览器还提供了其他的功能,能够像正常的浏览器一样到处看。只是小了点。




这个bitty browser,就是所谓的AJAX技术的很好实例。


关于ajax

ajax是新瓶装旧酒。它是Asynchronous JavaScript和XML的简称。包括:

  • XHTML和CSS
  • 使用文档对象模型(Document Object Model)作动态显示和交互
  • 使用XML和XSLT做数据交互和操作
  • 使用XMLHttpRequest进行异步数据接收
  • 使用JavaScript将它们绑定在一起

它所针对的问题是:在旧web页面的交互方式中,由用户触发一个HTTP请求到服务器,服务器对其进行处理后再返回一个新的HTHL页到客户端,每当服务器处理客户端提交的请求时,客户都只能空闲等待,并且哪怕只是一次很小的交互、只需从服务器端得到很简单的一个数据,都要返回一个完整的HTML页,而用户每次都要浪费时间和带宽去重新读取整个页面。

而Ajax的一个最大的特点是无需刷新页面便可向服务器传输或读写数据(又称无刷新更新页面),这一特点主要得益于XMLHTTP组件XMLHTTPRequest对象。这样就可以向再发桌面应用程序只同服务器进行数据层面的交换,而不用每次都刷新界面也不用每次将数据处理的工作提交给服务器来做,这样即减轻了服务器的负担又加快了响应速度、缩短了用户等候时间。

比较详细的关于ajax的介绍:

懒得去看别的英文材料了。

ps.发现自己看东西还是很功利的,用不到的时候绝对不看。而且还引此为荣。

1 comment:

ghkj said...

However mean your gold in wow life is,buy wow gold meet it and live it ;wow gold cheap do not shun it and call it hard names.It is not so bad as you are.It looks poorest when you are richest.The fault-finder will find faults in paradise.wow gold kaufen love your life,poor as it is.maple meso You may perhaps have some pleasant,thrilling,maplestory power leveling glorious hourss,even in a poor-house.The setting sun is reflected from the windows of the alms-house as brightly as from the rich man's abode;the snow melts before its door as early in the spring.sell wow gold I do not see but a quiet mind may live as contentedly there,cheap mesos and have as cheering thoughts,as in a palace.The town's poor seem to me often to live the most independent lives of any.May be they are simply great enough to billig wow gold receive without misgiving.Most think that they are above being supported by the town;powerlevel but it often happens that buy maplestory mesos they are not above supporting themselves by dishonest means.which should be more disreputable.Cultivate poverty like a garden herb,like sage.Do not trouble wow powerleveln yourself much to get new things,maple mesos whether clothes or friends,Turn the old,archlord power leveling return to them.Things do not change;we change.Sell your clothes and keep your thoughts.