最近看了点关于REST的文章,虽然看得很浅,但很喜欢这种架构style。作为一名立志今后从事Web开发的年轻IT人员来说,掌握一种架构方法,拥有这方面的技能其实很重要。
REST(Representational State )架构最早由Roy T. Fielding于2000年提出。
REST软件架构是当今世界上最成功的互联网的超媒体分布式系统,实现这一软件架构最著名的就是HTTP协议。
REST软件架构当中最重要的两个理念:对于互联网资源进行唯一定位;理解对于该资源进行怎样运作。
REST遵循CRUD原则:(create , read , update , delete)。
REST的“无状态服务器”约束:“客户机——无状态——服务器”。
目前流行的的AJAX技术与Rails框架,遵循了REST的一些重要原则。
AJAX架构风格使开发人员可以将处理和状态需求分布到客户机,对于程序逻辑与表示部署到客户端,服务器端仅含有业务数据或个性化内容,与服务器端Web应用程序相比,它具有显著的可伸缩性优势。
AJAX技术还使得软件更好地实现分布性功能,在一个企业内只要一个人下载了AJAX引擎,其它企业内部的人员,就可以共享该资源了。
AJAX和REST架构风格对于融入式Web应用程序也同样具有优势(程序员实战Web2.0 或http://www.ibm.com/developerworks/cn/web/wa-ajaxarch/)
对于REST,目前处于初学阶段,在此,附上Roy Thomas Fielding博士论文摘要:
ABSTRACT OF THE DISSERTATION
Architectural Styles and the Design of Network-based Software Architectures by Roy Thomas Fielding
Doctor of Philosophy in Information and Computer Science
University of California, Irvine, 2000
Professor Richard N. Taylor, Chair
The World Wide Web has succeeded in large part because its software architecture has
been designed to meet the needs of an Internet-scale distributed hypermedia system. The
Web has been iteratively developed over the past ten years through a series of
modifications to the standards that define its architecture. In order to identify those aspects
of the Web that needed improvement and avoid undesirable modifications, a model for the
modern Web architecture was needed to guide its design, definition, and deployment.
Software architecture research investigates methods for determining how best to
partition a system, how components identify and communicate with each other, how
information is communicated, how elements of a system can evolve independently, and
how all of the above can be described using formal and informal notations. My work is
motivated by the desire to understand and evaluate the architectural design of networkbased
application software through principled use of architectural constraints, thereby
obtaining the functional, performance, and social properties desired of an architecture. An
architectural style is a named, coordinated set of architectural constraints.
This dissertation defines a framework for understanding software architecture via
architectural styles and demonstrates how styles can be used to guide the architectural
design of network-based application software. A survey of architectural styles for
network-based applications is used to classify styles according to the architectural
properties they induce on an architecture for distributed hypermedia. I then introduce the
Representational State Transfer (REST) architectural style and describe how REST has
been used to guide the design and development of the architecture for the modern Web.
REST emphasizes scalability of component interactions, generality of interfaces,
independent deployment of components, and intermediary components to reduce
interaction latency, enforce security, and encapsulate legacy systems. I describe the
software engineering principles guiding REST and the interaction constraints chosen to
retain those principles, contrasting them to the constraints of other architectural styles.
Finally, I describe the lessons learned from applying REST to the design of the Hypertext
Transfer Protocol and Uniform Resource Identifier standards, and from their subsequent
deployment in Web client and server software.
Roy Thomas Fielding博士论文英文版本
http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm