Call Us: +32 2 466 00 16
Email: info@u2u.be
Follow Us:

Building REST Services with ASP.NET Web API

2days
Training code
UWAPI

Upcoming sessions

30 Aug 2018
29 Oct 2018
17 Dec 2018
Book this course

The HTTP Protocol

A surprising amount of developers don't know how HTTP works. Since this is the foundation for REST, we'll do a quick recap.

  • Http Verbs
  • Headers
  • Status Codes
  • Redirection
  • Caching

REST

  • The State of the Web
  • How REST works
  • REST versus SOAP

Introducing ASP.NET Web API

Not WCF, but ASP.NET turned out to be the best platform for REST. The MVC approach works very well for REST and that's why Web API is an adapted version of ASP.NET MVC specifically designed for REST. This module serves as an overview of the framework.

  • Architecture
  • CRUD operations
  • Feature Overview

Consuming a ASP.NET Web API REST service from .NET

Web API builds the server. But you also need a client. This can be any application as long as it supports HTTP. This can be a web site, a desktop app, a mobile app,... In this module we'll take a look at what .NET provides for client-side consumption.

  • HttpClient and WebHttpRequest Class
  • Serialization and Deserialization

Client-side service consumption with jQuery

Once you've built your server with Web API, you can pull the data to the client-side by using jQuery Ajax.

  • JSON serialization
  • Getting data using jQuery AJAX
  • Uploading and updating entities through REST: POST, PUT, DELETE

ASP.NET Web API Routing

This URL plus that verb means do that thing. Having full control over this is not difficult, but essential for any Web API developer.

  • Convention-based routing
  • Routing Attributes
  • Routing Errors

ASP.NET Web API Controllers

In this module we'll take a closer look at the C in MVC. The controller has a very important role to fulfill: It's the component that figures out what to do when receiving a request.

  • The ApiController Class
  • Action Methods
  • IHttpActionResult
  • Filters

Content Negotiation with ASP.NET Web API

I want JSON, but this other guy wants XML and a third guy wants CSV. This module will teach you how to handle such a case with minimal overhead.

  • Media types
  • Built-in Content Negotiation
  • Custom Formatters

OData Overview

Just like SQL is a query language for databases, ODATA is a query language for REST. This allows the client to specify exactly what it wants to receive. At the same time the server is still in control of what is allowed and what not. This module is about the ODATA standard itself.

  • What is ODATA
  • ODATA formats
  • Developing with ODATA
  • Client and Server
  • Querying ODATA services

Building OData REST Services with ASP.NET Web API

The previous module handles ODATA in a theoretical way. This module will show you how to implement ODATA with Web API.

  • Building an ODATA service using Web API
  • Creating the Controller
  • Configure Web API
  • Adding Features

Consuming OData REST in .NET

Server? Check! Now let's build a client.

  • ODATA Service Proxy
  • MetaData
  • Querying ODATA services
  • Modifying data
  • Actions

Model Validation

  • Model binding
  • The Modelstate
  • Validation Attributes
  • Returning validation errors

Securing your Web API service

Security is a world on its own. In this module we'll explore the common techniques to secure your Web API.

  • Authentication & Authorization
  • Authorization Attributes
  • Authentication in HTTP
  • Authentication Options
  • Cross-Site Request Forgery

Getting your data from one side to the other. It's a persistent problem for developers. By using the HTTP as the application protocol; REST is a reliable, performant and easy approach for building Web Services. ASP.NET Web API is Microsoft's answer to the growing demand, and is built up from the ground to alleviate REST development.

Participants of this course need to have a solid understanding of the .NET platform and have built .NET applications using either C# or VB.NET. Knowledge about ASP.NET MVC or ASP.NET in general is a plus.

© 2018 U2U All rights reserved.