Book Image

Mastering ASP.NET Web API

By : Mithun Pattankar
Book Image

Mastering ASP.NET Web API

By: Mithun Pattankar

Overview of this book

Microsoft has unified their main web development platforms. This unification will help develop web applications using various pieces of the ASP.NET platform that can be deployed on both Windows and LINUX. With ASP.NET Core (Web API), it will become easier than ever to build secure HTTP services that can be used from any client. Mastering ASP.NET Web API starts with the building blocks of the ASP.NET Core, then gradually moves on to implementing various HTTP routing strategies in the Web API. We then focus on the key components of building applications that employ the Web API, such as Kestrel, Middleware, Filters, Logging, Security, and Entity Framework.Readers will be introduced to take the TDD approach to write test cases along with the new Visual Studio 2017 live unit testing feature. They will also be introduced to integrate with the database using ORMs. Finally, we explore how the Web API can be consumed in a browser as well as by mobile applications by utilizing Angular 4, Ionic and ReactJS. By the end of this book, you will be able to apply best practices to develop complex Web API, consume them in frontend applications and deploy these applications to a modern hosting infrastructure.
Table of Contents (14 chapters)

What this book covers

Chapter 1, Introduction to Microservices and Service-Oriented Architecture, discusses the state of service-oriented architecture trends in the industry, as well as what microservices architecture brings to the table.

Chapter 2, Understanding HTTP and REST, refreshes the concept of web architecture and describes the core technology and concept behind HTTP and its methods, and you will be introduced to the REST architecture style.

Chapter 3, Anatomy of ASP.NET Core Web API, takes you on a journey to understand why web API was incepted, as well as gets you started on creating ASP.NET Core Web API and understanding its anatomy.

Chapter 4, Controllers, Actions, and Models, covers the core concept of how a request interacts with a controller, works with the controller dispatch process, customizes the controller dispatch process, and works with the action method results.

Chapter 5, Implementing Routing, helps you in understanding how routing maps incoming HTTP requests to its corresponding controller's action methods.

Chapter 6, Middleware and Filters, delves deep into one of ASP.NET Core's prominent feature--Middleware and Filters.

Chapter 7, Perform Unit and Integration Testing, explains how to write unit tests and perform integration testing for the web API.

Chapter 8, Web API Security, explores concepts on identification, authentication, and authorization for the web API.

Chapter 9, Integration with Database, integrates with various database using ORM such as EF 6, EF Core, and Dapper.

Chapter 10, Error Handling, Tracing, and Logging, explores the ASP.NET Core's in-built logging feature, and shows you how to write efficient error handling code.

Chapter 11, Optimization and Performance, explains the asynchronous ways of writing web API, and how to apply the caching technique for a better web API performance.

Chapter 12, Hosting and Deployment, deploys the ASP.NET Core Web API on various platforms such as IIS, Stand-alone, Docker, Azure, Linux, and so on. It showcases its true cross-platforms nature.

Chapter 13, Modern Web Frontends, consumes the web API developed from previous chapters in UI frameworks such as Angular, Ionic, React, and so on.