SlideShare a Scribd company logo
© 2012 MPS Partners.. All rights
reserved.
Why do you need REST
June 27, 2013
Brown Bag presentation by: Mayank Srivastava
www.MayankSrivastava.com
Agenda
o Understanding REST
o REST Vs. SOAP
o Web API Vs. WCF
o Web API features.
3
Interaction over HTTP
4
Interaction over HTTP
5
What is SOAP?
• An XML info set based on messaging protocol.
• SOAP messages have an envelope, headers and a body
• Transport neutral “interoperable” model.
• RPC based development approach.
6
What is REST
• REST = Representational State Transfer –
As introduced by Roy Fielding in 2000
• REST is the architectural style for the Web, to building services hosted and
consumed over HTTP.
Uniform interface, HTTP Data formats & Content types, client-server, stateless, cacheable, scalable.
General Use of terms:
RESTful Service
 HTTP Service
 No SOAP
WEB API == HTTP Service == RESTful Service.
7
REST Vs. SOAP
• SOAP focuses on verbs (methods) while REST focuses on noun (resource)
SOAP:
.GetProduct()
.UpdateLocations()
.DeleteUser()
REST: (Uniform Interface HTTP verbs)
Product { }
Location { }
User { }
With SOAP you define custom operation that tunnel thru POST
SOAP is a message protocol where REST is an architectural design for the web
8
Why REST?
• Do you need transport neutrality?
• Do you need WS* features?
• Benefits of already developed Web features like caching and scalability.
• Basic SOAP is just like REST but without the benefits.
• Fewer code transition layers
• It is the standard for communication in the “cloud”.
• Universal interface that everyone understands.
9
Why REST?
What about security?
All the your Web application supports
• Token based
• Active directory
• OAuth 2.0
Client Server
Resource request 
 Redirect to credential challenge
Credentials 
 Links and tokens to access resource & access token
10
Universal interface that everyone understands.
Your RESTful Service
11
Example SOAP message over HTTP
POST http://wcftest.azurewebsites.net/Service1.svc HTTP/1.1
Content-Type: application/soap+xml; charset=utf-8; action="http://tempuri.org/IStockTicker/GetQuote"
Host: wcftest.azurewebsites.net
Content-Length: 168
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope">
<s:Body>
<GetQuote xmlns="http://tempuri.org/">
<stockTicker>MSFT</stockTicker>
</GetQuote>
</s:Body>
</s:Envelope>
</s:Envelope>
______________________________________________________________________________________________________________________
HTTP/1.0 200 OK
Content-Length: 187
Content-Type: application/soap+xml; charset=utf-8
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope">
<s:Body>
<GetQuoteResponse xmlns="http://tempuri.org/">
<GetQuoteResult>28.33</GetQuoteResult>
</GetQuoteResponse>
</s:Body>
</s:Envelope>
12
Example “RESTful” request/response
GET http://webapitest.azurewebsites.net/stocks?symbol=msft HTTP/1.1
Host: webapitest.azurewebsites.net
______________________________________________________________________________________________________________________
HTTP/1.0 200 OK
Content-Length: 5
Content-Type: application/json; charset=utf-8
33.12
13
Why SOAP
• SOAP interoperability is a requirement
• Non HTTP transports - TCP, UDP, Named Pipes, MSMQ, custom bindings
• WS-* based security.
14
Implementation Options
WCF
• WCF classic
• WCF Data Services
• WCF RIA Services
• WCF Web HTTP (aka WCF REST)
ASP.NET
• ASP.NET Web Services
• ASP.NET MVC
• ASP.NET Web API
• ASP.NET Web API OData
• ASP.NET SignalR
15
Recommendation:
WCF
• WCF classic
• WCF Data Services
• WCF RIA Services
• WCF Web HTTP (aka WCF REST)
ASP.NET
• ASP.NET Web Services
• ASP.NET MVC
• ASP.NET Web API
• ASP.NET Web API OData
• ASP.NET SignalR
For SOAP ------ WCF classic
For REST ------ ASP.NET WEB API
16
ASP.NET Web API (Code Demos)
• Simplicity
• Self Hosting
• Consuming from Server Side.
• Attribute routing - http://attributerouting.net/
• OData (emerging functionalities)
17
ASP.NET SignalR (Code Demos)
• Web socket based communication.
• Falls back to poll approach in the browser doesn’t support Web socket.
• http://signalr.net/
18
Questions?

More Related Content

PPTX
SOAP vs REST
PPTX
Web Services - A brief overview
PDF
SOAP vs REST
PPTX
Rest vs Soap
PPT
Soap vs. rest - which is right web service protocol for your need?
PPTX
Web services soap and rest by mandakini for TechGig
PPTX
Web service testing_final.pptx
PPT
Soap Vs Rest
SOAP vs REST
Web Services - A brief overview
SOAP vs REST
Rest vs Soap
Soap vs. rest - which is right web service protocol for your need?
Web services soap and rest by mandakini for TechGig
Web service testing_final.pptx
Soap Vs Rest

What's hot (19)

PPTX
Soap vs rest
PPTX
WCF Data Services - Bandung Charity Event - 2010
PDF
PPTX
REST and ASP.NET Web API (Milan)
PDF
Restful web services by Sreeni Inturi
PPTX
PPTX
An Overview of Web Services: SOAP and REST
PDF
Web Services Tutorial
PPTX
Node Session - 3
PPT
Soap and Rest
PPTX
PPTX
Intro to Web Sockets
PDF
Wcf remaining
PDF
Understanding SOAP and REST basics and differences
PDF
Web Services
PPTX
Office Track: Information Protection and Control in Exchange Online/On Premis...
PPTX
Intoduction to web services
PPTX
Javaee7 jsr356-websocket
PDF
Web services
Soap vs rest
WCF Data Services - Bandung Charity Event - 2010
REST and ASP.NET Web API (Milan)
Restful web services by Sreeni Inturi
An Overview of Web Services: SOAP and REST
Web Services Tutorial
Node Session - 3
Soap and Rest
Intro to Web Sockets
Wcf remaining
Understanding SOAP and REST basics and differences
Web Services
Office Track: Information Protection and Control in Exchange Online/On Premis...
Intoduction to web services
Javaee7 jsr356-websocket
Web services
Ad

Viewers also liked (10)

PDF
Java Script Best Practices
PDF
React.js in real world apps.
PDF
Angular 2 overview
PDF
Angular js - 10 reasons to choose angularjs
PPTX
A Brief Introduction to React.js
PPT
React js
PDF
Building Universal Applications with Angular 2
PDF
React JS and why it's awesome
PPTX
PPTX
Rethinking Best Practices
Java Script Best Practices
React.js in real world apps.
Angular 2 overview
Angular js - 10 reasons to choose angularjs
A Brief Introduction to React.js
React js
Building Universal Applications with Angular 2
React JS and why it's awesome
Rethinking Best Practices
Ad

Similar to Why do you need REST (20)

PPTX
PPTX
Mini-Training: Let's have a rest
PDF
zendframework2 restful
PPTX
Web Programming
PPTX
Time to REST: testing web services
PDF
Exchange of data over internet using web service(e.g., soap and rest) in SAS ...
PPTX
REST & RESTful Web Services
PDF
Restful web-services
PPT
REST vs WS-*: Myths Facts and Lies
PPTX
Restful webservices
PPTX
PPT
REST Introduction.ppt
PPTX
Wcf rest api introduction
PDF
Designing RESTful APIs
PPTX
web programming
PPTX
Unerstanding and Using RESTful APIs
PPTX
LAJUG Napster REST API
PPTX
Understanding and Using Rest APIs (SocialDevCamp Chicago 2009)
PPTX
ASP.NET Mvc 4 web api
PPTX
Beginner's Guide REST Basics - 101 by Smartbear
Mini-Training: Let's have a rest
zendframework2 restful
Web Programming
Time to REST: testing web services
Exchange of data over internet using web service(e.g., soap and rest) in SAS ...
REST & RESTful Web Services
Restful web-services
REST vs WS-*: Myths Facts and Lies
Restful webservices
REST Introduction.ppt
Wcf rest api introduction
Designing RESTful APIs
web programming
Unerstanding and Using RESTful APIs
LAJUG Napster REST API
Understanding and Using Rest APIs (SocialDevCamp Chicago 2009)
ASP.NET Mvc 4 web api
Beginner's Guide REST Basics - 101 by Smartbear

More from Mayank Srivastava (8)

PDF
Microsoft DevOps Journey
PDF
CNUG - Effective Data Visualization
PDF
CNUG - Getting started on IoT Devices & Solutions using Windows 10 & Microsof...
PDF
CNUG TDD June 2014
PDF
CNUG ASP.NET MVC 4 – New Features
PDF
Targeting Mobile Platform with MVC 4.0
PDF
Introduction to HTML5
PDF
Introduction to ASP.NET MVC
Microsoft DevOps Journey
CNUG - Effective Data Visualization
CNUG - Getting started on IoT Devices & Solutions using Windows 10 & Microsof...
CNUG TDD June 2014
CNUG ASP.NET MVC 4 – New Features
Targeting Mobile Platform with MVC 4.0
Introduction to HTML5
Introduction to ASP.NET MVC

Recently uploaded (20)

PPTX
Spectroscopy.pptx food analysis technology
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
A comparative study of natural language inference in Swahili using monolingua...
PPTX
Tartificialntelligence_presentation.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Machine learning based COVID-19 study performance prediction
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Mushroom cultivation and it's methods.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
OMC Textile Division Presentation 2021.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Unlocking AI with Model Context Protocol (MCP)
Spectroscopy.pptx food analysis technology
Mobile App Security Testing_ A Comprehensive Guide.pdf
gpt5_lecture_notes_comprehensive_20250812015547.pdf
A comparative study of natural language inference in Swahili using monolingua...
Tartificialntelligence_presentation.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Machine learning based COVID-19 study performance prediction
Univ-Connecticut-ChatGPT-Presentaion.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Mushroom cultivation and it's methods.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Heart disease approach using modified random forest and particle swarm optimi...
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Building Integrated photovoltaic BIPV_UPV.pdf
OMC Textile Division Presentation 2021.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Spectral efficient network and resource selection model in 5G networks
Unlocking AI with Model Context Protocol (MCP)

Why do you need REST

  • 1. © 2012 MPS Partners.. All rights reserved. Why do you need REST June 27, 2013 Brown Bag presentation by: Mayank Srivastava www.MayankSrivastava.com
  • 2. Agenda o Understanding REST o REST Vs. SOAP o Web API Vs. WCF o Web API features.
  • 5. 5 What is SOAP? • An XML info set based on messaging protocol. • SOAP messages have an envelope, headers and a body • Transport neutral “interoperable” model. • RPC based development approach.
  • 6. 6 What is REST • REST = Representational State Transfer – As introduced by Roy Fielding in 2000 • REST is the architectural style for the Web, to building services hosted and consumed over HTTP. Uniform interface, HTTP Data formats & Content types, client-server, stateless, cacheable, scalable. General Use of terms: RESTful Service  HTTP Service  No SOAP WEB API == HTTP Service == RESTful Service.
  • 7. 7 REST Vs. SOAP • SOAP focuses on verbs (methods) while REST focuses on noun (resource) SOAP: .GetProduct() .UpdateLocations() .DeleteUser() REST: (Uniform Interface HTTP verbs) Product { } Location { } User { } With SOAP you define custom operation that tunnel thru POST SOAP is a message protocol where REST is an architectural design for the web
  • 8. 8 Why REST? • Do you need transport neutrality? • Do you need WS* features? • Benefits of already developed Web features like caching and scalability. • Basic SOAP is just like REST but without the benefits. • Fewer code transition layers • It is the standard for communication in the “cloud”. • Universal interface that everyone understands.
  • 9. 9 Why REST? What about security? All the your Web application supports • Token based • Active directory • OAuth 2.0 Client Server Resource request   Redirect to credential challenge Credentials   Links and tokens to access resource & access token
  • 10. 10 Universal interface that everyone understands. Your RESTful Service
  • 11. 11 Example SOAP message over HTTP POST http://wcftest.azurewebsites.net/Service1.svc HTTP/1.1 Content-Type: application/soap+xml; charset=utf-8; action="http://tempuri.org/IStockTicker/GetQuote" Host: wcftest.azurewebsites.net Content-Length: 168 <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope"> <s:Body> <GetQuote xmlns="http://tempuri.org/"> <stockTicker>MSFT</stockTicker> </GetQuote> </s:Body> </s:Envelope> </s:Envelope> ______________________________________________________________________________________________________________________ HTTP/1.0 200 OK Content-Length: 187 Content-Type: application/soap+xml; charset=utf-8 <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope"> <s:Body> <GetQuoteResponse xmlns="http://tempuri.org/"> <GetQuoteResult>28.33</GetQuoteResult> </GetQuoteResponse> </s:Body> </s:Envelope>
  • 12. 12 Example “RESTful” request/response GET http://webapitest.azurewebsites.net/stocks?symbol=msft HTTP/1.1 Host: webapitest.azurewebsites.net ______________________________________________________________________________________________________________________ HTTP/1.0 200 OK Content-Length: 5 Content-Type: application/json; charset=utf-8 33.12
  • 13. 13 Why SOAP • SOAP interoperability is a requirement • Non HTTP transports - TCP, UDP, Named Pipes, MSMQ, custom bindings • WS-* based security.
  • 14. 14 Implementation Options WCF • WCF classic • WCF Data Services • WCF RIA Services • WCF Web HTTP (aka WCF REST) ASP.NET • ASP.NET Web Services • ASP.NET MVC • ASP.NET Web API • ASP.NET Web API OData • ASP.NET SignalR
  • 15. 15 Recommendation: WCF • WCF classic • WCF Data Services • WCF RIA Services • WCF Web HTTP (aka WCF REST) ASP.NET • ASP.NET Web Services • ASP.NET MVC • ASP.NET Web API • ASP.NET Web API OData • ASP.NET SignalR For SOAP ------ WCF classic For REST ------ ASP.NET WEB API
  • 16. 16 ASP.NET Web API (Code Demos) • Simplicity • Self Hosting • Consuming from Server Side. • Attribute routing - http://attributerouting.net/ • OData (emerging functionalities)
  • 17. 17 ASP.NET SignalR (Code Demos) • Web socket based communication. • Falls back to poll approach in the browser doesn’t support Web socket. • http://signalr.net/