Building a Web API for browser/JSON clients.

Slides:



Advertisements
Similar presentations
WHO AM I? REST? Dissertation by Roy Fielding 2000 Architectural Styles and the Design of Network-based Software Architectures ReST = Representational.
Advertisements

Background REST (Representational State Transfer) What does it mean to be RESTful? Why REST? WCF How does WCF support REST? What are the pieces we need.
Attie Naude 14 May 2013 Windows Azure Mobile Services.
Hypertext Transfer PROTOCOL ----HTTP Sen Wang CSE5232 Network Programming.
1 Configuring Internet- related services (April 22, 2015) © Abdou Illia, Spring 2015.
What’s New in ASP.NET 4.5 Ori Calvo, 2012 John Bryce Hi-Tech College
Securing web applications using Java EE Dr Jim Briggs 1.
Building Web APIs in Windows Azure Name Title Microsoft Corporation.
Introduction to push technology © 2009 Research In Motion Limited.
Web API for Mobile JaxARCSIG April About Me David Fekke L.L.C. Mobile apps for iOS Regular presenter at JaxDUG, JSSUG and JaxFusion Writing Web.
06 | Implementing Web APIs Jon Galloway | Tech Evangelist Christopher Harrison | Head Geek.
 Proxy Servers are software that act as intermediaries between client and servers on the Internet.  They help users on private networks get information.
Microsoft ® Official Course Monitoring and Troubleshooting Custom SharePoint Solutions SharePoint Practice Microsoft SharePoint 2013.
Kay Herzam Herzam IT Consulting What‘s new in ASP.NET MS TechTalk.
Windows.Net Programming Series Preview. Course Schedule CourseDate Microsoft.Net Fundamentals 01/13/2014 Microsoft Windows/Web Fundamentals 01/20/2014.
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control Maarten
ASP.NET MVC Tips and Tricks Al Wilkinson. Hi! I’m Al  First program in Logo in 1985 in 1st grade #loveatfirstbyte  Started HTML in 1996, led to web.
JavaScript & jQuery the missing manual Chapter 11
Building Data Driven Applications Using WinRT and XAML Sergey Barskiy, Magenic Microsoft MVP – Data Platform Principal Consultant Level: Intermediate.
Remotely authenticating against the Service Framework.
4-1 INTERNET DATABASE CONNECTOR Colorado Technical University IT420 Tim Peterson.
ASP. Net is a rich web framework that leverages well known patterns and JavaScript frameworks to build great web experiences quickly.
ASP.NET Web API Udaiappa Ramachandran NHDN-Nashua.NET/Cloud Computing UG Lead Blog:
Building HTTP Services with ASP.NET Web API Sayed Ibrahim Hashimi Program Manager Microsoft Corporation DEV309.
 You’re already a Web Site Dev  You’re interested in more simply making your web sites more responsive  If you’re not already hosting sites in.
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.
Simple for you while still delighting your users.
1 82 nd IETF meeting NETCONF over WebSocket ( ) Tomoyuki Iijima, (Hitachi) Hiroyasu Kimura,
AxKit A member of the Apache XML project Ryan Maslyn Kyle Bechtel.
 Registry itself is easy and straightforward in implementation  The objects of registry are actually complicated to store and manage  Objects of Registry.
Welcome to Azure App Services! Amie Seisay
REpresentational State Transfer.  Resources  Representations  Verbs  Links  Headers  HTTP Status Codes.
Getting started with ASP.NET MVC Dhananjay
ArcGIS Online: Sharing your Content Ben Ramseth John Thieling.
06 | HTTP Services with Web API Bruno Terkaly | Technical Evangelist Bret Stateham | Technical Evangelist.
ICM – API Server & Forms Gary Ratcliffe.
Simplicity Tile Update Notification Service Tile Update Notification Service SOAP Windows Communication Foundation Windows Web Services SOAP.
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
Welcome to Azure App Services! Amie Seisay
Java Programming: Advanced Topics 1 Building Web Applications Chapter 13.
Data lifecycle (CRUD+) Operation logic, query, databinding, change tracking, unit of work Validation User: authn/authz/profile.
Virtual techdays INDIA │ 9-11 February 2011 SESSION TITLE Kamala Rajan S │ Technical Manager, Marlabs.
Keith Telle Lead Software Engineer Bit Wizards REST, WebAPI 2, and Best Practices.
WebApi: What is it? How can I use it? Guy In Front of the Whittaker.
Modern Development Technologies in SharePoint SHAREPOINT SATURDAY OMAHA APRIL, 2016.
Authored by Frank Hamelly, Microsoft MVP Regional Chapters.
ASP.NET WEB API Napredne tehnike i mogućnosti RENATO JOVIĆ, Tagit Adriatica d.o.o.
Wes Hackett Principal Solutions Architect Chris O’Brien Head of Development.
ASP.NET Architecture Mike Taulty Developer & Platform Group Microsoft Ltd
Module 4: Troubleshooting Web Servers. Overview Use IIS 7.0 troubleshooting features to gather troubleshooting information Use the Runtime Control and.
Developers Introduction to the Power BI Platform.
Building Azure Mobile Apps
Windows Communication Foundation and Web Services
Migrating SharePoint Add-ins from Azure ACS to Azure AD
J2EE Lecture 7: Spring – Spring MVC
ASP.NET Web Forms and Web Services
SharePoint Cloud hosted Apps
IOS SDK v1.0 with NAM 4.2.
API Application Services
Configuring Internet-related services
Building HTTP Services with ASP.NET Web API
1/16/2019 8:14 PM SAC-863T Delivering notifications with the Windows Push Notification Service and Windows Azure Darren Louie, Nick Harris Program Manager,
Building HTTP services for modern client apps
TechEd /22/2019 9:22 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Lighting Up Real-time Web Communications with SignalR
REST på Microsoft-stacken
WCF Data Services and Silverlight
Erik Porter Program Manager ASP.NET Microsoft Corporation
#01# ASP.NET Core Overview Design by: TEDU Trainer: Bach Ngoc Toan
Chengyu Sun California State University, Los Angeles
Presentation transcript:

Building a Web API for browser/JSON clients

WHY? Allow browser clients to easily retrieve information from your system

WebApi and WebApi.Enhancements nugets WebGet attribute defines the uri template Return JsonValue / List, you don’t have to craft a CLR type

WHY? Enable client / intermediary caching Handle status codes Add links via link headers

Return HttpResponseMessage to modify response headers Throw HttpResponseException to stop processing immediately and return a response, such as a status 404

WHY? Allow clients to modify the state of the server

Use WebInvoke for specifying HTTP method Use HttpResponseMessage to access headers like location header Use WebApi.Enhancements to support FormUrlEncoding On IIS, make sure to configure to allow PUT/DELETE

WHY? Allow clients to send files from a browser

IsMimeMultipartContent – Checks if multipart MultipartFormDataStreamProvider - parses the streams BodyPartFileNames – returns the list of files sent in the stream

WHY? Change common settings like MaxRecievedMessageSize Enable web api test client Wire up an IoC container Enable Security Configure handlers and formatters Adding Custom Error Handlers

HttpConfiguration provides a code based configuation mechanism New it up directly or derive from it Pass config to HttpServiceHostFactory /HttpServiceHost

Building a Web API for any client

WHY? Tweak our Xml/Json formatters OData clients Other native / non-browser clients Custom media types

Modify HttpConfiguration.Formatters to add/remove formatters Formatters.XmlFormatter / Formatters.JsonFormatter to tweak existing formatters ODataMediaTypeFormatter Derive from MediaTypeFormatter to create your own custom

What’s on our road map?

OAuth 2.0 / Basic over HTTPs RIA Services integration Deeper integration with ASP.NET MVC / richer routing support OData linking Deeper Azure integration: ServiceBus, Caching

Where can you get it?

Nuget packages  WebApi  WebApi.OData  JsonValue  HttpClient  WebApi.Enhancements

Why Web APIs are important How to author Web APIs for multiple clients How configure a Web API Enabling HTML File Upload Enabling OData and custom formats Using the Web API test client

TOPOL-796T: ASP.NET 4.5 loves HTML5, CSS3 & JavaScript TOOL-797T: It’s not a great phone app without ASP.NET services and push notifications TOOL-800T: Building data-driven HTML5 apps with WCF RIA Services TOOL-803T: Enabling Mobile apps with ASP.NET MVC SAC-807T: Building real-time web apps with WebSockets using IIS, ASP.NET and WCF RELATED SESSIONS wcf.codeplex.com blogs.msdn.com/gblock codebetter.com/howard DOCUMENTATION & ARTICLES