Demystifying The Code

REST in WCF – Part X – Supporting Caching and Conditional GET

So far in this series (click here for an index of the complete series, as well as supporting screencasts), I have illustrated how to develop both a LO-REST, AJAX-Friendly service, as well as HI-REST services adhering to the unified API of HTTP.  In the very first post, I touched on some aspects of REST, but I haven’t spent much time on the benefits of following a RESTful architectural style.  I made mention of the fact that RESTful services follow the "way of the web".  As it turns out, this proves to be quite powerful.

The first 2 sentences of Section 13 of the HTTP 1.1 Specification highlight this point quite well: "HTTP is typically used for distributed information systems, where performance can be improved by the use of response caches. The HTTP/1.1 protocol includes a number of elements intended to make caching work as well as possible."  What can be gleaned from this is that HTTP, the underlying protocol used by the web, is explicit about how to support caching responses.  Clients (such as browsers), proxies and web servers all participate in caching responses, providing the scalability required by applications running on the web.  RESTful service architectures seek to take advantage this infrastructure for their services.

[ Read More → ]

REST in WCF – Part IX – Controlling the URI

Resources in REST

Arguably, the most fundamental concept in REST is that of a resource.  It is best to think of it as a conceptual representation of an entity or entities.  Blah, blah, blah, conceptual, blah blah blah, representation, blah, blah, blah entity.  What does all of that mean anyway?  Think of it this way, if you can create a link to it, it is a resource.  Now what does conceptual representation mean?  Essentially, it means that the resource is an abstraction.  It is not the underlying entity itself, rather a mapping to that entity… and that mapping may change.  Whoa, the mapping may change?  How is that?  Consider the example that you wanted to expose the top 10 best selling books at your online store.  The resource would be those top 10 best selling books.  It is clear that those would change over time. 

[ Read More → ]

REST in WCF Blog Series Index

As some of you know, I am in the midst of a blog series on REST in WCF.  Further, I have been hard at work on a series of screencasts on the same subject (in conjunction with Ron Jacobs).  My colleague Tim Heuer relayed to me that I didn’t have a single post that we can point a person to that provides links to all of the posts and screencasts.  I will keep this post updated with all of the info:

Blog Series:

[ Read More → ]

Demystifying The Code