- 浏览: 150144 次
- 性别:
- 来自: 广州
文章分类
最新评论
-
驭乐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 2134Weblogic的update和stop/s ... -
Web Service HTTP1.0 and HTTP1.1性能测试报告
2009-10-21 17:55 3063第1章 测试需求分析 1.1 测试目的 w ... -
SOA与业务敏捷
2006-08-30 00:00 779作者:TIBCO中国研发中心 胡长城(银狐999) ... -
CAS学习笔记
2006-08-02 00:00 1198•相关文档 官方文档: http://www.ja- ... -
SOA学习笔记
2006-07-26 00:00 871SOA是为了解决在Internet ... -
Lucene 基础指南[转]
2006-07-12 00:00 1216Lucene 基础指南 作者:lighter, 江南白衣 ... -
OSGi入门笔记
2006-07-05 00:00 922借助网上的一些资料,对OSGi有了一些了解,将到目前的一些粗浅 ... -
x509数字证书介绍
2006-06-28 00:00 1244一、什么是数字证书 数字证书就是互联网通讯中标志通讯各方身 ... -
SSL协议及其应用
2006-06-21 00:00 2001SSL协议及其应用 ... -
JSR 168与WSRP
2006-06-07 00:00 1515作者:Rachel Greenblatt ... -
JBoss学习笔记
2006-05-31 00:00 1320JBoss架构是由JMX MBean服务器、微内核组成的。 ... -
UDDI笔记
2006-05-24 00:00 1052◆UDDI的目的实际上是想提供一个针对公众网商业用户的在全 ... -
选择Seam的十大理由
2006-05-17 00:00 908一、增加AJAX特征的最快捷方式 在功能上,Ajax改变了W ... -
Seam学习笔记
2006-05-10 00:00 1307FAQ: seam的英文意思是:缝、接合处。seamless ... -
JSF学习笔记
2006-05-03 00:00 2769FAQ: 1. JSF跟Spring如何结合? A ... -
Spring学习笔记
2006-04-26 00:00 990Spring笔记 0. 背景 Spring F ... -
iBATIS学习笔记
2006-04-19 00:00 13481. iBATIS 关于iBATIS,iBATIS是一个Da ... -
Hibernate's FAQ
2006-04-05 00:00 7461. 关于session 1) 什么时机对session ... -
Hibernate学习笔记
2006-03-29 00:00 888● 相关文档: Hibernate参考文档 v3.0.2 ... -
JMX学习笔记
2006-03-22 00:00 968JMX 笔记 一些JMX的简单入门资料如下: ...
相关推荐
·包含RESTful Web services的真实案例,如Amazon的简单存储服务与Atom发布协议等 ·探讨各种流行编程语言的Web services客户端 ·展示如何用三种流行框架实现RESTful services —— Ruby on Rails、Restlet(基于...
RESTful Web Services 中文版 高清 PDF 电子书
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 ...
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 ...
RESTful Web Services Cookbook 中文版,Web开发人员必备良药
Django RESTful Web Services 英文epub 本资源转载自网络,如有侵权,请联系上传者或csdn删除 查看此书详细信息请在美国亚马逊官网搜索此书
RESTful WebServices中文版.pdf 总共47M,我最多一次只能上传30M,不得不吧他压缩成两部分,这个是第一部分,第二部分下载地址:...下载完成后把文件名改成:RESTful WebServices中文版.part1.rar
Building RESTful Web services with Go 英文mobi 本资源转载自网络,如有侵权,请联系上传者或csdn删除 查看此书详细信息请在美国亚马逊官网搜索此书
Table of Contents ...Chapter 9 Scaling RESTful Services (Performance of Web Services) Chapter 10 Building a Web Client (Consuming Web Services) Chapter 11 Introduction to microservices
Building RESTful Web Services with PHP 7 英文epub 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除
讲解REST与面向资源的架构(ROA)的概念与原理,如何编写符合REST风格的Web 2.0应用。仅用学习使用,不可用于商业用途,如有版权问题,请联系删除!
Building RESTful Web Services with PHP 7_Code 源码 本资源转载自网络,如有侵权,请联系上传者或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 Java Web Services, Master core REST concepts and create RESTful web services in Java, Jose Sandoval, Copyright 2009 Packt Publishing
《RESTful Web Services Cookbook》的出现正好弥补了这一空缺,书中包含了大量与设计、实现RESTful Web服务相关的内容,它们都是在日常的设计和开发过程中会经常遇到的东西。本书采用了HTTP报文作为范例,而非具体的...
Building RESTful Web Services with Java EE 8 is a comprehensive guide that will show you how to develop state-of-the-art RESTful web services with the latest Java EE 8 APIs. You will begin with an ...
You'll learn ways to design RESTful web services for client and server applications that meet performance, scalability, reliability, and security goals, no matter what programming language and ...