SlideShare uma empresa Scribd logo
1 de 32
Doing REST with new WCF Web API  Himanshu Desai Senior Consultant - Readify Discover. Master. Influence.
Agenda Web as Resource Oriented Architecture ,[object Object],Overview of REST What is REST?  REST Constraints REST Benefits REST using WCF REST Support in WCF WCF Web API  Discover. Master. Influence.
Resource Oriented Architecture 3 Discover. Master. Influence.
Current Industry Trends A Move to cloud-based computing A Migration away from SOAP More browser based Apps Adoption of REST Other standards like OAuth, WebSockets Discover. Master. Influence. 4
What is REST?  Representational State Transfer Idea floated by Roy Fielding Architecture Style (not a protocol or spec and it is not restricted to HTTP) Discover. Master. Influence. 5
REST Constraints Client - server Stateless Cacheable Layered Uniform interface Discover. Master. Influence. 6
REST Constraints Uniform interface Client - server Stateless Cacheable Layered Discover. Master. Influence. 7
REST Benefits Scalability of component interactions Evolvability Reach Intermediary components to reduce latency, enforce security and encapsulate legacy systems Discover. Master. Influence. 8
RESTful Services-1 A Traditional RPC based Service Moving from Verb to Noun Users Bookmarks Discover. Master. Influence. 9
RESTful Services-2 Designing the Uri Template An invidual user account An individual bookmark A user’s collection of private/public bookmark Collection of all public bookmarks Applying the Uniform HTTP Interface Discover. Master. Influence. 10
RESTful Services-2 11 Discover. Master. Influence.
RESTful Services-3 Designing Resource Representation Discover. Master. Influence. 12
RESTful Services-4 Designing Resource Representation <User> 	< Email>aaron@pluralsight.com</Email> 	<Name>Aaron Skonnard</Name> </User> Supporting Alternate Representation ?tag={tag}&format=json {username}?tag={tag}&format=json users/{username}?format=json users/{username}/profile?format=json Security Consideration Providing Resource Metadata Avoiding RPC Tendencies 13 Discover. Master. Influence.
GET Example REQUEST GET /index.html Host: www.example.com RESPONSE HTTP/1.1 200 OK Etag: „3f80f-1b6-3e1cb03b” Content-Type: text/html; charset=UTF-8 l Discover. Master. Influence. 14
POST Example POST /order HTTP/1.1 Host: amazon.net Content-Type: application/xml Content-Length: 216 <order xmlns="http://schemas.amazon.net/order"> <drink>latte</drink> </order> 201 Created Location: http://amazon.net/order/1234 ContentType: application/xml <order xmlns="http://schemas.amazon.net/order"> ... l Discover. Master. Influence. 15
PUT Example PUT /payment/1234 HTTP/1.1 Host: amazon.net Content-Type: application/xml Content-Length: 216 <payment xmlns="http://schemas.amazon.net/order"> <cardNumber>...</cardNumber> </order> 200 OK ContentType: application/vnd.amazon+xmlxmlns="http://schemas.amazon.net/order"> <drink>Latte</drink> <link href=„payment/1234” rel=„http://relations.amazon.net/payment”/> </order> l Discover. Master. Influence. 16
Central Principle Existence of resource which is referenced with a global identifier (e.g. a image, document etc.) Communicate via a standard interface (e.g. HTTP) Exchange representations of these resources (HTML.XML,JSON etc.) Discover. Master. Influence. 17
RESTful web services Collection of data  Base URI e.g. http://ebay.com/items/1 Internet Media type of the data supported by the web service. (JSON,XML etc.) Set of operation supported by the web service using HTTP methods (POST,GET,PUT or DELETE) Discover. Master. Influence. 18
REST Using WCF Discover. Master. Influence.
Rest Support Comparison Discover. Master. Influence. 20
WCF Web API HTTP is now a first class  Content negotiation Automatic help pages Service Routes Integration with ASP.NET Caching Reach any client     (Browser, Devices, Silverlight, Desktop) Discover. Master. Influence. 21
Resource Architecture Op Handler2 Transport+Encoder Message Handler 1  Response Discover. Master. Influence. 22 Dispatcher GetById? GetById? Op Handler 3 Op Handler 4 Op Handler 1 Message Handler 2 Request
Components Content Negotiation Central Configuration (Fluent API) Http  Classes Operation Handler Factory Error Handler Message Handler Factory(Channel Level) Discover. Master. Influence. 23
Classes for Request & Response ,[object Object]
HttpResponseMessage
HttpContent
HttpClientDiscover. Master. Influence. 24
Content Negotiation Support for Multiple Formats including an add-in model if you want xml ,it gives xml and if you want Json, it gives Json Discover. Master. Influence. 25
Demo Content Negotiation Discover. Master. Influence.
Operation Handler Factory Responsible for creating new instances of Media Type Formatters and Operation Handlers. Media Type Formatter  Operation Handler - an abstract base class used to create transfer a set of input into a set of output Discover. Master. Influence. 27
Operation Handler Factory Request Pipeline Response Pipeline Operation Handler Operation Handler Operation Handler Operation Handler Operation Handler Operation Handler Dispatch Discover. Master. Influence. 28
Message Handler Factory Operation Message Handler4 Message Handler3 Message Handler 1 Message Handler2 Discover. Master. Influence. 29

Mais conteúdo relacionado

Mais procurados

Introduction to WCF
Introduction to WCFIntroduction to WCF
Introduction to WCFybbest
 
REST and ASP.NET Web API (Milan)
REST and ASP.NET Web API (Milan)REST and ASP.NET Web API (Milan)
REST and ASP.NET Web API (Milan)Jef Claes
 
ASP.NET Web API and HTTP Fundamentals
ASP.NET Web API and HTTP FundamentalsASP.NET Web API and HTTP Fundamentals
ASP.NET Web API and HTTP FundamentalsIdo Flatow
 
Windows Communication Foundation (WCF)
Windows Communication Foundation (WCF)Windows Communication Foundation (WCF)
Windows Communication Foundation (WCF)Peter R. Egli
 
Security Patterns with WSO2 ESB
Security Patterns with WSO2 ESBSecurity Patterns with WSO2 ESB
Security Patterns with WSO2 ESBWSO2
 
Apache CXF - New Features
Apache CXF - New FeaturesApache CXF - New Features
Apache CXF - New FeaturesDaniel Kulp
 
Understanding SOAP and REST basics and differences
Understanding SOAP and REST basics and differencesUnderstanding SOAP and REST basics and differences
Understanding SOAP and REST basics and differencesBhavendra Chavan
 
CXF 3.0, What's new?
CXF 3.0, What's new?CXF 3.0, What's new?
CXF 3.0, What's new?Daniel Kulp
 
Interoperability and Windows Communication Foundation (WCF) Overview
Interoperability and Windows Communication Foundation (WCF) OverviewInteroperability and Windows Communication Foundation (WCF) Overview
Interoperability and Windows Communication Foundation (WCF) OverviewJorgen Thelin
 
Web Service
Web ServiceWeb Service
Web ServiceEri Alam
 
Developing Revolutionary Web Applications using Comet and Ajax Push
Developing Revolutionary Web Applications using Comet and Ajax PushDeveloping Revolutionary Web Applications using Comet and Ajax Push
Developing Revolutionary Web Applications using Comet and Ajax PushDoris Chen
 
Apache CXF New Directions in Integration
Apache CXF New Directions in IntegrationApache CXF New Directions in Integration
Apache CXF New Directions in IntegrationDaniel Kulp
 
Advancio, Inc. Academy: Web Sevices, WCF & SOAPUI
Advancio, Inc. Academy: Web Sevices, WCF & SOAPUIAdvancio, Inc. Academy: Web Sevices, WCF & SOAPUI
Advancio, Inc. Academy: Web Sevices, WCF & SOAPUIAdvancio
 
Scalable Web Architectures and Infrastructure
Scalable Web Architectures and InfrastructureScalable Web Architectures and Infrastructure
Scalable Web Architectures and Infrastructuregeorge.james
 
The experiences of migrating a large scale, high performance healthcare network
The experiences of migrating a large scale, high performance healthcare networkThe experiences of migrating a large scale, high performance healthcare network
The experiences of migrating a large scale, high performance healthcare networkgeorge.james
 

Mais procurados (20)

Introduction to WCF
Introduction to WCFIntroduction to WCF
Introduction to WCF
 
REST and ASP.NET Web API (Milan)
REST and ASP.NET Web API (Milan)REST and ASP.NET Web API (Milan)
REST and ASP.NET Web API (Milan)
 
Understanding Web services
Understanding Web servicesUnderstanding Web services
Understanding Web services
 
WCF And ASMX Web Services
WCF And ASMX Web ServicesWCF And ASMX Web Services
WCF And ASMX Web Services
 
WCF for begineers
WCF  for begineersWCF  for begineers
WCF for begineers
 
ASP.NET Web API and HTTP Fundamentals
ASP.NET Web API and HTTP FundamentalsASP.NET Web API and HTTP Fundamentals
ASP.NET Web API and HTTP Fundamentals
 
Windows Communication Foundation (WCF)
Windows Communication Foundation (WCF)Windows Communication Foundation (WCF)
Windows Communication Foundation (WCF)
 
Security Patterns with WSO2 ESB
Security Patterns with WSO2 ESBSecurity Patterns with WSO2 ESB
Security Patterns with WSO2 ESB
 
Rest vs Soap
Rest vs SoapRest vs Soap
Rest vs Soap
 
Apache CXF - New Features
Apache CXF - New FeaturesApache CXF - New Features
Apache CXF - New Features
 
WCF Fundamentals
WCF Fundamentals WCF Fundamentals
WCF Fundamentals
 
Understanding SOAP and REST basics and differences
Understanding SOAP and REST basics and differencesUnderstanding SOAP and REST basics and differences
Understanding SOAP and REST basics and differences
 
CXF 3.0, What's new?
CXF 3.0, What's new?CXF 3.0, What's new?
CXF 3.0, What's new?
 
Interoperability and Windows Communication Foundation (WCF) Overview
Interoperability and Windows Communication Foundation (WCF) OverviewInteroperability and Windows Communication Foundation (WCF) Overview
Interoperability and Windows Communication Foundation (WCF) Overview
 
Web Service
Web ServiceWeb Service
Web Service
 
Developing Revolutionary Web Applications using Comet and Ajax Push
Developing Revolutionary Web Applications using Comet and Ajax PushDeveloping Revolutionary Web Applications using Comet and Ajax Push
Developing Revolutionary Web Applications using Comet and Ajax Push
 
Apache CXF New Directions in Integration
Apache CXF New Directions in IntegrationApache CXF New Directions in Integration
Apache CXF New Directions in Integration
 
Advancio, Inc. Academy: Web Sevices, WCF & SOAPUI
Advancio, Inc. Academy: Web Sevices, WCF & SOAPUIAdvancio, Inc. Academy: Web Sevices, WCF & SOAPUI
Advancio, Inc. Academy: Web Sevices, WCF & SOAPUI
 
Scalable Web Architectures and Infrastructure
Scalable Web Architectures and InfrastructureScalable Web Architectures and Infrastructure
Scalable Web Architectures and Infrastructure
 
The experiences of migrating a large scale, high performance healthcare network
The experiences of migrating a large scale, high performance healthcare networkThe experiences of migrating a large scale, high performance healthcare network
The experiences of migrating a large scale, high performance healthcare network
 

Semelhante a Wcf rest api introduction

Web API or WCF - An Architectural Comparison
Web API or WCF - An Architectural ComparisonWeb API or WCF - An Architectural Comparison
Web API or WCF - An Architectural ComparisonAdnan Masood
 
Building+restful+webservice
Building+restful+webserviceBuilding+restful+webservice
Building+restful+webservicelonegunman
 
LAJUG Napster REST API
LAJUG Napster REST APILAJUG Napster REST API
LAJUG Napster REST APIstephenbhadran
 
Library Web Services for Discovery and Delivery of Scientific Information
Library Web Services for Discovery and Delivery of Scientific InformationLibrary Web Services for Discovery and Delivery of Scientific Information
Library Web Services for Discovery and Delivery of Scientific InformationRichard Akerman
 
.Net3.5 Overview
.Net3.5 Overview.Net3.5 Overview
.Net3.5 Overviewllangit
 
What's New in Confluent Platform 5.5
What's New in Confluent Platform 5.5What's New in Confluent Platform 5.5
What's New in Confluent Platform 5.5confluent
 
Building Restful Applications Using Php
Building Restful Applications Using PhpBuilding Restful Applications Using Php
Building Restful Applications Using PhpSudheer Satyanarayana
 
Ajp notes-chapter-06
Ajp notes-chapter-06Ajp notes-chapter-06
Ajp notes-chapter-06Ankit Dubey
 
Net35 Overview
Net35 OverviewNet35 Overview
Net35 Overviewllangit
 
Enterprise Software Architecture
Enterprise Software ArchitectureEnterprise Software Architecture
Enterprise Software Architecturerahmed_sct
 
WinRT and the Web: Keeping Windows Store Apps Alive and Connected
WinRT and the Web: Keeping Windows Store Apps Alive and ConnectedWinRT and the Web: Keeping Windows Store Apps Alive and Connected
WinRT and the Web: Keeping Windows Store Apps Alive and ConnectedJeremy Likness
 
GlueCon 2018: Are REST APIs Still Relevant Today?
GlueCon 2018: Are REST APIs Still Relevant Today?GlueCon 2018: Are REST APIs Still Relevant Today?
GlueCon 2018: Are REST APIs Still Relevant Today?LaunchAny
 
REST & RESTful APIs: The State of Confusion
REST & RESTful APIs: The State of ConfusionREST & RESTful APIs: The State of Confusion
REST & RESTful APIs: The State of ConfusionGlenn Antoine
 

Semelhante a Wcf rest api introduction (20)

Web API or WCF - An Architectural Comparison
Web API or WCF - An Architectural ComparisonWeb API or WCF - An Architectural Comparison
Web API or WCF - An Architectural Comparison
 
Building+restful+webservice
Building+restful+webserviceBuilding+restful+webservice
Building+restful+webservice
 
Getting Started with API Management
Getting Started with API ManagementGetting Started with API Management
Getting Started with API Management
 
LAJUG Napster REST API
LAJUG Napster REST APILAJUG Napster REST API
LAJUG Napster REST API
 
ASP.NET WEB API Training
ASP.NET WEB API TrainingASP.NET WEB API Training
ASP.NET WEB API Training
 
11 asp.net web api
11 asp.net web api11 asp.net web api
11 asp.net web api
 
sMash_for_zOS-users
sMash_for_zOS-userssMash_for_zOS-users
sMash_for_zOS-users
 
Library Web Services for Discovery and Delivery of Scientific Information
Library Web Services for Discovery and Delivery of Scientific InformationLibrary Web Services for Discovery and Delivery of Scientific Information
Library Web Services for Discovery and Delivery of Scientific Information
 
.Net3.5 Overview
.Net3.5 Overview.Net3.5 Overview
.Net3.5 Overview
 
Why do you need REST
Why do you need RESTWhy do you need REST
Why do you need REST
 
What's New in Confluent Platform 5.5
What's New in Confluent Platform 5.5What's New in Confluent Platform 5.5
What's New in Confluent Platform 5.5
 
Building Restful Applications Using Php
Building Restful Applications Using PhpBuilding Restful Applications Using Php
Building Restful Applications Using Php
 
Ajp notes-chapter-06
Ajp notes-chapter-06Ajp notes-chapter-06
Ajp notes-chapter-06
 
Marata
MarataMarata
Marata
 
Net35 Overview
Net35 OverviewNet35 Overview
Net35 Overview
 
Enterprise Software Architecture
Enterprise Software ArchitectureEnterprise Software Architecture
Enterprise Software Architecture
 
WinRT and the Web: Keeping Windows Store Apps Alive and Connected
WinRT and the Web: Keeping Windows Store Apps Alive and ConnectedWinRT and the Web: Keeping Windows Store Apps Alive and Connected
WinRT and the Web: Keeping Windows Store Apps Alive and Connected
 
GlueCon 2018: Are REST APIs Still Relevant Today?
GlueCon 2018: Are REST APIs Still Relevant Today?GlueCon 2018: Are REST APIs Still Relevant Today?
GlueCon 2018: Are REST APIs Still Relevant Today?
 
REST & RESTful APIs: The State of Confusion
REST & RESTful APIs: The State of ConfusionREST & RESTful APIs: The State of Confusion
REST & RESTful APIs: The State of Confusion
 
RESTful WCF Services
RESTful WCF ServicesRESTful WCF Services
RESTful WCF Services
 

Mais de Himanshu Desai

Service fabric overview
Service fabric overviewService fabric overview
Service fabric overviewHimanshu Desai
 
App insights and testhub
App insights and testhubApp insights and testhub
App insights and testhubHimanshu Desai
 
Cross Platform Devops with Visual Studio Team Services
Cross Platform Devops with Visual Studio Team ServicesCross Platform Devops with Visual Studio Team Services
Cross Platform Devops with Visual Studio Team ServicesHimanshu Desai
 
Visual Studio Team Services Release Management Overview
Visual Studio Team Services Release Management OverviewVisual Studio Team Services Release Management Overview
Visual Studio Team Services Release Management OverviewHimanshu Desai
 
Visual Studio 2015 / Visual Studio Team Services Overview
Visual Studio 2015 / Visual Studio Team Services OverviewVisual Studio 2015 / Visual Studio Team Services Overview
Visual Studio 2015 / Visual Studio Team Services OverviewHimanshu Desai
 
Multitenancy Options on Azure
Multitenancy Options on AzureMultitenancy Options on Azure
Multitenancy Options on AzureHimanshu Desai
 
No SQL : Which way to go? Presented at DDDMelbourne 2015
No SQL : Which way to go?  Presented at DDDMelbourne 2015No SQL : Which way to go?  Presented at DDDMelbourne 2015
No SQL : Which way to go? Presented at DDDMelbourne 2015Himanshu Desai
 
How to Improve agile team efficiency
How to Improve agile team efficiencyHow to Improve agile team efficiency
How to Improve agile team efficiencyHimanshu Desai
 
Storage Options on Windows Azure
Storage Options on Windows AzureStorage Options on Windows Azure
Storage Options on Windows AzureHimanshu Desai
 
Web api scalability and performance
Web api scalability and performanceWeb api scalability and performance
Web api scalability and performanceHimanshu Desai
 
ASP.NET Web API O to 100
ASP.NET Web API O to 100ASP.NET Web API O to 100
ASP.NET Web API O to 100Himanshu Desai
 

Mais de Himanshu Desai (12)

Service fabric overview
Service fabric overviewService fabric overview
Service fabric overview
 
App insights and testhub
App insights and testhubApp insights and testhub
App insights and testhub
 
Devops
Devops Devops
Devops
 
Cross Platform Devops with Visual Studio Team Services
Cross Platform Devops with Visual Studio Team ServicesCross Platform Devops with Visual Studio Team Services
Cross Platform Devops with Visual Studio Team Services
 
Visual Studio Team Services Release Management Overview
Visual Studio Team Services Release Management OverviewVisual Studio Team Services Release Management Overview
Visual Studio Team Services Release Management Overview
 
Visual Studio 2015 / Visual Studio Team Services Overview
Visual Studio 2015 / Visual Studio Team Services OverviewVisual Studio 2015 / Visual Studio Team Services Overview
Visual Studio 2015 / Visual Studio Team Services Overview
 
Multitenancy Options on Azure
Multitenancy Options on AzureMultitenancy Options on Azure
Multitenancy Options on Azure
 
No SQL : Which way to go? Presented at DDDMelbourne 2015
No SQL : Which way to go?  Presented at DDDMelbourne 2015No SQL : Which way to go?  Presented at DDDMelbourne 2015
No SQL : Which way to go? Presented at DDDMelbourne 2015
 
How to Improve agile team efficiency
How to Improve agile team efficiencyHow to Improve agile team efficiency
How to Improve agile team efficiency
 
Storage Options on Windows Azure
Storage Options on Windows AzureStorage Options on Windows Azure
Storage Options on Windows Azure
 
Web api scalability and performance
Web api scalability and performanceWeb api scalability and performance
Web api scalability and performance
 
ASP.NET Web API O to 100
ASP.NET Web API O to 100ASP.NET Web API O to 100
ASP.NET Web API O to 100
 

Último

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 

Último (20)

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 

Wcf rest api introduction

  • 1. Doing REST with new WCF Web API Himanshu Desai Senior Consultant - Readify Discover. Master. Influence.
  • 2.
  • 3. Resource Oriented Architecture 3 Discover. Master. Influence.
  • 4. Current Industry Trends A Move to cloud-based computing A Migration away from SOAP More browser based Apps Adoption of REST Other standards like OAuth, WebSockets Discover. Master. Influence. 4
  • 5. What is REST? Representational State Transfer Idea floated by Roy Fielding Architecture Style (not a protocol or spec and it is not restricted to HTTP) Discover. Master. Influence. 5
  • 6. REST Constraints Client - server Stateless Cacheable Layered Uniform interface Discover. Master. Influence. 6
  • 7. REST Constraints Uniform interface Client - server Stateless Cacheable Layered Discover. Master. Influence. 7
  • 8. REST Benefits Scalability of component interactions Evolvability Reach Intermediary components to reduce latency, enforce security and encapsulate legacy systems Discover. Master. Influence. 8
  • 9. RESTful Services-1 A Traditional RPC based Service Moving from Verb to Noun Users Bookmarks Discover. Master. Influence. 9
  • 10. RESTful Services-2 Designing the Uri Template An invidual user account An individual bookmark A user’s collection of private/public bookmark Collection of all public bookmarks Applying the Uniform HTTP Interface Discover. Master. Influence. 10
  • 11. RESTful Services-2 11 Discover. Master. Influence.
  • 12. RESTful Services-3 Designing Resource Representation Discover. Master. Influence. 12
  • 13. RESTful Services-4 Designing Resource Representation <User> < Email>aaron@pluralsight.com</Email> <Name>Aaron Skonnard</Name> </User> Supporting Alternate Representation ?tag={tag}&format=json {username}?tag={tag}&format=json users/{username}?format=json users/{username}/profile?format=json Security Consideration Providing Resource Metadata Avoiding RPC Tendencies 13 Discover. Master. Influence.
  • 14. GET Example REQUEST GET /index.html Host: www.example.com RESPONSE HTTP/1.1 200 OK Etag: „3f80f-1b6-3e1cb03b” Content-Type: text/html; charset=UTF-8 l Discover. Master. Influence. 14
  • 15. POST Example POST /order HTTP/1.1 Host: amazon.net Content-Type: application/xml Content-Length: 216 <order xmlns="http://schemas.amazon.net/order"> <drink>latte</drink> </order> 201 Created Location: http://amazon.net/order/1234 ContentType: application/xml <order xmlns="http://schemas.amazon.net/order"> ... l Discover. Master. Influence. 15
  • 16. PUT Example PUT /payment/1234 HTTP/1.1 Host: amazon.net Content-Type: application/xml Content-Length: 216 <payment xmlns="http://schemas.amazon.net/order"> <cardNumber>...</cardNumber> </order> 200 OK ContentType: application/vnd.amazon+xmlxmlns="http://schemas.amazon.net/order"> <drink>Latte</drink> <link href=„payment/1234” rel=„http://relations.amazon.net/payment”/> </order> l Discover. Master. Influence. 16
  • 17. Central Principle Existence of resource which is referenced with a global identifier (e.g. a image, document etc.) Communicate via a standard interface (e.g. HTTP) Exchange representations of these resources (HTML.XML,JSON etc.) Discover. Master. Influence. 17
  • 18. RESTful web services Collection of data Base URI e.g. http://ebay.com/items/1 Internet Media type of the data supported by the web service. (JSON,XML etc.) Set of operation supported by the web service using HTTP methods (POST,GET,PUT or DELETE) Discover. Master. Influence. 18
  • 19. REST Using WCF Discover. Master. Influence.
  • 20. Rest Support Comparison Discover. Master. Influence. 20
  • 21. WCF Web API HTTP is now a first class Content negotiation Automatic help pages Service Routes Integration with ASP.NET Caching Reach any client (Browser, Devices, Silverlight, Desktop) Discover. Master. Influence. 21
  • 22. Resource Architecture Op Handler2 Transport+Encoder Message Handler 1 Response Discover. Master. Influence. 22 Dispatcher GetById? GetById? Op Handler 3 Op Handler 4 Op Handler 1 Message Handler 2 Request
  • 23. Components Content Negotiation Central Configuration (Fluent API) Http Classes Operation Handler Factory Error Handler Message Handler Factory(Channel Level) Discover. Master. Influence. 23
  • 24.
  • 28. Content Negotiation Support for Multiple Formats including an add-in model if you want xml ,it gives xml and if you want Json, it gives Json Discover. Master. Influence. 25
  • 29. Demo Content Negotiation Discover. Master. Influence.
  • 30. Operation Handler Factory Responsible for creating new instances of Media Type Formatters and Operation Handlers. Media Type Formatter Operation Handler - an abstract base class used to create transfer a set of input into a set of output Discover. Master. Influence. 27
  • 31. Operation Handler Factory Request Pipeline Response Pipeline Operation Handler Operation Handler Operation Handler Operation Handler Operation Handler Operation Handler Dispatch Discover. Master. Influence. 28
  • 32. Message Handler Factory Operation Message Handler4 Message Handler3 Message Handler 1 Message Handler2 Discover. Master. Influence. 29
  • 33. Query Composition Support for OData like query support http://localhost/AlbumService/albums?$Top=5 http://localhost/AlbumService/albums?$Top=5&$OrderBy=Title Discover. Master. Influence. 30
  • 34. Consuming RESTful Services Consuming with Javascript Consuming with WCF 31 Discover. Master. Influence.
  • 35. Consuming Web API with Javascript 32 Discover. Master. Influence.
  • 36. HttpClient Helps you access web resources using Linq var client = new HttpClient(address); var personQuery = client.CreateQuery<Person>(); var results = personQuery.ExecuteAsync().ContinueWith(p => { //Dosomething here }); Discover. Master. Influence. 33
  • 37. Demo Query Composition & HttpClient Discover. Master. Influence.

Notas do Editor

  1. http://msdn.microsoft.com/en-us/library/dd203052.aspx
  2. Representational State TransferIdea floated by Roy FieldingArchitectural Style (not a protocol or spec and it is not restricted to HTTP)ConceptREST-style architectures consist of clients and servers. Clients initiate requests to servers; servers process requests and return appropriate responses. Requests and responses are built around the transfer of representations of resources. A resource can be essentially any coherent and meaningful concept that may be addressed. A representation of a resource is typically a document that captures the current or intended state of a resource.At any particular time, a client can either be in transition between application states or &quot;at rest&quot;. A client in a rest state is able to interact with its user, but creates no load and consumes no per-client storage on the servers or on the network.The client begins sending requests when it is ready to make the transition to a new state. While one or more requests are outstanding, the client is considered to be in transition. The representation of each application state contains links that may be used next time the client chooses to initiate a new state transition.REST was initially described in the context of HTTP, but is not limited to that protocol. RESTful architectures can be based on other Application Layer protocols if they already provide a rich and uniform vocabulary for applications based on the transfer of meaningful representational state. RESTful applications maximize the use of the pre-existing, well-defined interface and other built-in capabilities provided by the chosen network protocol, and minimize the addition of new application-specific features on top of it.
  3. Evolvability In a RESTful system the entire infrastructure- including intermediaries such as load-balancers, caches, proxies etc. becomes participants in the communication.
  4. Evolvability In a RESTful system the entire infrastructure- including intermediaries such as load-balancers, caches, proxies etc. becomes participants in the communication.
  5. Evolvability In a RESTful system the entire infrastructure- including intermediaries such as load-balancers, caches, proxies etc. becomes participants in the communication.
  6. Evolvability In a RESTful system the entire infrastructure- including intermediaries such as load-balancers, caches, proxies etc. becomes participants in the communication.
  7. In 3.5 &amp; 4.0New Attributes (WebGet/WebInvoke)New Binding (WebHttpBinding)Routing, help pages etc.Partial Support for Content negotiationIn .NET 4, Out of box XML and Json were supported. If you need to support other types , you need to extent webcontenttypemapper.Service routes- provides compile time checking. Integrates with ASP.NET RoutingYou host service which is then available as a route.WCF Web APIHTTP is now a first class Content negotiationAutomatic help pagesService RoutesIntegration with ASP.NET CachingReach any client (Browser, Devices, Silverlight, Desktop)
  8. Service routes- provides compile time checking. Integrates with ASP.NET RoutingYou host service which is then available as a route.