Overview of Rest Service and ASP.NET WEB API

Pankaj Bajaj
Pankaj BajajLead Application Developer at Fujitsu Consulting India em Fujitsu Consulting India
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
1 de 20

Recomendados

Introduction to the Web API por
Introduction to the Web APIIntroduction to the Web API
Introduction to the Web APIBrad Genereaux
14.5K visualizações49 slides
Understanding REST por
Understanding RESTUnderstanding REST
Understanding RESTNitin Pande
6.4K visualizações9 slides
Web API Basics por
Web API BasicsWeb API Basics
Web API BasicsLearnNowOnline
1.3K visualizações136 slides
Best practices for RESTful web service design por
Best practices for RESTful web service designBest practices for RESTful web service design
Best practices for RESTful web service designRamin Orujov
29.9K visualizações33 slides
Understanding REST APIs in 5 Simple Steps por
Understanding REST APIs in 5 Simple StepsUnderstanding REST APIs in 5 Simple Steps
Understanding REST APIs in 5 Simple StepsTessa Mero
5K visualizações29 slides
Restful api por
Restful apiRestful api
Restful apiAnurag Srivastava
282 visualizações46 slides

Mais conteúdo relacionado

Mais procurados

Restful web services ppt por
Restful web services pptRestful web services ppt
Restful web services pptOECLIB Odisha Electronics Control Library
4K visualizações17 slides
Express js por
Express jsExpress js
Express jsManav Prasad
6.7K visualizações19 slides
What Is Express JS? por
What Is Express JS?What Is Express JS?
What Is Express JS?Simplilearn
492 visualizações11 slides
Laravel Introduction por
Laravel IntroductionLaravel Introduction
Laravel IntroductionAhmad Shah Hafizan Hamidin
9.7K visualizações35 slides
Web api por
Web apiWeb api
Web apiSudhakar Sharma
17.8K visualizações30 slides
ASP.NET Web API por
ASP.NET Web APIASP.NET Web API
ASP.NET Web APIhabib_786
7.1K visualizações39 slides

Mais procurados(20)

Express js por Manav Prasad
Express jsExpress js
Express js
Manav Prasad6.7K visualizações
What Is Express JS? por Simplilearn
What Is Express JS?What Is Express JS?
What Is Express JS?
Simplilearn492 visualizações
Web api por Sudhakar Sharma
Web apiWeb api
Web api
Sudhakar Sharma17.8K visualizações
ASP.NET Web API por habib_786
ASP.NET Web APIASP.NET Web API
ASP.NET Web API
habib_7867.1K visualizações
Design Beautiful REST + JSON APIs por Stormpath
Design Beautiful REST + JSON APIsDesign Beautiful REST + JSON APIs
Design Beautiful REST + JSON APIs
Stormpath226K visualizações
LINQ in C# por Basant Medhat
LINQ in C#LINQ in C#
LINQ in C#
Basant Medhat4.8K visualizações
Introduction to APIs (Application Programming Interface) por Vibhawa Nirmal
Introduction to APIs (Application Programming Interface) Introduction to APIs (Application Programming Interface)
Introduction to APIs (Application Programming Interface)
Vibhawa Nirmal6K visualizações
CSS por Vladimir Zhidal
CSSCSS
CSS
Vladimir Zhidal1.7K visualizações
What is REST API? REST API Concepts and Examples | Edureka por Edureka!
What is REST API? REST API Concepts and Examples | EdurekaWhat is REST API? REST API Concepts and Examples | Edureka
What is REST API? REST API Concepts and Examples | Edureka
Edureka!1.6K visualizações
REST-API introduction for developers por Patrick Savalle
REST-API introduction for developersREST-API introduction for developers
REST-API introduction for developers
Patrick Savalle5.5K visualizações
introduction about REST API por AmilaSilva13
introduction about REST APIintroduction about REST API
introduction about REST API
AmilaSilva13135 visualizações
Introduction to ASP.NET por Rajkumarsoy
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NET
Rajkumarsoy16.9K visualizações
Soap web service por NITT, KAMK
Soap web serviceSoap web service
Soap web service
NITT, KAMK617 visualizações
Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js + Expres... por Edureka!
Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js +  Expres...Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js +  Expres...
Node.js Express Tutorial | Node.js Tutorial For Beginners | Node.js + Expres...
Edureka!1.2K visualizações

Destaque

ASP.NET WEB API por
ASP.NET WEB APIASP.NET WEB API
ASP.NET WEB APIThang Chung
7.1K visualizações31 slides
Web API or WCF - An Architectural Comparison por
Web API or WCF - An Architectural ComparisonWeb API or WCF - An Architectural Comparison
Web API or WCF - An Architectural ComparisonAdnan Masood
56.8K visualizações52 slides
Excellent rest using asp.net web api por
Excellent rest using asp.net web apiExcellent rest using asp.net web api
Excellent rest using asp.net web apiMaurice De Beijer [MVP]
11.4K visualizações32 slides
The ASP.NET Web API for Beginners por
The ASP.NET Web API for BeginnersThe ASP.NET Web API for Beginners
The ASP.NET Web API for BeginnersKevin Hazzard
4.4K visualizações25 slides
REST and ASP.NET Web API (Tunisia) por
REST and ASP.NET Web API (Tunisia)REST and ASP.NET Web API (Tunisia)
REST and ASP.NET Web API (Tunisia)Jef Claes
4.4K visualizações56 slides
WCF tutorial por
WCF tutorialWCF tutorial
WCF tutorialAbhi Arya
7.8K visualizações110 slides

Destaque(20)

ASP.NET WEB API por Thang Chung
ASP.NET WEB APIASP.NET WEB API
ASP.NET WEB API
Thang Chung7.1K visualizações
Web API or WCF - An Architectural Comparison por Adnan Masood
Web API or WCF - An Architectural ComparisonWeb API or WCF - An Architectural Comparison
Web API or WCF - An Architectural Comparison
Adnan Masood56.8K visualizações
Excellent rest using asp.net web api por Maurice De Beijer [MVP]
Excellent rest using asp.net web apiExcellent rest using asp.net web api
Excellent rest using asp.net web api
Maurice De Beijer [MVP]11.4K visualizações
The ASP.NET Web API for Beginners por Kevin Hazzard
The ASP.NET Web API for BeginnersThe ASP.NET Web API for Beginners
The ASP.NET Web API for Beginners
Kevin Hazzard4.4K visualizações
REST and ASP.NET Web API (Tunisia) por Jef Claes
REST and ASP.NET Web API (Tunisia)REST and ASP.NET Web API (Tunisia)
REST and ASP.NET Web API (Tunisia)
Jef Claes4.4K visualizações
WCF tutorial por Abhi Arya
WCF tutorialWCF tutorial
WCF tutorial
Abhi Arya7.8K visualizações
The Full Power of ASP.NET Web API por Eyal Vardi
The Full Power of ASP.NET Web APIThe Full Power of ASP.NET Web API
The Full Power of ASP.NET Web API
Eyal Vardi62.7K visualizações
ASP.NET Mvc 4 web api por Tiago Knoch
ASP.NET Mvc 4 web apiASP.NET Mvc 4 web api
ASP.NET Mvc 4 web api
Tiago Knoch9.3K visualizações
ASP.NET Web API and HTTP Fundamentals por Ido Flatow
ASP.NET Web API and HTTP FundamentalsASP.NET Web API and HTTP Fundamentals
ASP.NET Web API and HTTP Fundamentals
Ido Flatow26.4K visualizações
Colin Bowern - The Not So Scary Side Of Asp.Net – Model View Controller In Th... por Refresh Events
Colin Bowern - The Not So Scary Side Of Asp.Net – Model View Controller In Th...Colin Bowern - The Not So Scary Side Of Asp.Net – Model View Controller In Th...
Colin Bowern - The Not So Scary Side Of Asp.Net – Model View Controller In Th...
Refresh Events1.9K visualizações
Jonathan Dunn - Talking You Down from the Bleeding Edge por Refresh Events
Jonathan Dunn - Talking You Down from the Bleeding EdgeJonathan Dunn - Talking You Down from the Bleeding Edge
Jonathan Dunn - Talking You Down from the Bleeding Edge
Refresh Events1.5K visualizações
Treeview listview por Amandeep Kaur
Treeview listviewTreeview listview
Treeview listview
Amandeep Kaur2.8K visualizações
Cloud Based Enterprise Apps using Everlive por Dhananjay Kumar
Cloud Based Enterprise Apps using EverliveCloud Based Enterprise Apps using Everlive
Cloud Based Enterprise Apps using Everlive
Dhananjay Kumar1.3K visualizações
Glance at Visual Studio 2013 ASP.NET and Web tools 2013 por Shravan Kumar Kasagoni
Glance at Visual Studio 2013  ASP.NET and Web tools 2013Glance at Visual Studio 2013  ASP.NET and Web tools 2013
Glance at Visual Studio 2013 ASP.NET and Web tools 2013
Shravan Kumar Kasagoni3.5K visualizações
Ankoder System Architecture por Rex Chung
Ankoder System ArchitectureAnkoder System Architecture
Ankoder System Architecture
Rex Chung420 visualizações
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control por Maarten Balliauw
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access ControlOAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control
Maarten Balliauw4.2K visualizações
Active x por Karthick Suresh
Active xActive x
Active x
Karthick Suresh1.7K visualizações

Similar a Overview of Rest Service and ASP.NET WEB API

Mini-Training: Let's have a rest por
Mini-Training: Let's have a restMini-Training: Let's have a rest
Mini-Training: Let's have a restBetclic Everest Group Tech Team
2.3K visualizações18 slides
Wt unit 6 ppts web services por
Wt unit 6 ppts web servicesWt unit 6 ppts web services
Wt unit 6 ppts web servicesPUNE VIDYARTHI GRIHA'S COLLEGE OF ENGINEERING, NASHIK
98 visualizações113 slides
REST Introduction.ppt por
REST Introduction.pptREST Introduction.ppt
REST Introduction.pptKGSCSEPSGCT
19 visualizações29 slides
REST & RESTful Web Services por
REST & RESTful Web ServicesREST & RESTful Web Services
REST & RESTful Web ServicesHalil Burak Cetinkaya
44K visualizações38 slides
Connecting to Data from Windows Phone 8 por
Connecting to Data from Windows Phone 8Connecting to Data from Windows Phone 8
Connecting to Data from Windows Phone 8Woodruff Solutions LLC
2.1K visualizações23 slides
Connecting to Data from Windows Phone 8 VSLive! Redmond 2013 por
Connecting to Data from Windows Phone 8 VSLive! Redmond 2013Connecting to Data from Windows Phone 8 VSLive! Redmond 2013
Connecting to Data from Windows Phone 8 VSLive! Redmond 2013Woodruff Solutions LLC
636 visualizações23 slides

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

REST Introduction.ppt por KGSCSEPSGCT
REST Introduction.pptREST Introduction.ppt
REST Introduction.ppt
KGSCSEPSGCT19 visualizações
Connecting to Data from Windows Phone 8 por Woodruff Solutions LLC
Connecting to Data from Windows Phone 8Connecting to Data from Windows Phone 8
Connecting to Data from Windows Phone 8
Woodruff Solutions LLC2.1K visualizações
Connecting to Data from Windows Phone 8 VSLive! Redmond 2013 por Woodruff Solutions LLC
Connecting to Data from Windows Phone 8 VSLive! Redmond 2013Connecting to Data from Windows Phone 8 VSLive! Redmond 2013
Connecting to Data from Windows Phone 8 VSLive! Redmond 2013
Woodruff Solutions LLC636 visualizações
Connecting to Data from Windows Phone 8 por Woodruff Solutions LLC
Connecting to Data from Windows Phone 8Connecting to Data from Windows Phone 8
Connecting to Data from Windows Phone 8
Woodruff Solutions LLC749 visualizações
Api design part 1 por Ibrahim Elsawaf
Api design part 1Api design part 1
Api design part 1
Ibrahim Elsawaf215 visualizações
Role of Rest vs. Web Services and EI por WSO2
Role of Rest vs. Web Services and EIRole of Rest vs. Web Services and EI
Role of Rest vs. Web Services and EI
WSO22.1K visualizações
Rest web service por Hamid Ghorbani
Rest web serviceRest web service
Rest web service
Hamid Ghorbani474 visualizações
REST full API Design por Christian Guenther
REST full API DesignREST full API Design
REST full API Design
Christian Guenther1.3K visualizações
REST & RESTful APIs: The State of Confusion por Glenn Antoine
REST & RESTful APIs: The State of ConfusionREST & RESTful APIs: The State of Confusion
REST & RESTful APIs: The State of Confusion
Glenn Antoine4.2K visualizações
Secc tutorials development and deployment of rest web services in java_v2.0 por Aravindharamanan S
Secc tutorials development and deployment of rest web services in java_v2.0Secc tutorials development and deployment of rest web services in java_v2.0
Secc tutorials development and deployment of rest web services in java_v2.0
Aravindharamanan S123 visualizações
Restful web services by Sreeni Inturi por Sreeni I
Restful web services by Sreeni InturiRestful web services by Sreeni Inturi
Restful web services by Sreeni Inturi
Sreeni I1.9K visualizações
Unit 3-SOA Technologies por ssuser3a47cb
Unit 3-SOA TechnologiesUnit 3-SOA Technologies
Unit 3-SOA Technologies
ssuser3a47cb69 visualizações
APIs Design - Creation - Management.pdf por WilliamELKAIMPhd
APIs Design - Creation - Management.pdfAPIs Design - Creation - Management.pdf
APIs Design - Creation - Management.pdf
WilliamELKAIMPhd22 visualizações
RESTful applications: The why and how by Maikel Mardjan por Jexia
RESTful applications: The why and how by Maikel MardjanRESTful applications: The why and how by Maikel Mardjan
RESTful applications: The why and how by Maikel Mardjan
Jexia492 visualizações
Web service Introduction por Madhukar Kumar
Web service IntroductionWeb service Introduction
Web service Introduction
Madhukar Kumar867 visualizações
IRJET- Rest API for E-Commerce Site por IRJET Journal
IRJET- Rest API for E-Commerce SiteIRJET- Rest API for E-Commerce Site
IRJET- Rest API for E-Commerce Site
IRJET Journal30 visualizações
zendframework2 restful por tom_li
zendframework2 restfulzendframework2 restful
zendframework2 restful
tom_li424 visualizações

Último

Understanding HTML terminology por
Understanding HTML terminologyUnderstanding HTML terminology
Understanding HTML terminologyartembondar5
8 visualizações8 slides
Dapr Unleashed: Accelerating Microservice Development por
Dapr Unleashed: Accelerating Microservice DevelopmentDapr Unleashed: Accelerating Microservice Development
Dapr Unleashed: Accelerating Microservice DevelopmentMiroslav Janeski
16 visualizações29 slides
Benefits in Software Development por
Benefits in Software DevelopmentBenefits in Software Development
Benefits in Software DevelopmentJohn Valentino
6 visualizações15 slides
Quality Assurance por
Quality Assurance Quality Assurance
Quality Assurance interworksoftware2
8 visualizações6 slides
predicting-m3-devopsconMunich-2023-v2.pptx por
predicting-m3-devopsconMunich-2023-v2.pptxpredicting-m3-devopsconMunich-2023-v2.pptx
predicting-m3-devopsconMunich-2023-v2.pptxTier1 app
14 visualizações33 slides
Streamlining Your Business Operations with Enterprise Application Integration... por
Streamlining Your Business Operations with Enterprise Application Integration...Streamlining Your Business Operations with Enterprise Application Integration...
Streamlining Your Business Operations with Enterprise Application Integration...Flexsin
5 visualizações12 slides

Último(20)

Understanding HTML terminology por artembondar5
Understanding HTML terminologyUnderstanding HTML terminology
Understanding HTML terminology
artembondar58 visualizações
Dapr Unleashed: Accelerating Microservice Development por Miroslav Janeski
Dapr Unleashed: Accelerating Microservice DevelopmentDapr Unleashed: Accelerating Microservice Development
Dapr Unleashed: Accelerating Microservice Development
Miroslav Janeski16 visualizações
Benefits in Software Development por John Valentino
Benefits in Software DevelopmentBenefits in Software Development
Benefits in Software Development
John Valentino6 visualizações
predicting-m3-devopsconMunich-2023-v2.pptx por Tier1 app
predicting-m3-devopsconMunich-2023-v2.pptxpredicting-m3-devopsconMunich-2023-v2.pptx
predicting-m3-devopsconMunich-2023-v2.pptx
Tier1 app14 visualizações
Streamlining Your Business Operations with Enterprise Application Integration... por Flexsin
Streamlining Your Business Operations with Enterprise Application Integration...Streamlining Your Business Operations with Enterprise Application Integration...
Streamlining Your Business Operations with Enterprise Application Integration...
Flexsin 5 visualizações
Top-5-production-devconMunich-2023-v2.pptx por Tier1 app
Top-5-production-devconMunich-2023-v2.pptxTop-5-production-devconMunich-2023-v2.pptx
Top-5-production-devconMunich-2023-v2.pptx
Tier1 app9 visualizações
Techstack Ltd at Slush 2023, Ukrainian delegation por ViktoriiaOpanasenko
Techstack Ltd at Slush 2023, Ukrainian delegationTechstack Ltd at Slush 2023, Ukrainian delegation
Techstack Ltd at Slush 2023, Ukrainian delegation
ViktoriiaOpanasenko7 visualizações
Introduction to Maven por John Valentino
Introduction to MavenIntroduction to Maven
Introduction to Maven
John Valentino7 visualizações
The Path to DevOps por John Valentino
The Path to DevOpsThe Path to DevOps
The Path to DevOps
John Valentino6 visualizações
Using Qt under LGPL-3.0 por Burkhard Stubert
Using Qt under LGPL-3.0Using Qt under LGPL-3.0
Using Qt under LGPL-3.0
Burkhard Stubert14 visualizações
Bootstrapping vs Venture Capital.pptx por Zeljko Svedic
Bootstrapping vs Venture Capital.pptxBootstrapping vs Venture Capital.pptx
Bootstrapping vs Venture Capital.pptx
Zeljko Svedic16 visualizações
Winter Projects GDSC IITK por SahilSingh368445
Winter Projects GDSC IITKWinter Projects GDSC IITK
Winter Projects GDSC IITK
SahilSingh368445416 visualizações
Page Object Model por artembondar5
Page Object ModelPage Object Model
Page Object Model
artembondar57 visualizações
Chat GPTs por Gene Leybzon
Chat GPTsChat GPTs
Chat GPTs
Gene Leybzon13 visualizações
aATP - New Correlation Confirmation Feature.pptx por EsatEsenek1
aATP - New Correlation Confirmation Feature.pptxaATP - New Correlation Confirmation Feature.pptx
aATP - New Correlation Confirmation Feature.pptx
EsatEsenek1222 visualizações
Supercharging your Python Development Environment with VS Code and Dev Contai... por Dawn Wages
Supercharging your Python Development Environment with VS Code and Dev Contai...Supercharging your Python Development Environment with VS Code and Dev Contai...
Supercharging your Python Development Environment with VS Code and Dev Contai...
Dawn Wages5 visualizações
Mobile App Development Company por Richestsoft
Mobile App Development CompanyMobile App Development Company
Mobile App Development Company
Richestsoft 5 visualizações
Advanced API Mocking Techniques Using Wiremock por Dimpy Adhikary
Advanced API Mocking Techniques Using WiremockAdvanced API Mocking Techniques Using Wiremock
Advanced API Mocking Techniques Using Wiremock
Dimpy Adhikary5 visualizações
Introduction to Git Source Control por John Valentino
Introduction to Git Source ControlIntroduction to Git Source Control
Introduction to Git Source Control
John Valentino8 visualizações

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