- 浏览: 153547 次
- 性别:
- 来自: 广州
文章分类
最新评论
-
驭乐MJ:
好!谢谢啦!正在学习使用sean中。。
Seam学习笔记 -
laorer:
00 -现在,互联网造就了一批富翁,但那时,似乎什么都不会去想 ...
如果时光能够回流到八年前 -
liuqizhi0925:
八年前,OMG ,能改变的事情真的很多...
如果时光能够回流到八年前
1. The Fundamental
1.1 What’s REST
REST: REpresentational State Transfer
It’s an architecture style (the stateless client-server architecture), not a toolkit.
1.2 REST defined
●Resources are identified by uniform resource identifiers (URIs)
● Resources are manipulated through their representations
●Messages are self-descriptive and stateless
●Multiple representations are accepted or sent
●Hypertext is the engine of application state
1.3 Representation
Just think that a web page is a representationof a resource, and the customer can get the resource from the URLs. Clients can then request a specific representation of the concept from the representations the server makes available.
1.4 State
“State” means application/session state, maintained as part of the content transferred from client to server back to client.Application state is the information necessary to understand the context of an interaction.The "stateless" constraint means that all messages must include all application state.
1.5 Transfer of state
●Connectors (client, server, cache, resolver, and tunnel) are unrelated to sessions
●State is maintained by being transferred from clients to servers and back to clients
The Conclusion:
So we can say that “REST is a post hocdescription of the Web”. Unsurprisingly, HTTP is the most RESTful protocol.
1.6 REST messages
REST can support any media type, but XML is expected to be the most popular transport for structured information, it can make a resource have as many representations as you need,The XmlHttpRequest object lets you do REST from insidea web page.Unlike SOAP and XML-RPC, REST does not really require a new message format; it’s just use URLs to transfer the messages as parameters.
1.7 Web based application
A Web-based application is a dynamically changing graph of
– State representations (pages)
– Potential transitions (links) between states
1.8 OOP on REST
Every useful data object has an address;Resources themselves are the targets for method calls; the list of methods is fixed for all resources.
1.9 REST and RPC
●REST is, in a sense, a species of RPC, except the methods have been defined in advance. REST is incompatible with "end-point" RPC. So REST is architecture not only a design style.
●Most RPC applications don't adhere to the REST philosophy.
●It’s possible to work with RPC-style tools to produce REST results.
1.10 POST on the REST attitude
There are two views on POST, the first is “POST lets you pass a whole lot of parameters and get something back, bypassing caches.”, and the other is “POST lets you create new resources that are related to old ones.” The second view is on the REST point.
2. RESTful Web Services
In the web services world, REpresentational State Transfer (REST) is a key design idiom that embraces a stateless client-server architecture in which the web services are viewed as resources and can be identified by their URLs. The Java API for XML Web Services (JAX-WS) provides full support for building and deploying RESTful web services.
2.1 When to use REST
● The web services are completely stateless.
●A caching infrastructure can be leveraged for performance.
●The service producer and service consumer have a mutual understanding of the context and content being passed along.
●Bandwidth is particularly important and needs to be limited.
●Web service delivery or aggregation into existing web sites can be enabled easily with a RESTful style.
2.2 How to build a RESTful Web Service
JAX-WS enables building RESTful endpoints through a javax.xml.ws.Provider interface in the API. Provider is a generic interface that can be implemented by a class as a dynamic alternative to a service endpoint interface (SEI).
The two important annotations in development:
1. @WebServiceProvider (wsdl=”…….”) //wsdl can omit
2. @BindingType (value=HTTPBinding.HTTP_BINDING) //Must
Reference:
1. RESTful Web Services by Sameer Tyagi:
http://java.sun.com/developer/technicalArticles/WebServices/restful/
2. Publishing a RESTful Web Service with JAX-WS by Doug Kohlert:
http://weblogs.java.net/blog/kohlert/archive/2006/01/publishing_a_re.html
3. Make Your Service RESTFul by Robin Zou:
http://zouzhile.googlepages.com/basicrestful
发表评论
-
Weblogic的update和stop/start的区别
2009-10-28 19:50 2165Weblogic的update和stop/s ... -
Web Service HTTP1.0 and HTTP1.1性能测试报告
2009-10-21 17:55 3092第1章 测试需求分析 1.1 测试目的 w ... -
SOA与业务敏捷
2006-08-30 00:00 808作者:TIBCO中国研发中心 胡长城(银狐999) ... -
CAS学习笔记
2006-08-02 00:00 1231•相关文档 官方文档: http://www.ja- ... -
SOA学习笔记
2006-07-26 00:00 905SOA是为了解决在Internet ... -
Lucene 基础指南[转]
2006-07-12 00:00 1243Lucene 基础指南 作者:lighter, 江南白衣 ... -
OSGi入门笔记
2006-07-05 00:00 947借助网上的一些资料,对OSGi有了一些了解,将到目前的一些粗浅 ... -
x509数字证书介绍
2006-06-28 00:00 1275一、什么是数字证书 数字证书就是互联网通讯中标志通讯各方身 ... -
SSL协议及其应用
2006-06-21 00:00 2056SSL协议及其应用 ... -
JSR 168与WSRP
2006-06-07 00:00 1550作者:Rachel Greenblatt ... -
JBoss学习笔记
2006-05-31 00:00 1344JBoss架构是由JMX MBean服务器、微内核组成的。 ... -
UDDI笔记
2006-05-24 00:00 1077◆UDDI的目的实际上是想提供一个针对公众网商业用户的在全 ... -
选择Seam的十大理由
2006-05-17 00:00 933一、增加AJAX特征的最快捷方式 在功能上,Ajax改变了W ... -
Seam学习笔记
2006-05-10 00:00 1345FAQ: seam的英文意思是:缝、接合处。seamless ... -
JSF学习笔记
2006-05-03 00:00 2801FAQ: 1. JSF跟Spring如何结合? A ... -
Spring学习笔记
2006-04-26 00:00 1025Spring笔记 0. 背景 Spring F ... -
iBATIS学习笔记
2006-04-19 00:00 13811. iBATIS 关于iBATIS,iBATIS是一个Da ... -
Hibernate's FAQ
2006-04-05 00:00 7751. 关于session 1) 什么时机对session ... -
Hibernate学习笔记
2006-03-29 00:00 930● 相关文档: Hibernate参考文档 v3.0.2 ... -
JMX学习笔记
2006-03-22 00:00 994JMX 笔记 一些JMX的简单入门资料如下: ...
相关推荐
RESTful Web Services是一种广泛应用于现代Web开发中的设计模式,它基于Representational State Transfer(表述性状态转移)原则,旨在创建高效、分布式的网络应用程序。本资料《RESTful Web Services中文高清版.pdf...
根据提供的文件信息,我们可以提炼出关于RESTful Web Services的关键知识点: RESTful Web Services概念:RESTful Web Services是一种基于Web的架构风格和设计模式,用于构建可扩展和灵活的网络应用。REST即表现层...
·包含RESTful Web services的真实案例,如Amazon的简单存储服务与Atom发布协议等 ·探讨各种流行编程语言的Web services客户端 ·展示如何用三种流行框架实现RESTful services —— Ruby on Rails、Restlet(基于...
RESTful Web Services 中文版,详细教程
Building RESTful Web Services with Spring 5 – Second Edition: Leverage the power of Spring 5.0, Java SE 9, and Spring Boot 2.0 Find out how to implement the REST architecture to build resilient ...
RESTful Web Services是一种广泛采用的Web服务设计模式,它遵循Representational State Transfer(表述性状态转移)原则。这种设计风格使API(应用程序编程接口)更加简洁、可读性强且易于理解,尤其适合于互联网...
《RESTful Web Services Cookbook 中文版》是一本针对Web服务开发者的实用指南,它深入探讨了如何使用REST(Representational State Transfer)架构风格来构建高效、可伸缩且易于理解的Web服务。这本书旨在帮助...
Building RESTful Web Services with Go:Initially, SOAP-based web services became more popular with XML. Then, since 2012,REST picked up the pace and gulped SOAP in whole. The rise of a new generation ...
Django RESTful Web Services 英文epub 本资源转载自网络,如有侵权,请联系上传者或csdn删除 查看此书详细信息请在美国亚马逊官网搜索此书
### Django RESTful Web Services: The Easiest Way to Build Python #### 一、概述与背景 本书主要聚焦于如何利用Python及其最受欢迎的Web框架Django来构建RESTful Web服务。随着互联网技术的发展,RESTful Web...
RESTful WebServices中文版.pdf 总共47M,我最多一次只能上传30M,不得不吧他压缩成两部分,这个是第一部分,第二部分下载地址:...下载完成后把文件名改成:RESTful WebServices中文版.part1.rar
Building RESTful Web services with Go 英文mobi 本资源转载自网络,如有侵权,请联系上传者或csdn删除 查看此书详细信息请在美国亚马逊官网搜索此书
Java RESTful Web Services是开发现代Web应用程序的一种常见方式,它基于Representational State Transfer(REST)架构原则,提供了轻量级、高效且易于使用的接口。在本文中,我们将深入探讨如何分三步轻松实现Java ...
Building RESTful Web Services with PHP 7 英文epub 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除
Building RESTful Web services with Go pdf Book Description REST is an architectural style that tackles the challenges of building scalable web services and in today's connected world, APIs have taken ...
根据提供的文件信息,我们可以提取并总结出《Restful Web Services Cookbook》一书中的关键知识点,主要围绕RESTful Web服务的设计原则、实现方法及其在不同场景下的应用展开。 ### 标题解析 - **《Restful Web ...