SlideShare a Scribd company logo
Discover. Master. Influence.
Senior Consultant at Readify
  @H_Desai
  http://himanshudesai.wordpress.com




               Discover. Master. Influence.   2
•   Getting up-to speed
•   Going Deep
•   Other Concerns
•   Lessons from the field




                    Discover. Master. Influence.
ASP.NET Web API Features

• From ASP.NET MVC        • From WCF Web API




•   Link generation       •       Server-side query composition
•   Testability           •       Create custom help pages
•   IoC integration       •       Self-host
•   VS template           •       Tracing
•   Scaffolding



                      Discover. Master. Influence.          4
• Two hosting options today
  – ASP.NET Web Application(IIS)
  – Self-host server option (console
    application, windows service, Azure worker
    Role etc)
• HttpConfiguration is the common
  denominator
• Host in memory for end-to-end testing
• Use an OWIN bridge to host on any OWIN
  compatible web server
                  Discover. Master. Influence.   5
Discover. Master. Influence.   6
Discover. Master. Influence.   7
Discover. Master. Influence.
HTTP request/response handling




     Client            Server
• Message Handlers




               Message
               Handler
                   Message
  HttpServer           Message
                    Handler                      Http
                                                           ApiController
                       Handler                Dispatcher




                         Discover. Master. Influence.             10
• Http Dispatcher
                         Invoke Action


                            Action Filters


         Model Bind


                      Authorization Filters


         Select action                         Exception filters


      Route to controller                          Formatting


          Request                      Response
                                Discover. Master. Influence.       11
• Action Filters
• Authorization Filters
• Exception Filters




                  Discover. Master. Influence.   12
Discover. Master. Influence.   13
• Simple types are taken from the URI
• Complex types come from the body
• Override using
  [FromUri],[FromBody],[ModelBinder],
  custom parameter binding




                Discover. Master. Influence.   14
• HttpRequest->.NET Type

/?id=123&name=bob
void Action(int id, string name)
// both parameters are simple types and will come from url

/?id=123&name=bob
void Action([FromUri] int id, [FromUri] string name)
// paranoid version of above.



                         Discover. Master. Influence.   15
void Action([FromBody] string name);
// explicitly read the body as a string.

/?id=123
void Action(int id, Customer c)
// id from query string, c is a complex object, comes from
body via a formatter.




                          Discover. Master. Influence.   16
void Action(Customer c1, Customer c2)
// error! multiple parameters attempting to read from the
body

void Action([FromUri] Customer c1, Customer c2) // ok, c1 is
from the URI and c2 is from the body




                         Discover. Master. Influence.   17
void Action([ModelBinder(MyCustomBinder)] SomeType c)
// Specifies a precise model binder to use to create the
parameter.

[ModelBinder(MyCustomBinder)]
public class SomeType { }

// place attribute on type declaration to apply to all
parameter instances
void Action(SomeType c)


                          Discover. Master. Influence.   18
Discover. Master. Influence.
Discover. Master. Influence.   20
Discover. Master. Influence.
•   Media Type Formatter
•   Delegating Handler
•   IOC
•   Services (e.g. Tracing)




                     Discover. Master. Influence.   22
Discover. Master. Influence.
• Built-In
  – Json
  – Xml
  – FormUrl-Encoded
  – ODataMediaType
• Custom



                Discover. Master. Influence.   24
Discover. Master. Influence.   25
Discover. Master. Influence.
Discover. Master. Influence.   27
Discover. Master. Influence.
Discover. Master. Influence.   29
Discover. Master. Influence.
Discover. Master. Influence.   33
Discover. Master. Influence.
• Demo
  – Test Controller via Http
  – Test Delegating Handlers




                    Discover. Master. Influence.   35
•   Be careful about OData Versioning (alpha right?)
•   Message Handler error handling
•   Don’t let your EF code leak out.
•   Ensure you write HTTP level tests for controller.
•   Tracing is enabled.
•   Remove Formatters you don’t need.
•   Add JSONP and CORS formatters (Not available by default)




                         Discover. Master. Influence.   36
Discover. Master. Influence.

More Related Content

What's hot (20)

Efficient Rails Test-Driven Development - Week 6
Efficient Rails Test-Driven Development - Week 6Efficient Rails Test-Driven Development - Week 6
Efficient Rails Test-Driven Development - Week 6
Marakana Inc.
 
Defcon 23 - hariri spelman gorenc - abusing adobe readers java sc
Defcon 23 - hariri spelman gorenc - abusing adobe readers java scDefcon 23 - hariri spelman gorenc - abusing adobe readers java sc
Defcon 23 - hariri spelman gorenc - abusing adobe readers java sc
Felipe Prado
 
Django rest framework tips and tricks
Django rest framework   tips and tricksDjango rest framework   tips and tricks
Django rest framework tips and tricks
xordoquy
 
Introduction To Web Application Testing
Introduction To Web Application TestingIntroduction To Web Application Testing
Introduction To Web Application Testing
Ynon Perek
 
Pentesting Modern Web Apps: A Primer
Pentesting Modern Web Apps: A PrimerPentesting Modern Web Apps: A Primer
Pentesting Modern Web Apps: A Primer
Brian Hysell
 
Test automation & Seleniun by oren rubin
Test automation & Seleniun by oren rubinTest automation & Seleniun by oren rubin
Test automation & Seleniun by oren rubin
Oren Rubin
 
Testing Ext JS and Sencha Touch
Testing Ext JS and Sencha TouchTesting Ext JS and Sencha Touch
Testing Ext JS and Sencha Touch
Mats Bryntse
 
Introduction to Selenium and Ruby
Introduction to Selenium and RubyIntroduction to Selenium and Ruby
Introduction to Selenium and Ruby
Ynon Perek
 
External JavaScript Widget Development Best Practices (updated) (v.1.1)
External JavaScript Widget Development Best Practices (updated) (v.1.1) External JavaScript Widget Development Best Practices (updated) (v.1.1)
External JavaScript Widget Development Best Practices (updated) (v.1.1)
Volkan Özçelik
 
External JavaScript Widget Development Best Practices
External JavaScript Widget Development Best PracticesExternal JavaScript Widget Development Best Practices
External JavaScript Widget Development Best Practices
Volkan Özçelik
 
Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012
Volkan Özçelik
 
Banquet 50
Banquet 50Banquet 50
Banquet 50
Koubei UED
 
Bringing classical OOP into JavaScript
Bringing classical OOP into JavaScriptBringing classical OOP into JavaScript
Bringing classical OOP into JavaScript
Dmitry Sheiko
 
Javascript Test Automation Workshop (21.08.2014)
Javascript Test Automation Workshop (21.08.2014)Javascript Test Automation Workshop (21.08.2014)
Javascript Test Automation Workshop (21.08.2014)
Deutsche Post
 
Hacking Adobe Experience Manager sites
Hacking Adobe Experience Manager sitesHacking Adobe Experience Manager sites
Hacking Adobe Experience Manager sites
Mikhail Egorov
 
APIs: A Better Alternative to Page Objects
APIs: A Better Alternative to Page ObjectsAPIs: A Better Alternative to Page Objects
APIs: A Better Alternative to Page Objects
Sauce Labs
 
Code ceptioninstallation
Code ceptioninstallationCode ceptioninstallation
Code ceptioninstallation
Andrii Lagovskiy
 
Selenium webdriver
Selenium webdriverSelenium webdriver
Selenium webdriver
sean_todd
 
Ruxmon cve 2012-2661
Ruxmon cve 2012-2661Ruxmon cve 2012-2661
Ruxmon cve 2012-2661
snyff
 
Unit testing JavaScript: Jasmine & karma intro
Unit testing JavaScript: Jasmine & karma introUnit testing JavaScript: Jasmine & karma intro
Unit testing JavaScript: Jasmine & karma intro
Maurice De Beijer [MVP]
 
Efficient Rails Test-Driven Development - Week 6
Efficient Rails Test-Driven Development - Week 6Efficient Rails Test-Driven Development - Week 6
Efficient Rails Test-Driven Development - Week 6
Marakana Inc.
 
Defcon 23 - hariri spelman gorenc - abusing adobe readers java sc
Defcon 23 - hariri spelman gorenc - abusing adobe readers java scDefcon 23 - hariri spelman gorenc - abusing adobe readers java sc
Defcon 23 - hariri spelman gorenc - abusing adobe readers java sc
Felipe Prado
 
Django rest framework tips and tricks
Django rest framework   tips and tricksDjango rest framework   tips and tricks
Django rest framework tips and tricks
xordoquy
 
Introduction To Web Application Testing
Introduction To Web Application TestingIntroduction To Web Application Testing
Introduction To Web Application Testing
Ynon Perek
 
Pentesting Modern Web Apps: A Primer
Pentesting Modern Web Apps: A PrimerPentesting Modern Web Apps: A Primer
Pentesting Modern Web Apps: A Primer
Brian Hysell
 
Test automation & Seleniun by oren rubin
Test automation & Seleniun by oren rubinTest automation & Seleniun by oren rubin
Test automation & Seleniun by oren rubin
Oren Rubin
 
Testing Ext JS and Sencha Touch
Testing Ext JS and Sencha TouchTesting Ext JS and Sencha Touch
Testing Ext JS and Sencha Touch
Mats Bryntse
 
Introduction to Selenium and Ruby
Introduction to Selenium and RubyIntroduction to Selenium and Ruby
Introduction to Selenium and Ruby
Ynon Perek
 
External JavaScript Widget Development Best Practices (updated) (v.1.1)
External JavaScript Widget Development Best Practices (updated) (v.1.1) External JavaScript Widget Development Best Practices (updated) (v.1.1)
External JavaScript Widget Development Best Practices (updated) (v.1.1)
Volkan Özçelik
 
External JavaScript Widget Development Best Practices
External JavaScript Widget Development Best PracticesExternal JavaScript Widget Development Best Practices
External JavaScript Widget Development Best Practices
Volkan Özçelik
 
Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012
Volkan Özçelik
 
Bringing classical OOP into JavaScript
Bringing classical OOP into JavaScriptBringing classical OOP into JavaScript
Bringing classical OOP into JavaScript
Dmitry Sheiko
 
Javascript Test Automation Workshop (21.08.2014)
Javascript Test Automation Workshop (21.08.2014)Javascript Test Automation Workshop (21.08.2014)
Javascript Test Automation Workshop (21.08.2014)
Deutsche Post
 
Hacking Adobe Experience Manager sites
Hacking Adobe Experience Manager sitesHacking Adobe Experience Manager sites
Hacking Adobe Experience Manager sites
Mikhail Egorov
 
APIs: A Better Alternative to Page Objects
APIs: A Better Alternative to Page ObjectsAPIs: A Better Alternative to Page Objects
APIs: A Better Alternative to Page Objects
Sauce Labs
 
Selenium webdriver
Selenium webdriverSelenium webdriver
Selenium webdriver
sean_todd
 
Ruxmon cve 2012-2661
Ruxmon cve 2012-2661Ruxmon cve 2012-2661
Ruxmon cve 2012-2661
snyff
 
Unit testing JavaScript: Jasmine & karma intro
Unit testing JavaScript: Jasmine & karma introUnit testing JavaScript: Jasmine & karma intro
Unit testing JavaScript: Jasmine & karma intro
Maurice De Beijer [MVP]
 

Viewers also liked (16)

ASP.NET MVC Web API
ASP.NET MVC Web APIASP.NET MVC Web API
ASP.NET MVC Web API
Andrew Badera
 
The Future of ASP.NET
The Future of ASP.NETThe Future of ASP.NET
The Future of ASP.NET
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
Owin and-katana-overview
Owin and-katana-overviewOwin and-katana-overview
Owin and-katana-overview
sonia merchant
 
Owin e katana
Owin e katanaOwin e katana
Owin e katana
Tanato Cartaxo
 
ASP.NET MVC Web API -twMVC#8
ASP.NET MVC Web API -twMVC#8ASP.NET MVC Web API -twMVC#8
ASP.NET MVC Web API -twMVC#8
twMVC
 
Moving forward with ASP.NET Core
Moving forward with ASP.NET CoreMoving forward with ASP.NET Core
Moving forward with ASP.NET Core
Enea Gabriel
 
End to End Security with MVC and Web API
End to End Security with MVC and Web APIEnd to End Security with MVC and Web API
End to End Security with MVC and Web API
Michele Leroux Bustamante
 
Web api crud operations
Web api crud operationsWeb api crud operations
Web api crud operations
Eyal Vardi
 
Creating scalable message driven solutions akkadotnet
Creating scalable message driven solutions akkadotnetCreating scalable message driven solutions akkadotnet
Creating scalable message driven solutions akkadotnet
David Hoerster
 
Middlewares ASP.NET
Middlewares ASP.NETMiddlewares ASP.NET
Middlewares ASP.NET
Bruno Belarmino
 
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiASP.NET Mvc 4 web api
ASP.NET Mvc 4 web api
Tiago Knoch
 
AKFP At A Glance (2016)
AKFP At A Glance (2016)AKFP At A Glance (2016)
AKFP At A Glance (2016)
Al-Khidmat-Foundation-Pakistan
 
Web api 2 With MVC 5 With TrainerKrunal
Web api 2 With MVC 5 With TrainerKrunalWeb api 2 With MVC 5 With TrainerKrunal
Web api 2 With MVC 5 With TrainerKrunal
Krunal Trivedi
 
2015 Upload Campaigns Calendar - SlideShare
2015 Upload Campaigns Calendar - SlideShare2015 Upload Campaigns Calendar - SlideShare
2015 Upload Campaigns Calendar - SlideShare
SlideShare
 
What to Upload to SlideShare
What to Upload to SlideShareWhat to Upload to SlideShare
What to Upload to SlideShare
SlideShare
 
Getting Started With SlideShare
Getting Started With SlideShareGetting Started With SlideShare
Getting Started With SlideShare
SlideShare
 
Owin and-katana-overview
Owin and-katana-overviewOwin and-katana-overview
Owin and-katana-overview
sonia merchant
 
ASP.NET MVC Web API -twMVC#8
ASP.NET MVC Web API -twMVC#8ASP.NET MVC Web API -twMVC#8
ASP.NET MVC Web API -twMVC#8
twMVC
 
Moving forward with ASP.NET Core
Moving forward with ASP.NET CoreMoving forward with ASP.NET Core
Moving forward with ASP.NET Core
Enea Gabriel
 
Web api crud operations
Web api crud operationsWeb api crud operations
Web api crud operations
Eyal Vardi
 
Creating scalable message driven solutions akkadotnet
Creating scalable message driven solutions akkadotnetCreating scalable message driven solutions akkadotnet
Creating scalable message driven solutions akkadotnet
David Hoerster
 
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiASP.NET Mvc 4 web api
ASP.NET Mvc 4 web api
Tiago Knoch
 
Web api 2 With MVC 5 With TrainerKrunal
Web api 2 With MVC 5 With TrainerKrunalWeb api 2 With MVC 5 With TrainerKrunal
Web api 2 With MVC 5 With TrainerKrunal
Krunal Trivedi
 
2015 Upload Campaigns Calendar - SlideShare
2015 Upload Campaigns Calendar - SlideShare2015 Upload Campaigns Calendar - SlideShare
2015 Upload Campaigns Calendar - SlideShare
SlideShare
 
What to Upload to SlideShare
What to Upload to SlideShareWhat to Upload to SlideShare
What to Upload to SlideShare
SlideShare
 
Getting Started With SlideShare
Getting Started With SlideShareGetting Started With SlideShare
Getting Started With SlideShare
SlideShare
 

Similar to ASP.NET Web API O to 100 (20)

springtraning-7024840-phpapp01.pdf
springtraning-7024840-phpapp01.pdfspringtraning-7024840-phpapp01.pdf
springtraning-7024840-phpapp01.pdf
BruceLee275640
 
Building strong foundations apex enterprise patterns
Building strong foundations apex enterprise patternsBuilding strong foundations apex enterprise patterns
Building strong foundations apex enterprise patterns
andyinthecloud
 
Play Framework and Activator
Play Framework and ActivatorPlay Framework and Activator
Play Framework and Activator
Kevin Webber
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache Usergrid
David M. Johnson
 
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan KuštInfinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum
 
06.1 .Net memory management
06.1 .Net memory management06.1 .Net memory management
06.1 .Net memory management
Victor Matyushevskyy
 
The AngularJS way
The AngularJS wayThe AngularJS way
The AngularJS way
Boyan Mihaylov
 
Attributes, reflection, and dynamic programming
Attributes, reflection, and dynamic programmingAttributes, reflection, and dynamic programming
Attributes, reflection, and dynamic programming
LearnNowOnline
 
Advanced Server Integration with Data and Direct
Advanced Server Integration with Data and DirectAdvanced Server Integration with Data and Direct
Advanced Server Integration with Data and Direct
Sencha
 
Selenium digitalinfobytes-120829005812-phpapp02
Selenium digitalinfobytes-120829005812-phpapp02Selenium digitalinfobytes-120829005812-phpapp02
Selenium digitalinfobytes-120829005812-phpapp02
Kdeepapal Mishra
 
Basic Selenium Training
Basic Selenium TrainingBasic Selenium Training
Basic Selenium Training
Dipesh Bhatewara
 
Web-App Remote Code Execution Via Scripting Engines
Web-App Remote Code Execution Via Scripting EnginesWeb-App Remote Code Execution Via Scripting Engines
Web-App Remote Code Execution Via Scripting Engines
c0c0n - International Cyber Security and Policing Conference
 
walkmod: An open source tool for coding conventions
walkmod: An open source tool for coding conventionswalkmod: An open source tool for coding conventions
walkmod: An open source tool for coding conventions
walkmod
 
Refactoring Applications using SOLID Principles
Refactoring Applications using SOLID PrinciplesRefactoring Applications using SOLID Principles
Refactoring Applications using SOLID Principles
Steven Smith
 
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Nilesh Panchal
 
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
Speedment, Inc.
 
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
Malin Weiss
 
Introduction to Laravel Framework (5.2)
Introduction to Laravel Framework (5.2)Introduction to Laravel Framework (5.2)
Introduction to Laravel Framework (5.2)
Viral Solani
 
ASP.NET MVC 2.0
ASP.NET MVC 2.0ASP.NET MVC 2.0
ASP.NET MVC 2.0
Buu Nguyen
 
Microsoft power point automation-opensourcetestingtools_matrix-1
Microsoft power point   automation-opensourcetestingtools_matrix-1Microsoft power point   automation-opensourcetestingtools_matrix-1
Microsoft power point automation-opensourcetestingtools_matrix-1
tactqa
 
springtraning-7024840-phpapp01.pdf
springtraning-7024840-phpapp01.pdfspringtraning-7024840-phpapp01.pdf
springtraning-7024840-phpapp01.pdf
BruceLee275640
 
Building strong foundations apex enterprise patterns
Building strong foundations apex enterprise patternsBuilding strong foundations apex enterprise patterns
Building strong foundations apex enterprise patterns
andyinthecloud
 
Play Framework and Activator
Play Framework and ActivatorPlay Framework and Activator
Play Framework and Activator
Kevin Webber
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache Usergrid
David M. Johnson
 
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan KuštInfinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum
 
Attributes, reflection, and dynamic programming
Attributes, reflection, and dynamic programmingAttributes, reflection, and dynamic programming
Attributes, reflection, and dynamic programming
LearnNowOnline
 
Advanced Server Integration with Data and Direct
Advanced Server Integration with Data and DirectAdvanced Server Integration with Data and Direct
Advanced Server Integration with Data and Direct
Sencha
 
Selenium digitalinfobytes-120829005812-phpapp02
Selenium digitalinfobytes-120829005812-phpapp02Selenium digitalinfobytes-120829005812-phpapp02
Selenium digitalinfobytes-120829005812-phpapp02
Kdeepapal Mishra
 
walkmod: An open source tool for coding conventions
walkmod: An open source tool for coding conventionswalkmod: An open source tool for coding conventions
walkmod: An open source tool for coding conventions
walkmod
 
Refactoring Applications using SOLID Principles
Refactoring Applications using SOLID PrinciplesRefactoring Applications using SOLID Principles
Refactoring Applications using SOLID Principles
Steven Smith
 
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Nilesh Panchal
 
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
Speedment, Inc.
 
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
Malin Weiss
 
Introduction to Laravel Framework (5.2)
Introduction to Laravel Framework (5.2)Introduction to Laravel Framework (5.2)
Introduction to Laravel Framework (5.2)
Viral Solani
 
ASP.NET MVC 2.0
ASP.NET MVC 2.0ASP.NET MVC 2.0
ASP.NET MVC 2.0
Buu Nguyen
 
Microsoft power point automation-opensourcetestingtools_matrix-1
Microsoft power point   automation-opensourcetestingtools_matrix-1Microsoft power point   automation-opensourcetestingtools_matrix-1
Microsoft power point automation-opensourcetestingtools_matrix-1
tactqa
 

More from Himanshu Desai (12)

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

Recently uploaded (20)

Fully Open-Source Private Clouds: Freedom, Security, and Control
Fully Open-Source Private Clouds: Freedom, Security, and ControlFully Open-Source Private Clouds: Freedom, Security, and Control
Fully Open-Source Private Clouds: Freedom, Security, and Control
ShapeBlue
 
Multistream in SIP and NoSIP @ OpenSIPS Summit 2025
Multistream in SIP and NoSIP @ OpenSIPS Summit 2025Multistream in SIP and NoSIP @ OpenSIPS Summit 2025
Multistream in SIP and NoSIP @ OpenSIPS Summit 2025
Lorenzo Miniero
 
MCP Dev Summit - Pragmatic Scaling of Enterprise GenAI with MCP
MCP Dev Summit - Pragmatic Scaling of Enterprise GenAI with MCPMCP Dev Summit - Pragmatic Scaling of Enterprise GenAI with MCP
MCP Dev Summit - Pragmatic Scaling of Enterprise GenAI with MCP
Sambhav Kothari
 
From Legacy to Cloud-Native: A Guide to AWS Modernization.pptx
From Legacy to Cloud-Native: A Guide to AWS Modernization.pptxFrom Legacy to Cloud-Native: A Guide to AWS Modernization.pptx
From Legacy to Cloud-Native: A Guide to AWS Modernization.pptx
Mohammad Jomaa
 
SAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AI
SAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AISAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AI
SAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AI
Peter Spielvogel
 
System Card: Claude Opus 4 & Claude Sonnet 4
System Card: Claude Opus 4 & Claude Sonnet 4System Card: Claude Opus 4 & Claude Sonnet 4
System Card: Claude Opus 4 & Claude Sonnet 4
Razin Mustafiz
 
cloudgenesis cloud workshop , gdg on campus mita
cloudgenesis cloud workshop , gdg on campus mitacloudgenesis cloud workshop , gdg on campus mita
cloudgenesis cloud workshop , gdg on campus mita
siyaldhande02
 
Cognitive Chasms - A Typology of GenAI Failure Failure Modes
Cognitive Chasms - A Typology of GenAI Failure Failure ModesCognitive Chasms - A Typology of GenAI Failure Failure Modes
Cognitive Chasms - A Typology of GenAI Failure Failure Modes
Dr. Tathagat Varma
 
UiPath Community Zurich: Release Management and Build Pipelines
UiPath Community Zurich: Release Management and Build PipelinesUiPath Community Zurich: Release Management and Build Pipelines
UiPath Community Zurich: Release Management and Build Pipelines
UiPathCommunity
 
Kubernetes Cloud Native Indonesia Meetup - May 2025
Kubernetes Cloud Native Indonesia Meetup - May 2025Kubernetes Cloud Native Indonesia Meetup - May 2025
Kubernetes Cloud Native Indonesia Meetup - May 2025
Prasta Maha
 
Supercharge Your AI Development with Local LLMs
Supercharge Your AI Development with Local LLMsSupercharge Your AI Development with Local LLMs
Supercharge Your AI Development with Local LLMs
Francesco Corti
 
Cyber Security Legal Framework in Nepal.pptx
Cyber Security Legal Framework in Nepal.pptxCyber Security Legal Framework in Nepal.pptx
Cyber Security Legal Framework in Nepal.pptx
Ghimire B.R.
 
SDG 9000 Series: Unleashing multigigabit everywhere
SDG 9000 Series: Unleashing multigigabit everywhereSDG 9000 Series: Unleashing multigigabit everywhere
SDG 9000 Series: Unleashing multigigabit everywhere
Adtran
 
With Claude 4, Anthropic redefines AI capabilities, effectively unleashing a ...
With Claude 4, Anthropic redefines AI capabilities, effectively unleashing a ...With Claude 4, Anthropic redefines AI capabilities, effectively unleashing a ...
With Claude 4, Anthropic redefines AI capabilities, effectively unleashing a ...
SOFTTECHHUB
 
Master tester AI toolbox - Kari Kakkonen at Testaus ja AI 2025 Professio
Master tester AI toolbox - Kari Kakkonen at Testaus ja AI 2025 ProfessioMaster tester AI toolbox - Kari Kakkonen at Testaus ja AI 2025 Professio
Master tester AI toolbox - Kari Kakkonen at Testaus ja AI 2025 Professio
Kari Kakkonen
 
AI Emotional Actors: “When Machines Learn to Feel and Perform"
AI Emotional Actors:  “When Machines Learn to Feel and Perform"AI Emotional Actors:  “When Machines Learn to Feel and Perform"
AI Emotional Actors: “When Machines Learn to Feel and Perform"
AkashKumar809858
 
Cyber security cyber security cyber security cyber security cyber security cy...
Cyber security cyber security cyber security cyber security cyber security cy...Cyber security cyber security cyber security cyber security cyber security cy...
Cyber security cyber security cyber security cyber security cyber security cy...
pranavbodhak
 
Dev Dives: System-to-system integration with UiPath API Workflows
Dev Dives: System-to-system integration with UiPath API WorkflowsDev Dives: System-to-system integration with UiPath API Workflows
Dev Dives: System-to-system integration with UiPath API Workflows
UiPathCommunity
 
Talk: On an adventure into the depths of Maven - Kaya Weers
Talk: On an adventure into the depths of Maven - Kaya WeersTalk: On an adventure into the depths of Maven - Kaya Weers
Talk: On an adventure into the depths of Maven - Kaya Weers
Kaya Weers
 
What is DePIN? The Hottest Trend in Web3 Right Now!
What is DePIN? The Hottest Trend in Web3 Right Now!What is DePIN? The Hottest Trend in Web3 Right Now!
What is DePIN? The Hottest Trend in Web3 Right Now!
cryptouniversityoffi
 
Fully Open-Source Private Clouds: Freedom, Security, and Control
Fully Open-Source Private Clouds: Freedom, Security, and ControlFully Open-Source Private Clouds: Freedom, Security, and Control
Fully Open-Source Private Clouds: Freedom, Security, and Control
ShapeBlue
 
Multistream in SIP and NoSIP @ OpenSIPS Summit 2025
Multistream in SIP and NoSIP @ OpenSIPS Summit 2025Multistream in SIP and NoSIP @ OpenSIPS Summit 2025
Multistream in SIP and NoSIP @ OpenSIPS Summit 2025
Lorenzo Miniero
 
MCP Dev Summit - Pragmatic Scaling of Enterprise GenAI with MCP
MCP Dev Summit - Pragmatic Scaling of Enterprise GenAI with MCPMCP Dev Summit - Pragmatic Scaling of Enterprise GenAI with MCP
MCP Dev Summit - Pragmatic Scaling of Enterprise GenAI with MCP
Sambhav Kothari
 
From Legacy to Cloud-Native: A Guide to AWS Modernization.pptx
From Legacy to Cloud-Native: A Guide to AWS Modernization.pptxFrom Legacy to Cloud-Native: A Guide to AWS Modernization.pptx
From Legacy to Cloud-Native: A Guide to AWS Modernization.pptx
Mohammad Jomaa
 
SAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AI
SAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AISAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AI
SAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AI
Peter Spielvogel
 
System Card: Claude Opus 4 & Claude Sonnet 4
System Card: Claude Opus 4 & Claude Sonnet 4System Card: Claude Opus 4 & Claude Sonnet 4
System Card: Claude Opus 4 & Claude Sonnet 4
Razin Mustafiz
 
cloudgenesis cloud workshop , gdg on campus mita
cloudgenesis cloud workshop , gdg on campus mitacloudgenesis cloud workshop , gdg on campus mita
cloudgenesis cloud workshop , gdg on campus mita
siyaldhande02
 
Cognitive Chasms - A Typology of GenAI Failure Failure Modes
Cognitive Chasms - A Typology of GenAI Failure Failure ModesCognitive Chasms - A Typology of GenAI Failure Failure Modes
Cognitive Chasms - A Typology of GenAI Failure Failure Modes
Dr. Tathagat Varma
 
UiPath Community Zurich: Release Management and Build Pipelines
UiPath Community Zurich: Release Management and Build PipelinesUiPath Community Zurich: Release Management and Build Pipelines
UiPath Community Zurich: Release Management and Build Pipelines
UiPathCommunity
 
Kubernetes Cloud Native Indonesia Meetup - May 2025
Kubernetes Cloud Native Indonesia Meetup - May 2025Kubernetes Cloud Native Indonesia Meetup - May 2025
Kubernetes Cloud Native Indonesia Meetup - May 2025
Prasta Maha
 
Supercharge Your AI Development with Local LLMs
Supercharge Your AI Development with Local LLMsSupercharge Your AI Development with Local LLMs
Supercharge Your AI Development with Local LLMs
Francesco Corti
 
Cyber Security Legal Framework in Nepal.pptx
Cyber Security Legal Framework in Nepal.pptxCyber Security Legal Framework in Nepal.pptx
Cyber Security Legal Framework in Nepal.pptx
Ghimire B.R.
 
SDG 9000 Series: Unleashing multigigabit everywhere
SDG 9000 Series: Unleashing multigigabit everywhereSDG 9000 Series: Unleashing multigigabit everywhere
SDG 9000 Series: Unleashing multigigabit everywhere
Adtran
 
With Claude 4, Anthropic redefines AI capabilities, effectively unleashing a ...
With Claude 4, Anthropic redefines AI capabilities, effectively unleashing a ...With Claude 4, Anthropic redefines AI capabilities, effectively unleashing a ...
With Claude 4, Anthropic redefines AI capabilities, effectively unleashing a ...
SOFTTECHHUB
 
Master tester AI toolbox - Kari Kakkonen at Testaus ja AI 2025 Professio
Master tester AI toolbox - Kari Kakkonen at Testaus ja AI 2025 ProfessioMaster tester AI toolbox - Kari Kakkonen at Testaus ja AI 2025 Professio
Master tester AI toolbox - Kari Kakkonen at Testaus ja AI 2025 Professio
Kari Kakkonen
 
AI Emotional Actors: “When Machines Learn to Feel and Perform"
AI Emotional Actors:  “When Machines Learn to Feel and Perform"AI Emotional Actors:  “When Machines Learn to Feel and Perform"
AI Emotional Actors: “When Machines Learn to Feel and Perform"
AkashKumar809858
 
Cyber security cyber security cyber security cyber security cyber security cy...
Cyber security cyber security cyber security cyber security cyber security cy...Cyber security cyber security cyber security cyber security cyber security cy...
Cyber security cyber security cyber security cyber security cyber security cy...
pranavbodhak
 
Dev Dives: System-to-system integration with UiPath API Workflows
Dev Dives: System-to-system integration with UiPath API WorkflowsDev Dives: System-to-system integration with UiPath API Workflows
Dev Dives: System-to-system integration with UiPath API Workflows
UiPathCommunity
 
Talk: On an adventure into the depths of Maven - Kaya Weers
Talk: On an adventure into the depths of Maven - Kaya WeersTalk: On an adventure into the depths of Maven - Kaya Weers
Talk: On an adventure into the depths of Maven - Kaya Weers
Kaya Weers
 
What is DePIN? The Hottest Trend in Web3 Right Now!
What is DePIN? The Hottest Trend in Web3 Right Now!What is DePIN? The Hottest Trend in Web3 Right Now!
What is DePIN? The Hottest Trend in Web3 Right Now!
cryptouniversityoffi
 

ASP.NET Web API O to 100

Editor's Notes

  • #6: http://www.strathweb.com/2012/12/running-aspnet-web-api-with-owin-and-katana/Open Web Interface for .NETKatana is an OWIN implementation for Microsoft hosts (HttpListener, System.Web) and the Web API framework.
  • #7: 1. What it is?2. Basic template (Talk about layout and basic structure Routing/Verbs/Help pages, Default Formatters, Content Negotiation) 2a (Demo-Create a basic Web API as it is from box)3. Getting Started 3a (Demo-Modify the template which was created)
  • #8: 1. What it is?2. Basic template (Talk about layout and basic structure Routing/Verbs/Help pages, Default Formatters, Content Negotiation) 2a (Demo-Create a basic Web API as it is from box)3. Getting Started 3a (Demo-Modify the template which was created)
  • #13: Filters are used to handle cross cutting concernsFilter types:Action filters run before and after invoking an actionAuthorization filters run before model binding and are specifically for authorizing the userException filters handle generating responses for error cases in a centralized wayFilters can be configured globally, per controller, or per action as an attribute
  • #14: Talk about Exception Filter. Create sample filter to the pipeline and show it
  • #15: Simple types: Route data, query parametersComplex types Configured MediaTypeFormatters are used to deserialize the request body based the content type JSON, XML and form-url-encoded supported out of the box.
  • #16: http://blogs.msdn.com/b/jmstall/archive/2012/04/16/how-webapi-does-parameter-binding.aspxIf the parameter has no attribute on it, then the decision is made purely on the parameter’s .NET type.“Simple types” uses model binding. Complex types uses the formatters. A “simple type” includes:primitives, TimeSpan, DateTime, Guid, Decimal, String, or something with a TypeConverter that converts from strings.You can use a [FromBody] attribute to specify that a parameter should be from the body.You can use a [ModelBinder] attribute on the parameter or the parameter’s type to specify that a parameter should be model bound. This attribute also lets you configure the model binder.  [FromUri] is a derived instance of [ModelBinder] that specifically configures a model binder to only look in the URI.The body can only be read once.  So if you have 2 complex types in the signature, at least one of them must have a [ModelBinder] attribute on it.Differences with MVCHere are some differences between MVC and WebAPI’s parameter binding:MVC only had model binders and no formatters. That’s because MVC would model bind over the request’s body (which it commonly expected to just be FormUrl encoded), whereas WebAPI uses a serializer over the request’s body.MVC buffered the request body, and so could easily feed it into model binding. WebAPI does not buffer the request body, and so does not model bind against the request body by default.WebAPI’s binding can be determined entirely statically based off the action signature types. For example, in WebAPI, you know statically whether a parameter will bind against the body or the query string. Whereas in MVC, the model binding system would search both body and query string.
  • #17: http://blogs.msdn.com/b/jmstall/archive/2012/04/16/how-webapi-does-parameter-binding.aspx
  • #18: http://blogs.msdn.com/b/jmstall/archive/2012/04/16/how-webapi-does-parameter-binding.aspx
  • #19: http://blogs.msdn.com/b/jmstall/archive/2012/04/16/how-webapi-does-parameter-binding.aspx
  • #21: (QueryablevsODataResult<>) Demo OData (Queryable/ODataResult) (talk about what is supported:top,skip,filter and orderby)e.g demo three types of Querying, filtering and paging
  • #25: Simple types: Route data, query parametersComplex types Configured MediaTypeFormatters are used to deserialize the request body based the content type JSON, XML and form-url-encoded supported out of the box.
  • #26: e.g. BSON Formatter
  • #28: e.g.ETagHandler
  • #34: e.gBasicAuthenticationHandler