RESTful .NET: Build and Consume RESTful Web Services with .NET 3.5

RESTful .NET: Build and Consume RESTful Web Services with .NET 3.5

by Jon Flanders


$35.99 $39.99 Save 10% Current price is $35.99, Original price is $39.99. You Save 10%.
View All Available Formats & Editions
Choose Expedited Shipping at checkout for guaranteed delivery by Thursday, August 29


RESTful .NET is the first book that teaches Windows developers to build RESTful web services using the latest Microsoft tools. Written by Windows Communication Foundation (WFC) expert Jon Flanders, this hands-on tutorial demonstrates how you can use WCF and other components of the .NET 3.5 Framework to build, deploy and use REST-based web services in a variety of application scenarios.

RESTful architecture offers a simpler approach to building web services than SOAP, SOA, and the cumbersome WS- stack. And WCF has proven to be a flexible technology for building distributed systems not necessarily tied to WS- standards. RESTful .NET provides you with a complete guide to the WCF REST programming model for building web services consumed either by machines or humans. You'll learn how to:

  • Program Read-Only (GET) services
  • Program READ/WRITE services
  • Host REST services
  • Program REST feeds
  • Program AJAX REST clients
  • Secure REST endpoints
  • Use workflow to deliver REST services
  • Consume RESTful XML services using WCF
  • Work with HTTP
  • Work with ADO.NET Data Services (Astoria)

RESTful .NET introduces you to the ideas of REST and RESTful architecture, and includes a detailed discussion of how the Web/REST model plugs into the WCF architecture. If you develop with .NET, it's time to jump on the RESTful bandwagon. This book explains how.

"While REST is simple, WCF is not. To really understand and exploit this part of WCF requires a knowledgeable and experienced guide. I don't know anybody who's better suited for this role than Jon Flanders. ...Jon is first-rate at explaining complicated things. This book is the best introduction I've seen to creating and using these services with WCF."—David Chappell, Chappell & Associates

Product Details

ISBN-13: 9780596519209
Publisher: O'Reilly Media, Incorporated
Publication date: 11/28/2008
Pages: 310
Product dimensions: 6.90(w) x 9.20(h) x 0.70(d)

About the Author

Although Jon Flanders spent the first few years of his professional life as an attorney, he quickly found chasing bits more interesting than chasing ambulances. After working with ASP and COM, he made the move to .NET. Jon is most at home spelunking, trying to figure out exactly how .NET (specifically ASP.NET and Visual Studio .NET) works. Deducing the details and disseminating that information to other developers is his passion.

Table of Contents

Who This Book Is For;
How This Book Is Organized;
What You Need to Use This Book;
Conventions Used in This Book;
Using Code Examples;
How to Contact the Author;
Comments and Questions;
Chapter 1: REST Basics;
1.1 Architecture of the World Wide Web;
1.2 SOAP;
1.3 REST;
1.4 Implementing a Simple RESTful Service Example;
1.5 Processes;
1.6 Summary;
Chapter 2: WCF RESTful Programming Model;
2.1 Isn’t WCF All About SOAP?;
2.2 Channels and Dispatching;
2.3 HTTP Programming with WCF 3.0;
2.4 Web Programming in WCF 3.5;
2.5 UriTemplate;
2.6 Summary;
Chapter 3: Programming Read-Only Services;
3.1 Using WebGetAttribute and UriTemplate;
3.2 Data Formats;
3.3 Summary;
Chapter 4: Programming Read/Write Services;
4.1 POST, PUT, and DELETE;
4.2 Using WebInvokeAttribute;
4.3 Summary;
Chapter 5: Hosting WCF RESTful Services;
5.1 WCF REST Hosting Isn’t a Special Case;
5.2 Self-Hosting;
5.3 Hosting in IIS;
5.4 Custom ServiceHostFactory;
5.5 Hosting Wrap-Up;
5.6 Summary;
Chapter 6: Programming Feeds;
6.1 Building a Feed with WCF;
6.2 Exposing a Feed on a Live URI;
6.3 Feed Validation;
6.4 Adding Links to a Feed;
6.5 Summary;
Chapter 7: Programming Ajax and Silverlight Clients;
7.1 WCF Web Services and Ajax;
7.2 JSON;
7.3 ASP.NET Ajax;
7.4 Silverlight 1.0;
7.5 Silverlight 2.0;
7.6 Returning JSON and XML Conditionally with a Single Method;
7.7 Summary;
Chapter 8: Securing REST Endpoints;
8.1 Authenticating: Self-Hosted Endpoints;
8.2 Authenticating: Managed Hosting Endpoints;
8.3 Authorizing Endpoints;
8.4 Summary;
Chapter 9: Using Workflow to Deliver REST Services;
9.1 Consuming REST Services from WF;
9.2 The SendActivity Instance;
9.3 The ReceiveActivity Instance;
9.4 Stateless Workflow Services;
9.5 Stateful Workflow Services;
9.6 Summary;
Chapter 10: Consuming RESTful XML Services Using WCF;
10.1 Defining the Client;
10.2 Client Extensibility;
10.3 Summary;
Chapter 11: Working with HTTP;
11.1 Programming HTTP with WCF;
11.2 Status Codes;
11.3 Conditional GET;
11.4 Caching;
11.5 Summary;
WCF 3.5 SP1;
Atom Publishing Protocol;
UriTemplate Changes;
Attribute-Free DataContract Serialization;
ADO.NET Data Services;
Building an ADO.NET Data Service;
ADO.NET Data Services and AtomPub;
ADO.NET Entity Framework Walkthrough;
Creating the Data Model;

Customer Reviews

Most Helpful Customer Reviews

See All Customer Reviews

RESTful .NET: Build and Consume RESTful Web Services with .NET 3.5 4.5 out of 5 based on 0 ratings. 4 reviews.
RickAtKnowWare More than 1 year ago
This is a well written and very thorough book about REST, what it is, how it works and how to use it in a .Net environment. It starts at a fairly basic level on this subject and covers every aspect of this technology in detail. The Preface of this book indicates that the book is for .Net Developers who are familiar with REST and WCF and recommends other books as prerequisites for those not already familiar with these. Certainly it is true that someone completely unfamiliar with these areas would find the book difficult to follow. The book does review the basics of REST pretty well, and it is clear about the purpose and use of WCF for those who, though familiar with it, might be “rusty” or not well versed. I have been a software developer for over 30 years, and have been working in .Net since about 2004. I have written WCF services and I have been to a few lectures on REST and “played with” RESTful interfaces from time to time, but I would not consider myself an expert on either of these subjects. I did not find this book to be an “easy read” by any means; it is a highly technical book. But I did find it to be very clearly written and well organized. The author, Jon Flanders, is obviously extremely well qualified to cover the subject and does everything possible to explain each aspect of the technologies covered; including descriptions of what each feature is for, what it is not suited for, and how to use it. After reviewing the basics and explaining the programming models, the book eases into the subject of writing RESTful services by covering Read-Only services, which may well be as much as some programmers need to know about it. But this is not a book for every programmer who wants to write a RESTful service. Instead, it is for programmers who want to know all about REST in .NET so that they can not only make informed decisions about how and where to use it (and where not to use it), but also implement it properly and securely in their projects. Once Read-Only services have been described, the author goes into Read/Write services, Ajax Services and how to use it with Silverlight. There is also a complete chapter on programming Feeds. It then describes how to secure and consume services. In short, I found this to be a high quality, comprehensive book and reference on the subject of writing RESTful services in .NET. It gives comprehensive, accurate coverage and is a good reference. In spite of this, it gives a competent introduction to the subject for those who don’t need or want to be pampered about it. It is practical, useful and descriptive in contrast to the standard documentation about REST that is found online, which I personally find very difficult to work with. I found the book to be helpful and descriptive, with just the right amount of detail. It covered quite a bit more than I need for my current project, but I like this in a book. I’m sure I’ll refer back to it as needed on future projects.
Anonymous More than 1 year ago
Some chapters are very good, and some chapters are dry and academic. On the whole, the book is worth reading. Enjoyed chapters 1-4 and chapter 8-9. The other chapter were non-essential to my needs, and thus were therefore dry and boring. For other people maybe these other chapter would be more interesting. The sequencing of the chapters is very strange. I felt the chapter could be sequenced - with the important stuff at the beginnning of the book - and the optional chapters at the end of the book. The chapters are fairly short, which is a good thing.
Anonymous More than 1 year ago
INDEPENDENTREVIEWER More than 1 year ago
Do you want to learn about how to use the REST programming model in WCF
3.5? If you do, then this book is for you! Author Jon Flanders, has done an outstanding job of writing a book that is designed
for .NET developers who are familiar with WCF and REST.

Flanders, begins by introducing the basic concepts of REST. Next, the author introduces the WCF channel and programming models. Then, he
introduces you to the WebGetAttribute, which is the mechanism for building resources that return read-only representations. He continues by examining the special considerations for hosting this type of endpoint. Next, the author shows you how to build and consume feeds using the WCF feed programming model. Then, he examines WCF 3.5's ability to return data as XML- or JSON-encoded results, as well as the integration between WCF and
ASP.NET Ajax. The author continues by examining the WCF settings for
enabling security and for creating an endpoint that is highly secure. Next,
he focuses on both stateless and stateful workflow models for implementing
RESTful services. He continues by taking a look at Restful service, SQL
Server Data Services, and decompose it into a WCF service contract that can
invoke the service through the WCF programming model. Finally, the author
looks at a couple of slightly more advanced HTTP features and how to use
them with your RESTful services in WCF.

This most excellent book will help you learn the ways of REST. More
importantly, it will show you how to apply them when developing
applications and services using .NET and WCF.