最近看了點關于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