Building Systems with REST<br />Glenn Block – Microsoft (the less and less evil empire)<br />
HTTP is not RPC<br />"People often mistakenly refer to HTTP as a remote procedure call (RPC) [23] mechanism simply because...
HTTP is not a transport protocol<br />HTTP is not designed to be a transport protocol. It is a transfer protocol in which ...
REST, <br />HTTP done right<br />
WCF Web Apis<br />HTTP IS First Class<br />
Browser<br />Devices<br />WCF<br />Silverlight<br />Desktop<br />Reach any client <br />
Code is easier to maintain<br />Service<br />Separation of concerns<br />Testability<br />"Raw"<br />HTTP<br />HTTP<br />C...
Separating out HTTP and other concerns<br />Application concerns / CLR Objects<br />Http <br />Channel<br />Http <br />Cha...
Resources<br />
Representations<br />
Conneg<br />
Connectors<br />Connectors<br />
Intermediaries<br />
Hypermedia<br />
Where to find out more WCF<br />WCF.Codeplex.com<br />email:gblock@microsoft.com<br />Twitter:gblock (at your own risk)<br />
Where to find out more about REST<br />http://tinyurl.com/therealrest<br />Read: Rest in Practice<br />
Upcoming SlideShare
Loading in …5
×

Building systems with rest

535
-1

Published on

QCon talk on how to apply REST using Microsoft's upcoming WCF Web APIs

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
535
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • WCF already supports exposing services over HTTP. We have heard for you that is a good start but you want us to go further
  • WCF already supports exposing services over HTTP. We have heard for you that is a good start but you want us to go further
  • http://www.flickr.com/photos/annarella1979/2739832348/sizes/l/in/photostream/
  • http://www.flickr.com/photos/wongjunhao/2761709029/sizes/l/in/photostream/
  • http://www.flickr.com/photos/mattwright/1787856/sizes/l/in/photostream/
  • Building systems with rest

    1. 1. Building Systems with REST<br />Glenn Block – Microsoft (the less and less evil empire)<br />
    2. 2. HTTP is not RPC<br />"People often mistakenly refer to HTTP as a remote procedure call (RPC) [23] mechanism simply because it involves requests and responses. What distinguishes RPC from other forms of network-based application communication is the notion of invoking a procedure on the remote machine, wherein the protocol identifies the procedure and passes it a fixed set of parameters, and then waits for the answer to be supplied within a return message using the same interface. Remote method invocation (RMI) is similar, except that the procedure is identified as an {object, method} tuple rather than a service procedure. Brokered RMI adds name service indirection and a few other tricks, but the interface is basically the same.<br /> <br />What distinguishes HTTP from RPC isn't the syntax. It isn't even the different characteristics gained from using a stream as a parameter, though that helps to explain why existing RPC mechanisms were not usable for the Web. What makes HTTP significantly different from RPC is that the requests are directed to resources using a generic interface with standard semantics that can be interpreted by intermediaries almost as well as by the machines that originate services. The result is an application that allows for layers of transformation and indirection that are independent of the information origin, which is very useful for an Internet-scale, multi-organization, anarchically scalable information system. RPC mechanisms, in contrast, are defined in terms of language APIs, not network-based applications."<br />Intermediaries<br />
    3. 3. HTTP is not a transport protocol<br />HTTP is not designed to be a transport protocol. It is a transfer protocol in which the messages reflect the semantics of the Web architecture by performing actions on resources through the transfer and manipulation of representations of those resources. It is possible to achieve a wide range of functionality using this very simple interface, but following the interface is required in order for HTTP semantics to remain visible to intermediaries.<br /> <br />That is why HTTP goes through firewalls. Most of the recently proposed extensions to HTTP, aside from WebDAV [60], have merely used HTTP as a way to move other application protocols through a firewall, which is a fundamentally misguided idea. Not only does it defeat the purpose of having a firewall, but it won't work for the long term because firewall vendors will simply have to perform additional protocol filtering. It therefore makes no sense to do those extensions on top of HTTP, since the only thing HTTP accomplishes in that situation is to add overhead from a legacy syntax. A true application of HTTP maps the protocol user's actions to something that can be expressed using HTTP semantics, thus creating a network-based API to services which can be understood by agents and intermediaries without any knowledge of the application.<br />Intermediaries<br />Decoupling<br />
    4. 4. REST, <br />HTTP done right<br />
    5. 5. WCF Web Apis<br />HTTP IS First Class<br />
    6. 6. Browser<br />Devices<br />WCF<br />Silverlight<br />Desktop<br />Reach any client <br />
    7. 7. Code is easier to maintain<br />Service<br />Separation of concerns<br />Testability<br />"Raw"<br />HTTP<br />HTTP<br />Concerns<br />Simplified Configuration<br />
    8. 8. Separating out HTTP and other concerns<br />Application concerns / CLR Objects<br />Http <br />Channel<br />Http <br />Channel<br />Http<br />Channel<br />Http<br />Channel<br />HTTP<br />Message<br />Low Level HTTP specific concerns / HTTP Only<br />Http Processor<br />Http Processor<br />Http<br />Processor<br />Http<br />Processor<br />Service<br />Operation<br />HTTP<br />Message<br />
    9. 9. Resources<br />
    10. 10. Representations<br />
    11. 11. Conneg<br />
    12. 12. Connectors<br />Connectors<br />
    13. 13. Intermediaries<br />
    14. 14. Hypermedia<br />
    15. 15. Where to find out more WCF<br />WCF.Codeplex.com<br />email:gblock@microsoft.com<br />Twitter:gblock (at your own risk)<br />
    16. 16. Where to find out more about REST<br />http://tinyurl.com/therealrest<br />Read: Rest in Practice<br />
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×