SlideShare a Scribd company logo
ASP.NET – WCF & RESTHarish RanganathanWeb Developer EvangelistMicrosoft Corporation India
Source:  Pingdom.com
1993:Web == Content
The BrowserGeneric client experience	URI’sAddressing and identification	HTMLCommon presentation formatHyperlinksAnarchic interconnectivity	HTTP GETCommon operation everything supportsContent-Driven Web Architecture
2008:Web == Content + Capabilities
Capability-Enabled Web ArchitectureRich Browser ClientsProgrammability via script or pluginsHTTPBaseline application protocolCommon set of operations + status codesDomain-neutral data-oriented formatsJSON, Atom/Atom PublishingRefine to support domain-specific schemasPresentation formatsHTML, CSS
RESTful TenentsThe Web is a graph of linked ResourcesResources are identified by URI’sResources support a fixed set of operationsIn practice, these are defined by HTTPApplications follow links to achieve late bindingREST is an architectural style, not a specification
REST ContinuumRESTfullnessPuristsPragmatistsWell Constructed URIsHTTP VerbsGET – FetchPUT – Update/InsertDELETE – DeletePOST – AppendStandard RepresentationsPOST to 1 URI OKQuerystrings OK
HTTP Verbs
GET – Fetch
POST – Overloaded
AJAX Services
POX OKwebHttpBindingNew “web-friendly” WCF Binding in Fx 3.5Allows for the development of RESTful servicesDoes not use SOAP envelopesHTTP and HTTPS Transports OnlySupports several wire formats:XMLJSONBinary (streams)
WebServiceHostSpecialized SerivceHost for RESTful servicesEliminates need for lots of configurationAutomatically configures address, binding, contractOptimized for single-endpoint servicesUse from .svc file:<%@ ServiceHost Language="C#" Debug="true"                  Service="Caching1.FeedService"    Factory=“System.ServiceModel.Activation.WebServiceHostFactory” %>"%>
[WebGet] And [WebInvoke]Binds a WCF operation to URI space and HTTP methodIndicate the HTTP Method for the operationWebGet – Don’t make me write itWebInvoke – All verbs other than GET (Method parameter takes in the name of the Verb)Other ParametersBodyStyle – Indicates whether the Request/ Response are wrapped or notRequestFormat – Json or XmlResponseFormat – Json or XmlUriTemplate – Rich binding to URI
UriTemplateString that allows you to define the structure of the URI, as well as to define “Holes” The “Holes” are variablesYou Bind the template with parameters to fill the holes{productId} hole / variable gets bound to productId parameter in operationVariable[OperationContract][WebGet(UriTemplate=“product/{productId}")]ProductGetProduct(intproductId);
WCF REST Starter KitMicrosoft.ServiceModel.Web.dllNew features supporting RESTful servicesVisual Studio 2008 TemplatesREST Collections/Singleton ServicesAtom Feed/Atom Publishing ProtocolHTTP/POX ServicesREST SamplesCodeplex ProjectReleased at PDCWritten by WCF teamFeatures may be included in .NET 4.0

More Related Content

PPTX
SOAP Services
PPTX
Rest vs Soap
PPT
Mule anypoint b2 b
PPT
Soap vs. rest - which is right web service protocol for your need?
PPTX
BizTalk on App Services
PPTX
SOA for PL/SQL Developer (OPP 2010)
PPTX
Introducing SOA and Oracle SOA Suite 11g for Database Professionals
SOAP Services
Rest vs Soap
Mule anypoint b2 b
Soap vs. rest - which is right web service protocol for your need?
BizTalk on App Services
SOA for PL/SQL Developer (OPP 2010)
Introducing SOA and Oracle SOA Suite 11g for Database Professionals

What's hot (20)

PPT
Soap Vs Rest
PDF
REST Architectural Style: A Detail Explain
PPT
Flex And Java Integration
PPT
Flex And Java Integration
PPTX
Web services in j2 ee
PPT
Soa business centric and soap basic
PPTX
SOAP vs REST
PPTX
Representational State Transfer
PDF
REST vs SOAP
PPTX
An Overview of Web Services: SOAP and REST
PDF
Web Services Tutorial
PPTX
SOA - From Webservices to APIs
PDF
Introduction To Spring Enterprise Integration - SpringPeople
DOCX
Biztalk And Oracle Integration
PPT
introduction to Windows Comunication Foundation
PPTX
Biz talk summit 2013 - The new cloud related adapters
PPTX
Web services soap and rest by mandakini for TechGig
PPT
Mule architecture
PPT
Mule esb–api layer
PPTX
Mule ESB
Soap Vs Rest
REST Architectural Style: A Detail Explain
Flex And Java Integration
Flex And Java Integration
Web services in j2 ee
Soa business centric and soap basic
SOAP vs REST
Representational State Transfer
REST vs SOAP
An Overview of Web Services: SOAP and REST
Web Services Tutorial
SOA - From Webservices to APIs
Introduction To Spring Enterprise Integration - SpringPeople
Biztalk And Oracle Integration
introduction to Windows Comunication Foundation
Biz talk summit 2013 - The new cloud related adapters
Web services soap and rest by mandakini for TechGig
Mule architecture
Mule esb–api layer
Mule ESB
Ad

Viewers also liked (10)

PPTX
There is time for rest
PPTX
A presentation on WCF & REST
PPTX
REST in the shade of WCF
PPTX
WCF Fundamentals
DOC
WCF tutorial
PDF
Windows Communication Foundation (WCF)
PPTX
Web API or WCF - An Architectural Comparison
PPTX
Web services SOAP et REST
PPTX
Windows Communication Foundation (WCF)
PPTX
Présentation de WCF
There is time for rest
A presentation on WCF & REST
REST in the shade of WCF
WCF Fundamentals
WCF tutorial
Windows Communication Foundation (WCF)
Web API or WCF - An Architectural Comparison
Web services SOAP et REST
Windows Communication Foundation (WCF)
Présentation de WCF
Ad

Similar to RESTful WCF Services (20)

PPT
Building+restful+webservice
PDF
Building RESTful Services with WCF 4.0
PPTX
Wcf rest api introduction
PPTX
Wcf for the web developer
PPTX
WCF from the web developer
PDF
MS TechDays 2011 - WCF Web APis There's a URI for That
PDF
Wcf remaining
PDF
Download full ebook of Restfulnet 1st Edition Jon Flanders instant download pdf
PPTX
Complete Architecture and Development Guide To Windows Communication Foundati...
PPTX
Internet protocalls & WCF/DReAM
PDF
REST, JSON and RSS with WCF 3.5
PPTX
REST Presentation
PPTX
ASP.NET Mvc 4 web api
PPTX
RESTful APIs in .NET
PDF
Difference between wcf and asp.net web api
PPTX
Mini-Training: Let's have a rest
PPT
Session 1: The SOAP Story
PPT
ReST-ful Resource Management
PPTX
Introduction To REST
PPT
.Net3.5 Overview
Building+restful+webservice
Building RESTful Services with WCF 4.0
Wcf rest api introduction
Wcf for the web developer
WCF from the web developer
MS TechDays 2011 - WCF Web APis There's a URI for That
Wcf remaining
Download full ebook of Restfulnet 1st Edition Jon Flanders instant download pdf
Complete Architecture and Development Guide To Windows Communication Foundati...
Internet protocalls & WCF/DReAM
REST, JSON and RSS with WCF 3.5
REST Presentation
ASP.NET Mvc 4 web api
RESTful APIs in .NET
Difference between wcf and asp.net web api
Mini-Training: Let's have a rest
Session 1: The SOAP Story
ReST-ful Resource Management
Introduction To REST
.Net3.5 Overview

More from Harish Ranganathan (15)

PPTX
Html 5 Websites with Visual Studio 2010
PPTX
ASP.NET Web Forms vs. MVC
PPTX
New Tools for Developers in IE9
PPTX
SharePoint 2010 and Social Computing
PPTX
Vs2010 Net4
PPS
You Are Always On My Mind
PPTX
Migrating Apps To Azure
PPTX
A Web Developer's Journey across different versions of ASP.NET
PPTX
PPT
Developing for Astoria: ADO.NET Data Services
PPT
ASP.NET 4.0 Roadmap
PPT
ASP.NET, AJAX and jQuery
PPTX
ASP.NET Best Practices
PPTX
WPF 3.5 SP1 and Silverlight 2
PPTX
Visual Studio 2010 and .NET Framework 4.0 Overview
Html 5 Websites with Visual Studio 2010
ASP.NET Web Forms vs. MVC
New Tools for Developers in IE9
SharePoint 2010 and Social Computing
Vs2010 Net4
You Are Always On My Mind
Migrating Apps To Azure
A Web Developer's Journey across different versions of ASP.NET
Developing for Astoria: ADO.NET Data Services
ASP.NET 4.0 Roadmap
ASP.NET, AJAX and jQuery
ASP.NET Best Practices
WPF 3.5 SP1 and Silverlight 2
Visual Studio 2010 and .NET Framework 4.0 Overview

Recently uploaded (20)

PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Empathic Computing: Creating Shared Understanding
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Unlocking AI with Model Context Protocol (MCP)
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Big Data Technologies - Introduction.pptx
NewMind AI Weekly Chronicles - August'25 Week I
Building Integrated photovoltaic BIPV_UPV.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Encapsulation_ Review paper, used for researhc scholars
Advanced methodologies resolving dimensionality complications for autism neur...
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
MIND Revenue Release Quarter 2 2025 Press Release
The Rise and Fall of 3GPP – Time for a Sabbatical?
Empathic Computing: Creating Shared Understanding
Reach Out and Touch Someone: Haptics and Empathic Computing
Mobile App Security Testing_ A Comprehensive Guide.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Programs and apps: productivity, graphics, security and other tools
Unlocking AI with Model Context Protocol (MCP)
“AI and Expert System Decision Support & Business Intelligence Systems”
Big Data Technologies - Introduction.pptx

RESTful WCF Services

  • 1. ASP.NET – WCF & RESTHarish RanganathanWeb Developer EvangelistMicrosoft Corporation India
  • 4. The BrowserGeneric client experience URI’sAddressing and identification HTMLCommon presentation formatHyperlinksAnarchic interconnectivity HTTP GETCommon operation everything supportsContent-Driven Web Architecture
  • 5. 2008:Web == Content + Capabilities
  • 6. Capability-Enabled Web ArchitectureRich Browser ClientsProgrammability via script or pluginsHTTPBaseline application protocolCommon set of operations + status codesDomain-neutral data-oriented formatsJSON, Atom/Atom PublishingRefine to support domain-specific schemasPresentation formatsHTML, CSS
  • 7. RESTful TenentsThe Web is a graph of linked ResourcesResources are identified by URI’sResources support a fixed set of operationsIn practice, these are defined by HTTPApplications follow links to achieve late bindingREST is an architectural style, not a specification
  • 8. REST ContinuumRESTfullnessPuristsPragmatistsWell Constructed URIsHTTP VerbsGET – FetchPUT – Update/InsertDELETE – DeletePOST – AppendStandard RepresentationsPOST to 1 URI OKQuerystrings OK
  • 13. POX OKwebHttpBindingNew “web-friendly” WCF Binding in Fx 3.5Allows for the development of RESTful servicesDoes not use SOAP envelopesHTTP and HTTPS Transports OnlySupports several wire formats:XMLJSONBinary (streams)
  • 14. WebServiceHostSpecialized SerivceHost for RESTful servicesEliminates need for lots of configurationAutomatically configures address, binding, contractOptimized for single-endpoint servicesUse from .svc file:<%@ ServiceHost Language="C#" Debug="true" Service="Caching1.FeedService" Factory=“System.ServiceModel.Activation.WebServiceHostFactory” %>"%>
  • 15. [WebGet] And [WebInvoke]Binds a WCF operation to URI space and HTTP methodIndicate the HTTP Method for the operationWebGet – Don’t make me write itWebInvoke – All verbs other than GET (Method parameter takes in the name of the Verb)Other ParametersBodyStyle – Indicates whether the Request/ Response are wrapped or notRequestFormat – Json or XmlResponseFormat – Json or XmlUriTemplate – Rich binding to URI
  • 16. UriTemplateString that allows you to define the structure of the URI, as well as to define “Holes” The “Holes” are variablesYou Bind the template with parameters to fill the holes{productId} hole / variable gets bound to productId parameter in operationVariable[OperationContract][WebGet(UriTemplate=“product/{productId}")]ProductGetProduct(intproductId);
  • 17. WCF REST Starter KitMicrosoft.ServiceModel.Web.dllNew features supporting RESTful servicesVisual Studio 2008 TemplatesREST Collections/Singleton ServicesAtom Feed/Atom Publishing ProtocolHTTP/POX ServicesREST SamplesCodeplex ProjectReleased at PDCWritten by WCF teamFeatures may be included in .NET 4.0
  • 18. What We've Talked About TodayREST and the “zen” of the webWCF features for REST scenarios[WebGet] + [WebInvoke]UriTemplateWebHttpBindingAnd many more…The WCF REST Starter KitAvailable today at http://msdn.com/wcf/rest
  • 19. WebGet/WebInvoke Examples[OperationContract][WebInvoke( Method=“PUT",ResponseFormat=WebMessageFormat.Json,UriTemplate=“product/{productId}")]ProductUpdateProduct(intproductId, product p);[OperationContract][WebGet( ResponseFormat=WebMessageFormat.Json,UriTemplate=“product/{productId}")]ProductDataGetProduct(intproductId);
  • 21. © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.