rest架構(gòu)
最近看了點關(guān)于REST的文章,雖然看得很淺,但很喜歡這種架構(gòu)style。作為一名立志今后從事Web開發(fā)的年輕IT人員來說,掌握一種架構(gòu)方法,擁有這方面的技能其實很重要。REST(Representational State )架構(gòu)最早由Roy T. Fielding于2000年提出。
REST軟件架構(gòu)是當今世界上最成功的互聯(lián)網(wǎng)的超媒體分布式系統(tǒng),實現(xiàn)這一軟件架構(gòu)最著名的就是HTTP協(xié)議。
REST軟件架構(gòu)當中最重要的兩個理念:對于互聯(lián)網(wǎng)資源進行唯一定位;理解對于該資源進行怎樣運作。
REST遵循CRUD原則:(create , read , update , delete)。
REST的“無狀態(tài)服務(wù)器”約束:“客戶機——無狀態(tài)——服務(wù)器”。
目前流行的的AJAX技術(shù)與Rails框架,遵循了REST的一些重要原則。
AJAX架構(gòu)風格使開發(fā)人員可以將處理和狀態(tài)需求分布到客戶機,對于程序邏輯與表示部署到客戶端,服務(wù)器端僅含有業(yè)務(wù)數(shù)據(jù)或個性化內(nèi)容,與服務(wù)器端Web應(yīng)用程序相比,它具有顯著的可伸縮性優(yōu)勢。
AJAX技術(shù)還使得軟件更好地實現(xiàn)分布性功能,在一個企業(yè)內(nèi)只要一個人下載了AJAX引擎,其它企業(yè)內(nèi)部的人員,就可以共享該資源了。
AJAX和REST架構(gòu)風格對于融入式Web應(yīng)用程序也同樣具有優(yōu)勢(程序員實戰(zhàn)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
posted on 2008-01-23 16:56 sun 閱讀(1329) 評論(0) 編輯 收藏 所屬分類: Ajax 、REST