Building Services with ASP.NET Web API
Coming September 2017…
About this Course
Services expose data and processes through APIs (Application Programming Interfaces) implemented using common approaches or standards. Decoupling our back-end from our front-end makes it possible for our services to support multiple client apps. We can even allow other developers and organizations to consume and use our services to further broaden the reach of our applications.
In this course, you'll learn how to use the ASP.NET Web API framework to build a RESTful service or HTTP API. As you learn about Web API, you'll create a service for the Fitness Frog single-page web app (SPA) developed using Angular.
What you'll learn
- Designing a REST API
- Adding Web API to an Existing Project
- Defining Routes and Adding API Controllers
- Implementing Validation and Handling Errors
- Writing Unit Tests and Debugging Your API
Planning Our Service
We'll start with an introduction to services and an overview of REST APIs before we start designing the API for the Fitness Frog single-page web app. Then we'll take a closer look at the Web API framework including an exploration of its request/response pipeline.
Building Our Service
Let's add Web API to our project and add our first API controller! We'll see how to define routes using convention or configuration and explore how Web API's model binding maps incoming request data to our controller method parameters. We'll also see how response types give us control over our responses and how content negotiation simplifies the serialization process while offering flexibility to our users.
Completing Our Service
Now we're ready to complete the service for the Fitness Frog single-page web app. Along the way we'll learn how to set up dependency injection, configure the JSON serializer, add error handling, validate incoming data, and more!
Before joining the Treehouse team, James worked as a consultant for over 10 years doing web development using .NET and variety of open source technologies. James enjoys participating in the developer community, presenting at and attending meetups, code camps, and conferences. When not working, James enjoys learning, skiing, playing music, and watching movies. Find him on Twitter @SmashDev.