SlideShare una empresa de Scribd logo
1 de 22
Will be an
introduction to
Web API
SAYED AHMED
SAYED@JUSTETC.NET
JUST ET CETERA TECHNOLOGIES (JUSTETC.NET)
 Kind of introduction
 You may find it kind of random though not totally
 Will show basic examples to create
 Demo using VS
 Also steps using text/articles from web
What is WebAPI?
 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.
ASP.NET Web API is an ideal
platform for building RESTful
applications on the .NET
Framework.
 Yes webAPI is also of REST kinda
API development
 And I showed you on how to
Engineer an API...
Overview
 HTML5 changed the game
 So Web API is here...
 Purpose:
 Create web-services
 Light weight
 Can serve the purpose of SOAP/WCF
 ASMX web-service applications use Soap style
 Can serve the purpose of REST
 Hence, it might fit better for newer development
 You might still want to use WCF/SOAP to extend existing
applications and that will require extensive interaction
 SOAP is pretty verbose -> too much data (XML)
transferred
 Web API is lightweight
 Rest is also simpler than SOAP
 Web API provided more capability and suites well the
new need
 Ajax based applications though not Web-service –
works kinda that way
Just One Resource
 On Rest API Engineering
 Once I developed kinda from scratch a Rest Api like API (telling like
as it did not implement all the aspects of REST though worked and
implemented like rest)
 Anyway, a resource on REST API design/architecture/engineering
 http://blog.octo.com/en/design-a-rest-api/
 This is the resource..looks pretty comprehensive – just googled it
and found it
 I was actually looking for an article that once I read in the past that
was pretty comprehensive and the stuff seemed to make sense and
great..
 It might be the same stuff...
 Anyway, if you are into REST api design and engineering, you will
find such checklist of a Great Rest API design...
 I can show you some info on Web-API from some
slides..
 One is when to Use API and When to use SOAP/WCF
 You just saw SignalR – duplex communications over HTTP
 I just used it without knowing the term SignalR
 Also, utilized/consumed a Web Service Apparently seemed to be
REST and Web-API in the same applicatiom
 About signal R
 The consumer is showing some stuff using a iframe (src points to
remote url and apparently that remote url was using Webservice )
 Iframe height was changing based on interaction
 Required to keep height consistent without showing scrollbars
 So used post message (kinda html 5 and push) to send the height
info to client and from client using some event retrieved that height
and adjusted the height anyway...
 REST and Restlike API/Webservice
 Reaches to different end point based on URL
parameters...
 On How to Test Web API
 Tools that will help
 Anyway...
 Better going for implementation then too much theory
 You can see an example at
 http://www.asp.net/web-api/overview/getting-started-
with-aspnet-web-api/tutorial-your-first-web-api
 Will show you the steps from that URL and then
 Will implement that simple application using Visual
Studio
 So what did we see..
 A sample application returning
 All products
 And might be returning only one product based on url
and if a product id is there..
 Telling might because..I just googled and found this
application...did not check it yet...
 But from REST concept this is what it seems like
 So steps...
 Creat web application
 Select web-api as a type
 Then you create a model – product
 And you add some product in code as just demo...
 In many cases...you might go for entity framework and
anyway..
 Then as usual create controller to utilize the model
 Then you create a HTML file
 From that file you call the API using jQuery
 Based on the URL you will get all products or one
product..
 Let’s see the screenshots..
 Controller MethodURI
 GetAllProducts/api/products
 GetProduct/api/products/id
 So I downloaded the project
 This is how it looks like..
 Does not
 After downloading the project I just added the HTML page—it was
not there
 You can see jquery code to get the product using Web-Api
 function find() {
 var id = $('#prodId').val();
 $.getJSON(uri + '/' + id)
 .done(function (data) {
 $('#product').text(formatItem(data));
 })
 .fail(function (jqXHR, textStatus, err) {
 $('#product').text('Error: ' + err);
 });
 }
 You might see the similar structure in the regular
 Ajax application
 Asmx
 It is just how Web API works internally
 Externally, and for the project structure – very similar to
other...
 The backend implementation of Web API
 If you want to go for implementing that or who
implemented that...that’s based on Huge Theory...
 Such data/database actually belongs to Model
 And are returned to controller then returned to view
 It was kept in controller just for demo and simplicity I
believe
Let’s Implement on our own
 Did a mistake – wanna do again
 Will add model..
 Add controller...
 You see rest like methods...
 Get put delete...
 Did not work
 Internal server error
 Apparently, we need json package as we are usinf
$.getJson
 Will try newtonsoft json
 Don’t see exact match trying one
 If does not work, will being the dll files from the
downloaded application
 It might be an interference with the old application
that we ran before..
 The issue multiple model and controller with same
name..mistakenly
 So worked...
 The routing
 // Web API configuration and services
 // Web API routes
 config.MapHttpAttributeRoutes();
 config.Routes.MapHttpRoute(
 name: "DefaultApi",
 routeTemplate: "api/{controller}/{id}",
 defaults: new { id = RouteParameter.Optional }
 );

Más contenido relacionado

La actualidad más candente

SharePoint Framework, Angular and Azure Functions
SharePoint Framework, Angular and Azure FunctionsSharePoint Framework, Angular and Azure Functions
SharePoint Framework, Angular and Azure FunctionsSébastien Levert
 
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...
Colin Bowern - The Not So Scary Side Of Asp.Net – Model View Controller In Th...Refresh Events
 
The Asynchronous Pattern (for beginners)
The Asynchronous Pattern (for beginners)The Asynchronous Pattern (for beginners)
The Asynchronous Pattern (for beginners)Andrea Tino
 
How to automated test a web application with sending e mail feature
How to automated test a web application with sending e mail featureHow to automated test a web application with sending e mail feature
How to automated test a web application with sending e mail featureJun-ichi Sakamoto
 
An Introduction to ReactNative
An Introduction to ReactNativeAn Introduction to ReactNative
An Introduction to ReactNativeMichał Taberski
 
Namespace less engine
Namespace less engineNamespace less engine
Namespace less engineshaokun
 
Intro to Rails Give Camp Atlanta
Intro to Rails Give Camp AtlantaIntro to Rails Give Camp Atlanta
Intro to Rails Give Camp AtlantaJason Noble
 
Model View Controller
Model View ControllerModel View Controller
Model View Controllerurs_tush
 
ASP.NET AJAX Basics
ASP.NET AJAX BasicsASP.NET AJAX Basics
ASP.NET AJAX Basicspetrov
 
Services Apps Iand Flex Applications
Services Apps Iand Flex ApplicationsServices Apps Iand Flex Applications
Services Apps Iand Flex ApplicationsSumit Kataria
 
ASP.NET AJAX with Visual Studio 2008
ASP.NET AJAX with Visual Studio 2008ASP.NET AJAX with Visual Studio 2008
ASP.NET AJAX with Visual Studio 2008Caleb Jenkins
 
ASP.NET Session 9
ASP.NET Session 9ASP.NET Session 9
ASP.NET Session 9Sisir Ghosh
 
Introduction of ASP.NET MVC and AngularJS
Introduction of ASP.NET MVC and AngularJSIntroduction of ASP.NET MVC and AngularJS
Introduction of ASP.NET MVC and AngularJSMohamed Elkhodary
 

La actualidad más candente (20)

SharePoint Framework, Angular and Azure Functions
SharePoint Framework, Angular and Azure FunctionsSharePoint Framework, Angular and Azure Functions
SharePoint Framework, Angular and Azure Functions
 
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...
Colin Bowern - The Not So Scary Side Of Asp.Net – Model View Controller In Th...
 
The Asynchronous Pattern (for beginners)
The Asynchronous Pattern (for beginners)The Asynchronous Pattern (for beginners)
The Asynchronous Pattern (for beginners)
 
How to automated test a web application with sending e mail feature
How to automated test a web application with sending e mail featureHow to automated test a web application with sending e mail feature
How to automated test a web application with sending e mail feature
 
Controls
ControlsControls
Controls
 
An Introduction to ReactNative
An Introduction to ReactNativeAn Introduction to ReactNative
An Introduction to ReactNative
 
Namespace less engine
Namespace less engineNamespace less engine
Namespace less engine
 
Intro to Rails Give Camp Atlanta
Intro to Rails Give Camp AtlantaIntro to Rails Give Camp Atlanta
Intro to Rails Give Camp Atlanta
 
Model View Controller
Model View ControllerModel View Controller
Model View Controller
 
ASP.NET AJAX Basics
ASP.NET AJAX BasicsASP.NET AJAX Basics
ASP.NET AJAX Basics
 
Catalog display
Catalog displayCatalog display
Catalog display
 
Services Apps Iand Flex Applications
Services Apps Iand Flex ApplicationsServices Apps Iand Flex Applications
Services Apps Iand Flex Applications
 
ASP.NET AJAX with Visual Studio 2008
ASP.NET AJAX with Visual Studio 2008ASP.NET AJAX with Visual Studio 2008
ASP.NET AJAX with Visual Studio 2008
 
jQuery Intro
jQuery IntrojQuery Intro
jQuery Intro
 
React with Ref
React with RefReact with Ref
React with Ref
 
ASP.NET Session 9
ASP.NET Session 9ASP.NET Session 9
ASP.NET Session 9
 
Dash of ajax
Dash of ajaxDash of ajax
Dash of ajax
 
Web Os Hands On
Web Os Hands OnWeb Os Hands On
Web Os Hands On
 
Rails introduction
Rails introductionRails introduction
Rails introduction
 
Introduction of ASP.NET MVC and AngularJS
Introduction of ASP.NET MVC and AngularJSIntroduction of ASP.NET MVC and AngularJS
Introduction of ASP.NET MVC and AngularJS
 

Similar a Will be an introduction to

Web driver selenium simplified
Web driver selenium simplifiedWeb driver selenium simplified
Web driver selenium simplifiedVikas Singh
 
Progressive EPiServer Development
Progressive EPiServer DevelopmentProgressive EPiServer Development
Progressive EPiServer Developmentjoelabrahamsson
 
WordPress and Client Side Web Applications WCTO
WordPress and Client Side Web Applications WCTOWordPress and Client Side Web Applications WCTO
WordPress and Client Side Web Applications WCTORoy Sivan
 
ASP.net MVC CodeCamp Presentation
ASP.net MVC CodeCamp PresentationASP.net MVC CodeCamp Presentation
ASP.net MVC CodeCamp Presentationbuildmaster
 
AspMVC4 start101
AspMVC4 start101AspMVC4 start101
AspMVC4 start101Rich Helton
 
Into The Box | Alexa and ColdBox Api's
Into The Box | Alexa and ColdBox Api'sInto The Box | Alexa and ColdBox Api's
Into The Box | Alexa and ColdBox Api'sOrtus Solutions, Corp
 
Getting Started with Zend Framework
Getting Started with Zend FrameworkGetting Started with Zend Framework
Getting Started with Zend FrameworkJuan Antonio
 
Building a Single Page Application with VueJS
Building a Single Page Application with VueJSBuilding a Single Page Application with VueJS
Building a Single Page Application with VueJSdanpastori
 
Using HttpWatch Plug-in with Selenium Automation in Java
Using HttpWatch Plug-in with Selenium Automation in JavaUsing HttpWatch Plug-in with Selenium Automation in Java
Using HttpWatch Plug-in with Selenium Automation in JavaSandeep Tol
 
How to develop an API with PHP, JSON, and POSTMAN in 9 Steps.pdf
How to develop an API with PHP, JSON, and POSTMAN in 9 Steps.pdfHow to develop an API with PHP, JSON, and POSTMAN in 9 Steps.pdf
How to develop an API with PHP, JSON, and POSTMAN in 9 Steps.pdfBe Problem Solver
 
Web Application Introduction
Web Application  IntroductionWeb Application  Introduction
Web Application Introductionshaojung
 
Web Application Introduction
Web Application  IntroductionWeb Application  Introduction
Web Application Introductionshaojung
 
Web Application Introduction
Web Application  IntroductionWeb Application  Introduction
Web Application Introductionshaojung
 
Designing CakePHP plugins for consuming APIs
Designing CakePHP plugins for consuming APIsDesigning CakePHP plugins for consuming APIs
Designing CakePHP plugins for consuming APIsNeil Crookes
 
StackMob & Appcelerator Module Part One
StackMob & Appcelerator Module Part OneStackMob & Appcelerator Module Part One
StackMob & Appcelerator Module Part OneAaron Saunders
 
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...Tom Johnson
 
How to build integrated, professional enterprise-grade cross-platform mobile ...
How to build integrated, professional enterprise-grade cross-platform mobile ...How to build integrated, professional enterprise-grade cross-platform mobile ...
How to build integrated, professional enterprise-grade cross-platform mobile ...Appear
 
Lightweight webdev
Lightweight webdevLightweight webdev
Lightweight webdevdamianofusco
 

Similar a Will be an introduction to (20)

Web driver selenium simplified
Web driver selenium simplifiedWeb driver selenium simplified
Web driver selenium simplified
 
Progressive EPiServer Development
Progressive EPiServer DevelopmentProgressive EPiServer Development
Progressive EPiServer Development
 
WordPress and Client Side Web Applications WCTO
WordPress and Client Side Web Applications WCTOWordPress and Client Side Web Applications WCTO
WordPress and Client Side Web Applications WCTO
 
ASP.net MVC CodeCamp Presentation
ASP.net MVC CodeCamp PresentationASP.net MVC CodeCamp Presentation
ASP.net MVC CodeCamp Presentation
 
Web API with ASP.NET MVC by Software development company in india
Web API with ASP.NET  MVC  by Software development company in indiaWeb API with ASP.NET  MVC  by Software development company in india
Web API with ASP.NET MVC by Software development company in india
 
AspMVC4 start101
AspMVC4 start101AspMVC4 start101
AspMVC4 start101
 
Into The Box | Alexa and ColdBox Api's
Into The Box | Alexa and ColdBox Api'sInto The Box | Alexa and ColdBox Api's
Into The Box | Alexa and ColdBox Api's
 
Getting Started with Zend Framework
Getting Started with Zend FrameworkGetting Started with Zend Framework
Getting Started with Zend Framework
 
Building a Single Page Application with VueJS
Building a Single Page Application with VueJSBuilding a Single Page Application with VueJS
Building a Single Page Application with VueJS
 
Using HttpWatch Plug-in with Selenium Automation in Java
Using HttpWatch Plug-in with Selenium Automation in JavaUsing HttpWatch Plug-in with Selenium Automation in Java
Using HttpWatch Plug-in with Selenium Automation in Java
 
How to develop an API with PHP, JSON, and POSTMAN in 9 Steps.pdf
How to develop an API with PHP, JSON, and POSTMAN in 9 Steps.pdfHow to develop an API with PHP, JSON, and POSTMAN in 9 Steps.pdf
How to develop an API with PHP, JSON, and POSTMAN in 9 Steps.pdf
 
Web Application Introduction
Web Application  IntroductionWeb Application  Introduction
Web Application Introduction
 
Web Application Introduction
Web Application  IntroductionWeb Application  Introduction
Web Application Introduction
 
Web Application Introduction
Web Application  IntroductionWeb Application  Introduction
Web Application Introduction
 
Express node js
Express node jsExpress node js
Express node js
 
Designing CakePHP plugins for consuming APIs
Designing CakePHP plugins for consuming APIsDesigning CakePHP plugins for consuming APIs
Designing CakePHP plugins for consuming APIs
 
StackMob & Appcelerator Module Part One
StackMob & Appcelerator Module Part OneStackMob & Appcelerator Module Part One
StackMob & Appcelerator Module Part One
 
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
 
How to build integrated, professional enterprise-grade cross-platform mobile ...
How to build integrated, professional enterprise-grade cross-platform mobile ...How to build integrated, professional enterprise-grade cross-platform mobile ...
How to build integrated, professional enterprise-grade cross-platform mobile ...
 
Lightweight webdev
Lightweight webdevLightweight webdev
Lightweight webdev
 

Más de Sayed Ahmed

Workplace, Data Analytics, and Ethics
Workplace, Data Analytics, and EthicsWorkplace, Data Analytics, and Ethics
Workplace, Data Analytics, and EthicsSayed Ahmed
 
Python py charm anaconda jupyter installation and basic commands
Python py charm anaconda jupyter   installation and basic commandsPython py charm anaconda jupyter   installation and basic commands
Python py charm anaconda jupyter installation and basic commandsSayed Ahmed
 
[not edited] Demo on mobile app development using ionic framework
[not edited] Demo on mobile app development using ionic framework[not edited] Demo on mobile app development using ionic framework
[not edited] Demo on mobile app development using ionic frameworkSayed Ahmed
 
Sap hana-ide-overview-nodev
Sap hana-ide-overview-nodevSap hana-ide-overview-nodev
Sap hana-ide-overview-nodevSayed Ahmed
 
Whm and cpanel overview hosting control panel overview
Whm and cpanel overview   hosting control panel overviewWhm and cpanel overview   hosting control panel overview
Whm and cpanel overview hosting control panel overviewSayed Ahmed
 
Web application development using zend framework
Web application development using zend frameworkWeb application development using zend framework
Web application development using zend frameworkSayed Ahmed
 
Web design and_html_part_3
Web design and_html_part_3Web design and_html_part_3
Web design and_html_part_3Sayed Ahmed
 
Web design and_html_part_2
Web design and_html_part_2Web design and_html_part_2
Web design and_html_part_2Sayed Ahmed
 
Web design and_html
Web design and_htmlWeb design and_html
Web design and_htmlSayed Ahmed
 
Visual studio ide shortcuts
Visual studio ide shortcutsVisual studio ide shortcuts
Visual studio ide shortcutsSayed Ahmed
 
Unit tests in_symfony
Unit tests in_symfonyUnit tests in_symfony
Unit tests in_symfonySayed Ahmed
 
Telerik this is sayed
Telerik this is sayedTelerik this is sayed
Telerik this is sayedSayed Ahmed
 
System analysis and_design
System analysis and_designSystem analysis and_design
System analysis and_designSayed Ahmed
 
Story telling and_narrative
Story telling and_narrativeStory telling and_narrative
Story telling and_narrativeSayed Ahmed
 
Some skills required to be a computer hardware engineer professional
Some skills required to be a computer hardware engineer professionalSome skills required to be a computer hardware engineer professional
Some skills required to be a computer hardware engineer professionalSayed Ahmed
 

Más de Sayed Ahmed (20)

Workplace, Data Analytics, and Ethics
Workplace, Data Analytics, and EthicsWorkplace, Data Analytics, and Ethics
Workplace, Data Analytics, and Ethics
 
Python py charm anaconda jupyter installation and basic commands
Python py charm anaconda jupyter   installation and basic commandsPython py charm anaconda jupyter   installation and basic commands
Python py charm anaconda jupyter installation and basic commands
 
[not edited] Demo on mobile app development using ionic framework
[not edited] Demo on mobile app development using ionic framework[not edited] Demo on mobile app development using ionic framework
[not edited] Demo on mobile app development using ionic framework
 
Sap hana-ide-overview-nodev
Sap hana-ide-overview-nodevSap hana-ide-overview-nodev
Sap hana-ide-overview-nodev
 
Invest wisely
Invest wiselyInvest wisely
Invest wisely
 
Whm and cpanel overview hosting control panel overview
Whm and cpanel overview   hosting control panel overviewWhm and cpanel overview   hosting control panel overview
Whm and cpanel overview hosting control panel overview
 
Web application development using zend framework
Web application development using zend frameworkWeb application development using zend framework
Web application development using zend framework
 
Web design and_html_part_3
Web design and_html_part_3Web design and_html_part_3
Web design and_html_part_3
 
Web design and_html_part_2
Web design and_html_part_2Web design and_html_part_2
Web design and_html_part_2
 
Web design and_html
Web design and_htmlWeb design and_html
Web design and_html
 
Visual studio ide shortcuts
Visual studio ide shortcutsVisual studio ide shortcuts
Visual studio ide shortcuts
 
Virtualization
VirtualizationVirtualization
Virtualization
 
User interfaces
User interfacesUser interfaces
User interfaces
 
Unreal
UnrealUnreal
Unreal
 
Unit tests in_symfony
Unit tests in_symfonyUnit tests in_symfony
Unit tests in_symfony
 
Telerik this is sayed
Telerik this is sayedTelerik this is sayed
Telerik this is sayed
 
System analysis and_design
System analysis and_designSystem analysis and_design
System analysis and_design
 
Symfony 2
Symfony 2Symfony 2
Symfony 2
 
Story telling and_narrative
Story telling and_narrativeStory telling and_narrative
Story telling and_narrative
 
Some skills required to be a computer hardware engineer professional
Some skills required to be a computer hardware engineer professionalSome skills required to be a computer hardware engineer professional
Some skills required to be a computer hardware engineer professional
 

Último

[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMKumar Satyam
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 

Último (20)

[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 

Will be an introduction to

  • 1. Will be an introduction to Web API SAYED AHMED SAYED@JUSTETC.NET JUST ET CETERA TECHNOLOGIES (JUSTETC.NET)
  • 2.  Kind of introduction  You may find it kind of random though not totally  Will show basic examples to create  Demo using VS  Also steps using text/articles from web
  • 3. What is WebAPI?  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. ASP.NET Web API is an ideal platform for building RESTful applications on the .NET Framework.  Yes webAPI is also of REST kinda API development  And I showed you on how to Engineer an API...
  • 4. Overview  HTML5 changed the game  So Web API is here...  Purpose:  Create web-services  Light weight  Can serve the purpose of SOAP/WCF  ASMX web-service applications use Soap style  Can serve the purpose of REST  Hence, it might fit better for newer development  You might still want to use WCF/SOAP to extend existing applications and that will require extensive interaction
  • 5.  SOAP is pretty verbose -> too much data (XML) transferred  Web API is lightweight  Rest is also simpler than SOAP  Web API provided more capability and suites well the new need  Ajax based applications though not Web-service – works kinda that way
  • 6. Just One Resource  On Rest API Engineering  Once I developed kinda from scratch a Rest Api like API (telling like as it did not implement all the aspects of REST though worked and implemented like rest)  Anyway, a resource on REST API design/architecture/engineering  http://blog.octo.com/en/design-a-rest-api/  This is the resource..looks pretty comprehensive – just googled it and found it  I was actually looking for an article that once I read in the past that was pretty comprehensive and the stuff seemed to make sense and great..  It might be the same stuff...  Anyway, if you are into REST api design and engineering, you will find such checklist of a Great Rest API design...
  • 7.  I can show you some info on Web-API from some slides..  One is when to Use API and When to use SOAP/WCF
  • 8.  You just saw SignalR – duplex communications over HTTP  I just used it without knowing the term SignalR  Also, utilized/consumed a Web Service Apparently seemed to be REST and Web-API in the same applicatiom  About signal R  The consumer is showing some stuff using a iframe (src points to remote url and apparently that remote url was using Webservice )  Iframe height was changing based on interaction  Required to keep height consistent without showing scrollbars  So used post message (kinda html 5 and push) to send the height info to client and from client using some event retrieved that height and adjusted the height anyway...
  • 9.  REST and Restlike API/Webservice  Reaches to different end point based on URL parameters...
  • 10.  On How to Test Web API  Tools that will help  Anyway...  Better going for implementation then too much theory
  • 11.  You can see an example at  http://www.asp.net/web-api/overview/getting-started- with-aspnet-web-api/tutorial-your-first-web-api  Will show you the steps from that URL and then  Will implement that simple application using Visual Studio
  • 12.  So what did we see..  A sample application returning  All products  And might be returning only one product based on url and if a product id is there..  Telling might because..I just googled and found this application...did not check it yet...  But from REST concept this is what it seems like
  • 13.  So steps...  Creat web application  Select web-api as a type  Then you create a model – product  And you add some product in code as just demo...  In many cases...you might go for entity framework and anyway..
  • 14.  Then as usual create controller to utilize the model  Then you create a HTML file  From that file you call the API using jQuery  Based on the URL you will get all products or one product..  Let’s see the screenshots..
  • 15.  Controller MethodURI  GetAllProducts/api/products  GetProduct/api/products/id
  • 16.  So I downloaded the project  This is how it looks like..  Does not
  • 17.  After downloading the project I just added the HTML page—it was not there  You can see jquery code to get the product using Web-Api  function find() {  var id = $('#prodId').val();  $.getJSON(uri + '/' + id)  .done(function (data) {  $('#product').text(formatItem(data));  })  .fail(function (jqXHR, textStatus, err) {  $('#product').text('Error: ' + err);  });  }
  • 18.  You might see the similar structure in the regular  Ajax application  Asmx  It is just how Web API works internally  Externally, and for the project structure – very similar to other...  The backend implementation of Web API  If you want to go for implementing that or who implemented that...that’s based on Huge Theory...
  • 19.  Such data/database actually belongs to Model  And are returned to controller then returned to view  It was kept in controller just for demo and simplicity I believe
  • 20. Let’s Implement on our own  Did a mistake – wanna do again  Will add model..  Add controller...  You see rest like methods...  Get put delete...  Did not work  Internal server error  Apparently, we need json package as we are usinf $.getJson  Will try newtonsoft json
  • 21.  Don’t see exact match trying one  If does not work, will being the dll files from the downloaded application  It might be an interference with the old application that we ran before..  The issue multiple model and controller with same name..mistakenly  So worked...
  • 22.  The routing  // Web API configuration and services  // Web API routes  config.MapHttpAttributeRoutes();  config.Routes.MapHttpRoute(  name: "DefaultApi",  routeTemplate: "api/{controller}/{id}",  defaults: new { id = RouteParameter.Optional }  );