首页 | 本学科首页   官方微博 | 高级检索  
     

用Ajax技术实现B/S模式下客户端间信息交互
引用本文:田福生,张燕平.用Ajax技术实现B/S模式下客户端间信息交互[J].计算机技术与发展,2007,17(10):92-94,98.
作者姓名:田福生  张燕平
作者单位:安徽大学,计算智能与信号处理教育部重点实验室,安徽,合肥,230039
摘    要:C/S模式下,客户端之间的信息交互通过Socket编程或者消息传递中间件很容易实现,而B/S模式下,作为客户端的浏览器之间的信息交互却很难实现,因为浏览器客户端对信息的改变很容易提交给服务器端,反过来,服务器端的信息的改变却很难及时地通知每个客户端,只能通过客户端重新发出HTrP请求。传统的方法是每个客户端的网页每隔一段时间就刷新一次,这势必会造成整个页面的不断刷新和重载,从而浪费时间和宽带。文中利用Ajax与服务器端交互异步的特点,结合Jsp/Servlet的强大功能,实现web页面无刷新快速更新数据方法,达到客户端与服务器端尽量保持数据同步,客户端之间通过web服务器实现了信息的交互,并且在用户体验上也得到了优化。实验结果表明,该方法具有一定的实用性。

关 键 词:信息交互
文章编号:1673-629X(2007)10-0092-03
收稿时间:2006-12-18
修稿时间:2006-12-18

Realization of Communication among Clients under B/S Using Ajax
TIAN Fu-sheng,ZHANG Yan-ping.Realization of Communication among Clients under B/S Using Ajax[J].Computer Technology and Development,2007,17(10):92-94,98.
Authors:TIAN Fu-sheng  ZHANG Yan-ping
Abstract:The communication among the clients can be easily realized using the Socket programming or middleware of message queue in the mode of the client/server. But it is difficult to be realized in the mode of browser/server,since the changing of clients which is browser can easily be sent to server while the changing of server could not be sent to the clients. The clients can only be modified by sending the request of HTTP again in the mode of browser/server. Traditional method is to refresh the client at regular intervals. It must lead to continuously refreshing and loading. It is a waste of time and bandwidth. In this paper,a novel method of combining the characteristic of asynchronous communication of Ajax and the strong function of Jsp/Servlet is proposed. It can achieve the high quality of synchronization between the clients and server,and realize the communication among clients by web server. The experiments reveal its applicability.
Keywords:B/S  Ajax
本文献已被 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号