SlideShare a Scribd company logo
Overview of REST Service
and ASP.NET WEB API
From: Pankaj Bajaj
Agenda
• Why Services ?
• Type of Services ?
• What is REST ?
• Features of REST
• Web API Overview
• SOAP vs. REST
Continuous learning is the minimum requirement for success in any field.
Why we need Services
Continuous learning is the minimum requirement for success in any field.
Service & SOA
Service ?
o A Service is a self-contained unit of software that performs a specific task.
o A Service is a reusable component.
o A Service changes business data from one state to another.
o If you can describe a component in WSDL, it is a Service.
SOA is a software architecture model
in which business functionality are logically grouped and encapsulated into
• self contained,
• distinct and reusable units called services that
• represent a high level business concept
• can be distributed over a network
• can be reused to create new business applications
• contain contract with specification of the purpose, functionality,
interfaces constraints, usage of the business functional
Continuous learning is the minimum requirement for success in any field.
Type of Services
Big Web Services:
Big web services are based on SOAP standard and often contain
a WSDL to describe the interface that the web service offers. The
details of the contract may include messages, operations,
bindings, and the location of the web service.
A- Address
B- Binding
C-Contract
REST Services:
RESTful web services are based on the way how web works. REST
is neither a standard nor a protocol. It is just an architectural style
like say for example client-server architecture. It’s based on HTTP.
Continuous learning is the minimum requirement for success in any field.
What is REST
REST: Representational State Transfer
“REST is an architectural style not an protocol.”
The term representational state transfer was introduced and
defined in year 2000 by Roy Fielding during his research in PhD
programme. REST has been applied to describe desired web
architecture, to identify existing problems, to compare
alternative solutions and to ensure that protocol extensions
would not violate the core constraints that make the web
successful.
Continuous learning is the minimum requirement for success in any field.
Resource Oriented Architecture (ROA)
An Entity, Item or just a thing you want to expose is a Resource
Resource-oriented architecture (ROA) is a style of software architecture
and programming paradigm for designing and developing software in
the form of resources with "RESTful" interfaces. These resources are
software components (discrete pieces of code and/or data structures)
which can be reused for different purposes.
Features of ROA:
• Addressability: Addressable applications expose a URI for every
piece of information they might conceivably serve.
• Statelessness : Statelessness means that every HTTP request happens
in complete isolation. The server never relies on information from
previous requests.
.
• A uniform interface : Resource should be called using an HTTP Verbs
(Get POST,PUT,DELETE)
Continuous learning is the minimum requirement for success in any field.
Features of REST
• Platform-independent (you don't care if the server is Unix, the
client is a Mac, or anything else)
• Language-independent (C# can talk to Java, etc.)
• HTTP Based
• Can easily be used in the presence of firewalls.
• Limited bandwidth and resources
• Totally stateless operations
• Caching
• Reach More Clients(Mobile , Tablet etc.)
• Lightweight hosting and scalable with Cloud
Continuous learning is the minimum requirement for success in any field.
ASP.net WEB API
Continuous learning is the minimum requirement for success in any field.
ASP.NET Web API
ASP.Net Web API is a framework that makes it easy to
build HTTP Services that reach a broad range of
clients, including browsers and mobile devices. It's an
ideal platform for building RESTFul Services on .Net
Framework
Continuous learning is the minimum requirement for success in any field.
Features of WEB API
• Strong Support for URL Routing to produce clean URLs using
familiar MVC style routing semantics
• Content Negotiation based on Accept headers for request
and response serialization
• Support for a host of supported output formats including JSON,
XML, ATOM
• ODATA Support
• Strong default support for REST semantics
• Very extensible, based on MVC like extensibility model of
Formatters and Filters
• Self-hostable in non-Web applications
• Testable using testing concepts similar to MVC
Continuous learning is the minimum requirement for success in any field.
HTTP Verbs
• GET
This is used to retrieve resourceresources.
• POST
This is used to add new resource.
• PUT
This is used to update resource.
• DELETE
This is used to delete resource.
Continuous learning is the minimum requirement for success in any field.
SOAP vs. REST
Continuous learning is the minimum requirement for success in any field.
SOAP Features
• Asynchronous processing and invocation;
• Formal contracts;
• Stateful operations
• Supports Messaging Pattern
Continuous learning is the minimum requirement for success in any field.
SOAP vs. REST
Continuous learning is the minimum requirement for success in any field.
SOAP REST
In SOAP along with data a lot of
other meta data also needs to get
transferred with each request and
response. This makes the payload
heavy even for small data
only the data will be traveling to and
fro from the server because the
capabilities of the service are
mapped to the URIs and protocols
In SOAP there is need to create the
proxy at client side. These proxies
will do the marshaling and un-
marshaling of SOAP WSDL and
make the communication between
the application and the web service
possible. The problem with this
proxy is that if the service is updated
and the proxy on the client is not
then the application might behave
incorrectly
there is no need to have a proxy at
the client end because its only data
that is coming and the application
can directly receive and process the
data
SOAP vs. REST
Continuous learning is the minimum requirement for success in any field.
Usage
SOAP REST
When designing an application of
service oriented architecture which
interconnects many systems and uses
many transport channels, it is better to
use SOAP.
When we plan to design an
application to be used exclusively on
the web, and also when we need a
quick client integration.
Complex Applications which need
different kind of bindings and
protocols
Simple applications which major
depends on CRUD operations.
Continuous learning is the minimum requirement for success in any field.
ASP.Net Web API vs. WCF
Feature ASP.Net Web API WCF
Transport Channel HTTP(s) TCP, UDP, MSMQ, NamedPipes,
HTTP(s), Custom
Protocol HTTP WS-*
Types CLR Types DataContract
Message Format Text (xml, json) SOAP+XML
Service Interface HTTPMethod, URLPattern Service Contract
State Management Stateless Stateless with Per Call
Cache Built-n to HTTP Prefer
application control
Handled by application
Error Handling Exceptions, HTTP Status
codes filters
Faults, Behaviors
Hosting IIS, Self Host IIS, Self Host
Client IApiExplorer
Shared Libraries
Proxy Class
Shared Libraries
Continuous learning is the minimum requirement for success in any field.
WCF REST Service vs. ASP.net Web API
WCF REST Service ASP.NET Web API
Service => Web API controller
Operation => Action
Service contract => n/a
Endpoint => n/a
URI Template => ASP.NET Routing
Message handlers => Same
Formatters => Same
Operation handlers => Filters, model binders
Continuous learning is the minimum requirement for success in any field.
• No Metadata
• Only HTTP Security
• Complexity kills
Continuous learning is the minimum requirement for success in any field.
Disadvantage of REST

More Related Content

What's hot (20)

PDF
What is REST API? REST API Concepts and Examples | Edureka
Edureka!
 
PPTX
An Introduction To REST API
Aniruddh Bhilvare
 
PPTX
introduction about REST API
AmilaSilva13
 
PDF
Spring Framework - MVC
Dzmitry Naskou
 
PPTX
Rest API
Rohana K Amarakoon
 
PPTX
Soap web service
NITT, KAMK
 
PPT
RESTful services
gouthamrv
 
PPTX
Restful web services ppt
OECLIB Odisha Electronics Control Library
 
PPTX
REST API Design & Development
Ashok Pundit
 
PPTX
API Presentation
nityakulkarni
 
PPTX
REST & RESTful Web Services
Halil Burak Cetinkaya
 
PPSX
Rest api standards and best practices
Ankita Mahajan
 
PDF
Lets make a better react form
Yao Nien Chung
 
PPTX
Introduction to GraphQL
Rodrigo Prates
 
PDF
Server Side VS Client Side
Code Boxx
 
PPTX
The RabbitMQ Message Broker
Martin Toshev
 
PPTX
What Is Express JS?
Simplilearn
 
PPTX
An intro to GraphQL
valuebound
 
PDF
GraphQL
Joel Corrêa
 
PPT
Intro to web services
Neil Ghosh
 
What is REST API? REST API Concepts and Examples | Edureka
Edureka!
 
An Introduction To REST API
Aniruddh Bhilvare
 
introduction about REST API
AmilaSilva13
 
Spring Framework - MVC
Dzmitry Naskou
 
Soap web service
NITT, KAMK
 
RESTful services
gouthamrv
 
REST API Design & Development
Ashok Pundit
 
API Presentation
nityakulkarni
 
REST & RESTful Web Services
Halil Burak Cetinkaya
 
Rest api standards and best practices
Ankita Mahajan
 
Lets make a better react form
Yao Nien Chung
 
Introduction to GraphQL
Rodrigo Prates
 
Server Side VS Client Side
Code Boxx
 
The RabbitMQ Message Broker
Martin Toshev
 
What Is Express JS?
Simplilearn
 
An intro to GraphQL
valuebound
 
GraphQL
Joel Corrêa
 
Intro to web services
Neil Ghosh
 

Viewers also liked (20)

PDF
C# ASP.NET WEB API APPLICATION DEVELOPMENT
Dr. Awase Khirni Syed
 
PPTX
ASP.NET WEB API
Thang Chung
 
PPTX
Web API or WCF - An Architectural Comparison
Adnan Masood
 
PPT
Excellent rest using asp.net web api
Maurice De Beijer [MVP]
 
PPTX
The ASP.NET Web API for Beginners
Kevin Hazzard
 
PPTX
REST and ASP.NET Web API (Tunisia)
Jef Claes
 
PPTX
ASP.NET Web API
habib_786
 
DOC
WCF tutorial
Abhi Arya
 
PPTX
The Full Power of ASP.NET Web API
Eyal Vardi
 
PPTX
ASP.NET Mvc 4 web api
Tiago Knoch
 
PPTX
ASP.NET Web API and HTTP Fundamentals
Ido Flatow
 
PPTX
Windows Communication Foundation (WCF)
Betclic Everest Group Tech Team
 
PPTX
Colin Bowern - The Not So Scary Side Of Asp.Net – Model View Controller In Th...
Refresh Events
 
PPT
Jonathan Dunn - Talking You Down from the Bleeding Edge
Refresh Events
 
PPTX
Excellent rest met de web api
Maurice De Beijer [MVP]
 
PPTX
Treeview listview
Amandeep Kaur
 
PPTX
Cloud Based Enterprise Apps using Everlive
Dhananjay Kumar
 
PPTX
Glance at Visual Studio 2013 ASP.NET and Web tools 2013
Shravan Kumar Kasagoni
 
PDF
Ankoder System Architecture
Rex Chung
 
PPTX
REST != WebAPI
Dan (Danut) Prisacaru
 
C# ASP.NET WEB API APPLICATION DEVELOPMENT
Dr. Awase Khirni Syed
 
ASP.NET WEB API
Thang Chung
 
Web API or WCF - An Architectural Comparison
Adnan Masood
 
Excellent rest using asp.net web api
Maurice De Beijer [MVP]
 
The ASP.NET Web API for Beginners
Kevin Hazzard
 
REST and ASP.NET Web API (Tunisia)
Jef Claes
 
ASP.NET Web API
habib_786
 
WCF tutorial
Abhi Arya
 
The Full Power of ASP.NET Web API
Eyal Vardi
 
ASP.NET Mvc 4 web api
Tiago Knoch
 
ASP.NET Web API and HTTP Fundamentals
Ido Flatow
 
Windows Communication Foundation (WCF)
Betclic Everest Group Tech Team
 
Colin Bowern - The Not So Scary Side Of Asp.Net – Model View Controller In Th...
Refresh Events
 
Jonathan Dunn - Talking You Down from the Bleeding Edge
Refresh Events
 
Excellent rest met de web api
Maurice De Beijer [MVP]
 
Treeview listview
Amandeep Kaur
 
Cloud Based Enterprise Apps using Everlive
Dhananjay Kumar
 
Glance at Visual Studio 2013 ASP.NET and Web tools 2013
Shravan Kumar Kasagoni
 
Ankoder System Architecture
Rex Chung
 
REST != WebAPI
Dan (Danut) Prisacaru
 
Ad

Similar to Overview of Rest Service and ASP.NET WEB API (20)

PPTX
RESTful APIs in .NET
Greg Sohl
 
PDF
Enterprise REST
Ganesh Prasad
 
PDF
Best practices and advantages of REST APIs
Aparna Sharma
 
PPT
REST Introduction.ppt
KGSCSEPSGCT
 
PDF
API.pdf
KarthigeyanS13
 
PDF
Application.pdf
KarthigeyanS13
 
PPTX
Mini-Training: Let's have a rest
Betclic Everest Group Tech Team
 
PDF
What is REST?
Saeid Zebardast
 
PDF
Rest API Interview Questions PDF By ScholarHat
Scholarhat
 
PDF
Restful web-services
rporwal
 
PPTX
Introduction to webservices
Gagandeep Singh
 
PDF
Modern REST API design principles and rules.pdf
Aparna Sharma
 
DOCX
Fundamental essentials for api design
Michael James Cyrus
 
DOCX
Fundamental essentials for api design
Michael James Cyrus
 
DOCX
Fundamental Essentials for API Design
Michael James Cyrus
 
PPTX
Best Practices in Api Design
Muhammad Aamir ...
 
PPT
ROA.ppt
KGSCSEPSGCT
 
PPTX
What is an API?
Muhammad Zuhdi
 
PPTX
REST Presentation
Sarwajit Kumar
 
PPTX
REST & SOAP.pptx
ZawLwinTun2
 
RESTful APIs in .NET
Greg Sohl
 
Enterprise REST
Ganesh Prasad
 
Best practices and advantages of REST APIs
Aparna Sharma
 
REST Introduction.ppt
KGSCSEPSGCT
 
Application.pdf
KarthigeyanS13
 
Mini-Training: Let's have a rest
Betclic Everest Group Tech Team
 
What is REST?
Saeid Zebardast
 
Rest API Interview Questions PDF By ScholarHat
Scholarhat
 
Restful web-services
rporwal
 
Introduction to webservices
Gagandeep Singh
 
Modern REST API design principles and rules.pdf
Aparna Sharma
 
Fundamental essentials for api design
Michael James Cyrus
 
Fundamental essentials for api design
Michael James Cyrus
 
Fundamental Essentials for API Design
Michael James Cyrus
 
Best Practices in Api Design
Muhammad Aamir ...
 
ROA.ppt
KGSCSEPSGCT
 
What is an API?
Muhammad Zuhdi
 
REST Presentation
Sarwajit Kumar
 
REST & SOAP.pptx
ZawLwinTun2
 
Ad

Recently uploaded (20)

PPTX
The Role of a PHP Development Company in Modern Web Development
SEO Company for School in Delhi NCR
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PPTX
Engineering the Java Web Application (MVC)
abhishekoza1981
 
PDF
Efficient, Automated Claims Processing Software for Insurers
Insurance Tech Services
 
PPTX
A Complete Guide to Salesforce SMS Integrations Build Scalable Messaging With...
360 SMS APP
 
PDF
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
Safe Software
 
PPTX
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
PDF
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
DOCX
Import Data Form Excel to Tally Services
Tally xperts
 
PDF
Understanding the Need for Systemic Change in Open Source Through Intersectio...
Imma Valls Bernaus
 
PDF
Beyond Binaries: Understanding Diversity and Allyship in a Global Workplace -...
Imma Valls Bernaus
 
PDF
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
PPTX
MailsDaddy Outlook OST to PST converter.pptx
abhishekdutt366
 
PPTX
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
 
PDF
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
PDF
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
PDF
Continouous failure - Why do we make our lives hard?
Papp Krisztián
 
PDF
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
 
PPTX
Human Resources Information System (HRIS)
Amity University, Patna
 
PPTX
Equipment Management Software BIS Safety UK.pptx
BIS Safety Software
 
The Role of a PHP Development Company in Modern Web Development
SEO Company for School in Delhi NCR
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
Engineering the Java Web Application (MVC)
abhishekoza1981
 
Efficient, Automated Claims Processing Software for Insurers
Insurance Tech Services
 
A Complete Guide to Salesforce SMS Integrations Build Scalable Messaging With...
360 SMS APP
 
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
Safe Software
 
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
Import Data Form Excel to Tally Services
Tally xperts
 
Understanding the Need for Systemic Change in Open Source Through Intersectio...
Imma Valls Bernaus
 
Beyond Binaries: Understanding Diversity and Allyship in a Global Workplace -...
Imma Valls Bernaus
 
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
MailsDaddy Outlook OST to PST converter.pptx
abhishekdutt366
 
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
 
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
Continouous failure - Why do we make our lives hard?
Papp Krisztián
 
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
 
Human Resources Information System (HRIS)
Amity University, Patna
 
Equipment Management Software BIS Safety UK.pptx
BIS Safety Software
 

Overview of Rest Service and ASP.NET WEB API

  • 1. Overview of REST Service and ASP.NET WEB API From: Pankaj Bajaj
  • 2. Agenda • Why Services ? • Type of Services ? • What is REST ? • Features of REST • Web API Overview • SOAP vs. REST Continuous learning is the minimum requirement for success in any field.
  • 3. Why we need Services Continuous learning is the minimum requirement for success in any field.
  • 4. Service & SOA Service ? o A Service is a self-contained unit of software that performs a specific task. o A Service is a reusable component. o A Service changes business data from one state to another. o If you can describe a component in WSDL, it is a Service. SOA is a software architecture model in which business functionality are logically grouped and encapsulated into • self contained, • distinct and reusable units called services that • represent a high level business concept • can be distributed over a network • can be reused to create new business applications • contain contract with specification of the purpose, functionality, interfaces constraints, usage of the business functional Continuous learning is the minimum requirement for success in any field.
  • 5. Type of Services Big Web Services: Big web services are based on SOAP standard and often contain a WSDL to describe the interface that the web service offers. The details of the contract may include messages, operations, bindings, and the location of the web service. A- Address B- Binding C-Contract REST Services: RESTful web services are based on the way how web works. REST is neither a standard nor a protocol. It is just an architectural style like say for example client-server architecture. It’s based on HTTP. Continuous learning is the minimum requirement for success in any field.
  • 6. What is REST REST: Representational State Transfer “REST is an architectural style not an protocol.” The term representational state transfer was introduced and defined in year 2000 by Roy Fielding during his research in PhD programme. REST has been applied to describe desired web architecture, to identify existing problems, to compare alternative solutions and to ensure that protocol extensions would not violate the core constraints that make the web successful. Continuous learning is the minimum requirement for success in any field.
  • 7. Resource Oriented Architecture (ROA) An Entity, Item or just a thing you want to expose is a Resource Resource-oriented architecture (ROA) is a style of software architecture and programming paradigm for designing and developing software in the form of resources with "RESTful" interfaces. These resources are software components (discrete pieces of code and/or data structures) which can be reused for different purposes. Features of ROA: • Addressability: Addressable applications expose a URI for every piece of information they might conceivably serve. • Statelessness : Statelessness means that every HTTP request happens in complete isolation. The server never relies on information from previous requests. . • A uniform interface : Resource should be called using an HTTP Verbs (Get POST,PUT,DELETE) Continuous learning is the minimum requirement for success in any field.
  • 8. Features of REST • Platform-independent (you don't care if the server is Unix, the client is a Mac, or anything else) • Language-independent (C# can talk to Java, etc.) • HTTP Based • Can easily be used in the presence of firewalls. • Limited bandwidth and resources • Totally stateless operations • Caching • Reach More Clients(Mobile , Tablet etc.) • Lightweight hosting and scalable with Cloud Continuous learning is the minimum requirement for success in any field.
  • 9. ASP.net WEB API Continuous learning is the minimum requirement for success in any field.
  • 10. ASP.NET Web API ASP.Net Web API is a framework that makes it easy to build HTTP Services that reach a broad range of clients, including browsers and mobile devices. It's an ideal platform for building RESTFul Services on .Net Framework Continuous learning is the minimum requirement for success in any field.
  • 11. Features of WEB API • Strong Support for URL Routing to produce clean URLs using familiar MVC style routing semantics • Content Negotiation based on Accept headers for request and response serialization • Support for a host of supported output formats including JSON, XML, ATOM • ODATA Support • Strong default support for REST semantics • Very extensible, based on MVC like extensibility model of Formatters and Filters • Self-hostable in non-Web applications • Testable using testing concepts similar to MVC Continuous learning is the minimum requirement for success in any field.
  • 12. HTTP Verbs • GET This is used to retrieve resourceresources. • POST This is used to add new resource. • PUT This is used to update resource. • DELETE This is used to delete resource. Continuous learning is the minimum requirement for success in any field.
  • 13. SOAP vs. REST Continuous learning is the minimum requirement for success in any field.
  • 14. SOAP Features • Asynchronous processing and invocation; • Formal contracts; • Stateful operations • Supports Messaging Pattern Continuous learning is the minimum requirement for success in any field.
  • 15. SOAP vs. REST Continuous learning is the minimum requirement for success in any field. SOAP REST In SOAP along with data a lot of other meta data also needs to get transferred with each request and response. This makes the payload heavy even for small data only the data will be traveling to and fro from the server because the capabilities of the service are mapped to the URIs and protocols In SOAP there is need to create the proxy at client side. These proxies will do the marshaling and un- marshaling of SOAP WSDL and make the communication between the application and the web service possible. The problem with this proxy is that if the service is updated and the proxy on the client is not then the application might behave incorrectly there is no need to have a proxy at the client end because its only data that is coming and the application can directly receive and process the data
  • 16. SOAP vs. REST Continuous learning is the minimum requirement for success in any field.
  • 17. Usage SOAP REST When designing an application of service oriented architecture which interconnects many systems and uses many transport channels, it is better to use SOAP. When we plan to design an application to be used exclusively on the web, and also when we need a quick client integration. Complex Applications which need different kind of bindings and protocols Simple applications which major depends on CRUD operations. Continuous learning is the minimum requirement for success in any field.
  • 18. ASP.Net Web API vs. WCF Feature ASP.Net Web API WCF Transport Channel HTTP(s) TCP, UDP, MSMQ, NamedPipes, HTTP(s), Custom Protocol HTTP WS-* Types CLR Types DataContract Message Format Text (xml, json) SOAP+XML Service Interface HTTPMethod, URLPattern Service Contract State Management Stateless Stateless with Per Call Cache Built-n to HTTP Prefer application control Handled by application Error Handling Exceptions, HTTP Status codes filters Faults, Behaviors Hosting IIS, Self Host IIS, Self Host Client IApiExplorer Shared Libraries Proxy Class Shared Libraries Continuous learning is the minimum requirement for success in any field.
  • 19. WCF REST Service vs. ASP.net Web API WCF REST Service ASP.NET Web API Service => Web API controller Operation => Action Service contract => n/a Endpoint => n/a URI Template => ASP.NET Routing Message handlers => Same Formatters => Same Operation handlers => Filters, model binders Continuous learning is the minimum requirement for success in any field.
  • 20. • No Metadata • Only HTTP Security • Complexity kills Continuous learning is the minimum requirement for success in any field. Disadvantage of REST