03 | Web API Configuration

Slides:



Advertisements
Similar presentations
Pierre-Johan CHARTRE Java EE - JAX-RS - Pierre-Johan CHARTRE
Advertisements

WHO AM I? REST? Dissertation by Roy Fielding 2000 Architectural Styles and the Design of Network-based Software Architectures ReST = Representational.
SE 370: Programming Web Services Week 4: SOAP & NetBeans Copyright © Steven W. Johnson February 1, 2013.
A division of Publishing Technology Facet Building Web Pages With SPARQL SWIG-UK Event, HP Labs November 23 rd 2007 Leigh Dodds Chief Technology Officer,
High Performance Faceted Interfaces Using S2S Eric Rozell, Tetherless World Constellation.
06 | Implementing Web APIs Jon Galloway | Tech Evangelist Christopher Harrison | Head Geek.
Jon Flanders INT303. About Me  Jon Flanders –  Independent consultant/trainer  BizTalk MVP.
Alonso Robles Solutions Architect speakTECH
Windows.Net Programming Series Preview. Course Schedule CourseDate Microsoft.Net Fundamentals 01/13/2014 Microsoft Windows/Web Fundamentals 01/20/2014.
Building Data Driven Applications Using WinRT and XAML Sergey Barskiy, Magenic Microsoft MVP – Data Platform Principal Consultant Level: Intermediate.
ASP. Net is a rich web framework that leverages well known patterns and JavaScript frameworks to build great web experiences quickly.
Build: Optimizing Your Job Board For Better Performance Lessons learned from 2014 design updates to CorridorCareers.com.
Designing and Implementing Web Data Services in Perl
XP New Perspectives on XML, 2 nd Edition Tutorial 10 1 WORKING WITH THE DOCUMENT OBJECT MODEL TUTORIAL 10.
ASP.NET Web API Udaiappa Ramachandran NHDN-Nashua.NET/Cloud Computing UG Lead Blog:
Eric Westfall – Indiana University Jeremy Hanson – Iowa State University Building Applications with the KNS.
Building HTTP Services with ASP.NET Web API Sayed Ibrahim Hashimi Program Manager Microsoft Corporation DEV309.
HeuristicLab. Motivation  less memory pressure no DOM single pass linear process  less developer effort no interfaces to implement  modularity & flexibility.
GET Examples – db.org/sops/3/experimental_conditions/55http://seek.sysmo- db.org/sops/3/experimental_conditions/55 –
ASP.NET Web API. ASP.NET Members MS Open Source ASP.NET MVC 4, ASP.NET Web API and ASP.NET Web Pages v2 (Razor) now all open source ASP.NET MVC 4, ASP.NET.
JQuery UI. Slide 2 Introduction From the jQuery UI Home Page jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built.
Or, Hey can’t we just do it using HTTP for the envelope?
Enabling High-Quality Printing in Web Applications
Tracing 1www.tech.findforinfo.com. Contents Why Tracing Why Tracing Tracing in ASP.NET Tracing in ASP.NET Page Level tracing Page Level tracing Application.
DDI & Model-View-Controller: An Architectural Perspective Dennis Wegener, Matthäus Zloch, Thomas Bosch (GESIS) Dagstuhl,
Introduction to Web AppBuilder for ArcGIS: JavaScript Apps Made Easy
JSP Tag Libraries Lec Last Lecture Example We incorporated JavaBeans in “Course Outline” Example But still have to write java code inside java.jsp.
Building a Web API for browser/JSON clients.
ATNA Repository Access Rob Horn. Problem How to aggregate federated audit repositories How to extract audit records for processing How to use media/files/etc.
06 | HTTP Services with Web API Bruno Terkaly | Technical Evangelist Bret Stateham | Technical Evangelist.
ASP.NET User Controls. User Controls In addition to using Web server controls in your ASP.NET Web pages, you can create your own custom, reusable controls.
RESTful Web Services What is RESTful?
RESTful Web Services A MIDAS MISSION PRESENTATION APRIL 29, 2015.
Martin Kruliš by Martin Kruliš (v1.1)1.
Lecture IV: REST Web Service
Apache Web Server Architecture Chaitanya Kulkarni MSCS rd April /23/20081Apache Web Server Architecture.
PRO/ARC and TST/PRO joint sessions at TP20 Group Name: oneM2M TP20 Source: Peter Niblett, IBM Meeting Date:
CMS 2: Advanced Web Editing - Content Presented By: Katie Pagano, Special Projects Manager Steve Pont, Product Architect.
Craig Pelkie Copyright © 2015, Craig Pelkie ALL RIGHTS RESERVED Use RPG to Mobilize your IBM i.
WebApi: What is it? How can I use it? Guy In Front of the Whittaker.
ASP.NET WEB API Napredne tehnike i mogućnosti RENATO JOVIĆ, Tagit Adriatica d.o.o.
1 Mashup Workflow. 2 What We Have 3 Challenges with REST APIs * Only ask what its built to answer * No standard - must relearn each time * Opaque - no.
Data and tools on the Web have been exposed in a RESTful manner. Taverna provides a custom processor for accessing such services.
CS3220 Web and Internet Programming RESTful Web Service
XML-RPC Web Services in WinCC OA An Application: online PARA JCOP FWWG Meeting Lorenzo Masetti.
Building Web Applications with Microsoft ASP
Node.js Express Web Applications
RESTful Non-Patient Instance Storage (NPIS)
Web API Design Jeremy Likness | Principal Architect
XML in Web Technologies
Getting started with Alfresco Development
Workforce Ready REST API Overview.
Ashish Pandit IT Architect, Middleware & Integration Services
The Re3gistry software and the INSPIRE Registry
02 | Web API Basic Design Jeremy Likness | Principal Architect
Step by Step - AngularJS
DotnetConf 11/17/ :06 AM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE.
SIF 3.x Concepts & Terms, xPress & RicOne API
Welcome - webinar instructions
MIX 09 12/9/2018 6:08 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Building HTTP Services with ASP.NET Web API
Building HTTP services for modern client apps
04 | Advanced Functions Jeffrey Snover | Distinguished Engineer & Lead Architect Jason Helmick | Senior Technologist, Concentrated Technology.
Chengyu Sun California State University, Los Angeles
REST på Microsoft-stacken
Web AppBuilder for ArcGIS
Introduction to .NET Florin Olariu
#01# ASP.NET Core Overview Design by: TEDU Trainer: Bach Ngoc Toan
Chengyu Sun California State University, Los Angeles
Chengyu Sun California State University, Los Angeles
Presentation transcript:

03 | Web API Configuration Jeremy Likness | Principal Architect Christopher Harrison | Content Developer

Module Overview Media Formatters Camel Case and Serializers Routes and Actions Attribute Routing Custom Content Negotiation

What’s your vector, Victor? Media Formatters What’s your vector, Victor?

Media Formatters Media type = MIME type Examples: text/html, application/xml, application/json Accept (what it wants), Content-Type (what it gets) Built in formatters: XML, JSON, BSON, form-encoded Create custom with MediaTypeFormatter, BufferedMediaTypeFormatter

Custom Media Formatter: CSV Export

Configuring the existing formatters Camel Case and Serializers Configuring the existing formatters

Camel Case and Serializers MediaFormatter performs serialization Several SerializerSettings

Proper JavaScript Case

The perfect marriage between a URI and your code Routes and Actions The perfect marriage between a URI and your code

Routes and Actions Route template Api/{controller}/public/{resource}/{id} controller = controller name action = action (usually omitted) Provide default values defaults: new { resource = “widgets” } Constrain constraints: new { id = @”\d+” } Optional RouteParameter.Optional

{controller}+ Controller Routes and Actions Select Controller Route Dictionary {controller}+ Controller {controller} [type] Select Action HTTP Method {action} (params) Controller .Method()

It’s the new style to get what you want Attribute Routing It’s the new style to get what you want

Attribute Routing Child resources Add the attribute to the controller action Must enable in configuration: config.MapHttpAttributeRoutes(); Use RoutePrefix for a common prefix on the controller tilde to override (i.e. “~/api/overrideprefix”) May include parameters Pass constraints (int, alpha, bool, etc.)

Routing and Actions

When what’s there isn’t enough Custom Content Negotiation When what’s there isn’t enough

Custom Content Negotiation MediaTypeMappings QueryStringMapping UriPathExtensionMapping RequestHeaderMapping Own Formatter Derive from default, override MapRequestMediaType Implement IContentNegotiator

Custom Content Negotiation