JavaScript/HTML5 Client

TH06 Building Web APIs to Support Your HTML/JavaScript Client

06/04/2015

9:30am - 10:45am

Level: Intermediate

Brian Noyes

CTO and Co-founder

Solliance

You are starting to build out your beautiful HTML 5 / JavaScript client (aka Single Page App) and you quickly realize - "I need a back end!" Not just to serve up your client side HTML/CSS/JS files, but Web APIs to support your AJAX calls, push and pull data, access back end logic and so on. You may be building those yourself as part of the same site, or you may need to consume Web APIs exposed on a different server or built by someone else. This talk will make sure you know what to do to build out some basic Web APIs using the ASP.NET Web API stack and get your front end talking coherently with your back end. You'll see how to quickly set up the Web APIs themselves, and then also learn how to properly design those Web APIs to support the appropriate verb at the appropriate time, how to do things like content negotiation, handle CORS requests for cross-domain access and more. You'll see both how to get things defined and hosted on the server side and how to call them on the client side. You'll learn what your options are to secure those calls and how to hook up the basics. By the end of the talk you will be well armed to put together Web APIs to support your front end.

You will learn:

  • How to expose Web APIs with ASP.NET and call them from your JavaScript clients
  • How to handle calling patterns, HTTP verbs, content negotiation, and CORS
  • How to secure your Web APIs from your clients