Book Image

Visual Studio 2013 and .NET 4.5 Expert Cookbook

Book Image

Visual Studio 2013 and .NET 4.5 Expert Cookbook

Overview of this book

Table of Contents (14 chapters)
Visual Studio 2013 and .NET 4.5 Expert Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Writing a REST-based WCF service


The term Representational State Transfer (REST) was coined by Roy Fielding and is a design pattern for a networked system. In this pattern, the client invokes a web request using a URL, so the basic idea of a REST pattern is to generate a unique URI to represent data.

In Wikipedia, REST is quoted as:

"Representational State Transfer is intended to evoke an image of how a well-designed Web application behaves: a network of web pages (a virtual state-machine), where the user progresses through an application by selecting links (state transitions), resulting in the next page (representing the next state of the application) being transferred to the user and rendered for their use."

This means REST is intended for web applications where the browser invokes each request by specifying a unique URI, as shown in the following figure:

In the preceding figure, it is clear that any technology can easily call a REST-based service using basic HTTP requests.

There are a few...