用户名: 密码: 验证码:
基于Ajax与REST的Web Services研究与实现
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
目前,基于RPC(Remote Process Call)的交互模型在相对封闭的、小的应用环境中取得了较大成功,然而,在开放的Internet级分布式Web应用环境中产生紧密耦合和接口复杂等问题,难以达到Web级的规模可伸缩性。REST(Representational State Transfer)是对当前Web体系结构设计原则的一种描述,也是对Web应用最成功要素的总结,采用REST交互模型的Web服务将克服基于RPC交互模型的诸多不足。
     针对分布式Web应用开发过程中存在的紧密耦合、接口复杂等问题,本文作者采用较新的设计思想提出一种基于Ajax与REST的Web Services的设计方案:采用REST和面向资源的架构(ROA)原则、WCF框架构建Web Services及其集成应用,实现分布式Web应用系统模块间的松散耦合、平台、语言无关、且具有可互操作性、可伸缩性强等优点;Ajax技术及其框架的引入,能在符合REST和ROA原则的前提下,实现客户端应用开发与服务器端服务开发充分解耦,同时提高了系统的交互性,显著改善用户体验。该方案可以高效地开发出互操作性好、可伸缩性强、具有良好扩展性、平台无关的分布式Web应用系统。
     本文在对REST原则、面向资源的架构、Ajax技术、.net FramWork3.5 WCF框架等开发技术进行研究的基础上,详细阐述了RESTful Web Services的实现方案,重点对REST设计原则、面向资源体系架构、Ajax技术进行分析,最终设计并实现基于Ajax与REST的Web Services的南阳理工学院高校等级考试管理综合信息系统,并通过功能测试和性能测试的结果验证了该方案的可行性、易用性。
At present, the interaction model based on RPC has made great success in relatively closed environment of small applications. However, in open Internet-level distributed Web application environments, some issues such as tight couplings and complex interface make the scale of Web-level scalability difficult to achieve. REST (REpresentational State Transfer) is not only a description of the design principles of Web architecture, but also a summary of the most successful elements of Web application. Using REST for Web Servicess interaction model will overcome many inadequacies those come from RPC-based interaction model.
     According to new design thinking, the author introduced a solution to solve those issues. The new solution is based on Web Services of Ajax and REST-based. Specific programs are as follows: Adhering to the principle of REST and resource-oriented architecture (ROA), using WCF frameworks to build a Web Services and its integration applications, the author build a distributed Web application system with loosely coupled, platform, irrelevant language, and with some advantages such as interoperability, scalability, etc; Adhering to the principle of REST and ROA, by the introduction of Ajax technology and its frameworks, client application development and server-side service development decoupled completely, while the interactivity of the system and the user experience significantly improving. This solution could efficiently develop a distributed Web application system with good interoperability, flexibility, expansibility, and platform-independent.
     Based on the principles of REST, the resource-oriented architecture, Ajax technology, and the development of technology for .Net FramWork3.5 WCF framework, the author detailed the realization of RESTful Web Services program, analyzed REST design principles, Resource-oriented architecture and Ajax technology in this paper. Finally, the author designed and implemented the Nanyang Polytechnic "University Test management information system" which based on Web Services of Ajax and REST-based. Through the functional tests and performance tests, the feasibility and ease of the program were verified.
引文
【1】顾宁,刘家茂,柴晓路. Web Servicess原理与研发实践.北京:机械工业出版社,2006
    【2】Christian Gros著,李琳骁,蔡毅译. Ajax and REST Recipes中文版.北京:电子工业出版社,2007
    【3】Leonard Richaardson&Sam Ruby著,徐涵,李红军,胡伟等译. RESTful Web Servicess中文版.北京:电子工业出版社,2008
    【4】阿斯利森著,金灵等译. Ajax基础教程.北京:人民邮电出版社,2006
    【5】Christian Heilmann著,牛海彬译.深入浅出JavaScript.北京:人民邮电出版社, 2008
    【6】张蓓,冯梅,施伟伟著.征服JavaScript高级程序设计与应用实例.北京:人民邮电出版社,2007
    【7】JuualLowy译,张逸著. WCF服务编程.北京:机械工业出版社,2008
    【8】王瑄,李燕著.应用Web Servivces构建多屋架构的高效.NET应用.北京:科学出版社,2005
    【9】扎卡斯,姆克皮克,福西特著,徐锋等. Ajax高级程序设计.北京:人民邮电出版社, 2006
    【10】白璐. Ajax设计模式下Web开发的研究与应用:[硕士学位论文].辽宁:大连海事大学,2007
    【11】Eric Newcomer,Greg Lomow著,徐涵译. Understanding SOA with Web Servicess中文版.北京:电子工业出版社,2006
    【12】Prosise著,王铁译. MICROSOFT.NET程序设计技术内幕.北京:清华大学出版社, 2003
    【13】柳靖,曹璐,赵丹著. Ruby on Rails快速Web应用开发实战.北京:电子工业出版社,2006
    【14】Craig McMurtry,Marc Mercuri,Nigel Watling,Matt Winkler等著.赵科平译. WCF揭秘.北京:人民邮电出版社,2008
    【15】布莱克著,吴畅欣,张明生译.Ruby for Rails中文版.北京:人民邮电出版. 2007
    【16】) Micbele Leroux Bustamante著,庞引明,侯伯薇著.学习WCF从原理到实践.北京:电子工业出版社,2008
    【17】韩义波,宋莉,宋俊杰. Ajax技术结合XML或JSON的使用比较.电脑知识与技术, 2009,5(1):101-103
    【18】许卓明,栗明,董逸生.基于RPC和基于REST的Web服务交互模型比较分析.计算机工程,2003,29(20):6-8
    【19】韩立巧,张传生.基于SOAP技术构建Web服务的研究.计算机工程,2003,29(10):92-94
    【20】余飞,曹谢东,陈明.基于REST方式构建Web Services的研究.福建电脑,2007,10:136-138
    【21】Building Web Servicess the REST Way,By Roger,L.Costelb,http://www.xfront.com
    【22】Curbera F. Unraveling the Web Services-An Introduction to SOAP,WSDL,and UDDI. IEEE Internet Computing,2002,6(2):86-93
    【23】Fielding R T. Principle Design of the Modern Web Architecture. Pro. Of the 2000Intl.Conf. on Software Engineering (ICSE 2000),Limerick, Ireland,2000-06:407-416
    【24】Vinoski S.Web Services Interaction Models - Part II: Putting the Web into Web Services. IEEE Internet Computing,2002,6
    【25】REST与WCF服务介绍. http://www.cqzol.com/programming/605261.html
    【26】服务契约与设计. http://book.51cto.com/art/200802/65580.htm
    【27】Ajax和REST框架结合为Web应用再添优势. http://www.51cto.com

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700