Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 440 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
440
Dung lượng
3,07 MB
Nội dung
[...]... of Yahoo!’s webservices (http://developer.yahoo.com/) • Most other read-only webservices that don’t use SOAP • Static web sites • Many web applications, especially read-only ones like search engines ‡ More than you’d think The Google SOAP API for web search technically has a RESTful architecture So do many other read-only SOAP and XML-RPC services But these are bad architectures for web services, because... it easy to implement RESTfulweb services: Ruby on Rails, Restlet (for Java), and Django (for Python) We also have three appendixes we hope you find useful: Appendix A, Some Resources for REST and Some RESTful Resources The first part lists interesting standards, tutorials, and communities related to RESTfulwebservices The second part lists some existing, public RESTful webservices that you can... Amazon WebServices account (http://aws.amazon.com/) and customize the Ruby code with your Access Key ID Here’s a sample run of the program: $ ruby amazon-search.rb C1D4NQS41IMK2 "restful web services" "RESTful Web Services" by Leonard Richardson, Sam Ruby "Hacking with Ruby: Ruby and Rails for the Real World" by Mark Watson At its best, the programmable web works the same way as the human web When... Here we explain the Ajax architecture for web applications in terms of web services: an Ajax application is just a web service client that runs inside your web browser That makes this chapter an extension of Chapter 2 We show how to write clients for RESTful webservices using XMLHttpRequest and the standard JavaScript library Chapter 12, Frameworks for RESTfulServices In the final chapter we cover three... something goes wrong If you provide RESTful web services, you can spend your complexity on additional features, or on making multiple services interact Success in providing services also means being part of the Web instead of just “on” the Web: making your information available under the same rules that govern well-designed web sites The closer you are to the basic web protocols, the easier this is The... issues: how to design and implement RESTfulweb services, and clients for those services Our secondary focus is on theory: what it means to be RESTful, and why webservices should be more RESTful instead of less We don’t cover everything, but we try to hit today’s big topics, and because this is the first book of its kind, we return to the core issue—how to design a RESTful service—over and over again... program starts acting like a web browser It makes an HTTP request to a URI: in this case, something like http://xml.amazon.com/onca/xml3?KeywordSearch =restful +web+ services& mode=books&f=xml&type=lite&page=1 The web server at xml.amazon.com responds with an XML document This document, shown in Example 1-3, describes the search results, just like the HTML document you see in your web browser, but in a more... questions that webservices answer differently, I can group webservices by their answers to the questions In my studies I’ve identified three common web service architectures: RESTful resource-oriented, RPC-style, and REST-RPC hybrid I’ll cover each in turn RESTful, Resource-Oriented Architectures The main topic of this book is the web service architectures which can be considered RESTful: those which... Now, lots of architectures are technically RESTful, ‡ but I want to focus on the architectures that are best for webservices So when I talk about RESTfulweb services, I mean services that look like the Web I’m calling this kind of service resource-oriented In Chapter 3 I’ll introduce the basic concepts of resource-oriented REST, in the context of a real web service: Amazon’s Simple Storage Service... commonsense set of rules for designing RESTfulwebservices We also show you the view from the client side: how you can write programs to consume RESTfulservices Our examples include realworld RESTfulservices like Amazon’s Simple Storage Service (S3), the various incarnations of the Atom Publishing Protocol, and Google Maps We also take popular services that fall short of RESTfulness, like the del.icio.us . and implement RESTful web
services, and clients for those services. Our secondary focus is on theory: what it means
to be RESTful, and why web services should. you can im-
plement web services without implementing Big Web Services: that the Web should
be all the service you need. We believe the Web s basic technologies