Chapter 4: Building Web Services with REST

In This Chapter

check.png Exploring the principles of REST

check.png Implementing REST services using WCF

check.png Consuming REST services

Chapter 3 includes a sidebar, “Using Different Endpoints,” that has a big list of binding formats you can use with WCF. I point out that for most applications, you use SOAP, or binary. That’s not necessarily accurate.

Another binding is pretty popular — it is the binding that your web browser uses to get pages from web servers. It is called REST, and it stands for Representational State Transfer.

In this chapter, I introduce you to REST and guide you through its advantages and drawbacks.

Getting to Know REST

REST is basically the use of the traditional GET and POST patterns the old folks will remember from CGI. For you young pups, it is the basic format of web requests. For instance, when you click a link that looks like this:

you’re using REST. Remember, we aren’t talking about an implementation here. We are talking about a remote procedure call mechanism. It is just a way to get parameters for a query to a remote machine and to get data back.

We also aren’t talking about a protocol, like SOAP ...

Get C# 5.0 All-in-One For Dummies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.