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:

http://mydomain.com/start.aspx?id=3

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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.