Reader small image

You're reading from  ASP.NET 8 Best Practices

Product typeBook
Published inDec 2023
Reading LevelIntermediate
PublisherPackt
ISBN-139781837632121
Edition1st Edition
Languages
Right arrow
Author (1)
Jonathan R. Danylko
Jonathan R. Danylko
author image
Jonathan R. Danylko

Jonathan "JD" Danylko is an award-winning, full-stack ASP.NET architect. He's used ASP.NET as his primary way to build websites since 2002 and before that, Classic ASP. Jonathan contributes to his blog (DanylkoWeb) on a weekly basis, has built a custom CMS, is a founder of Tuxboard (an open-source ASP.NET dashboard library), has been on various podcasts, and guest posted on the C# Advent Calendar for 6 years. Jonathan has worked in various industries for small, medium, and Fortune 100 companies, but currently works as an Architect at Insight Enterprise. The best way to contact Jonathan is through GitHub, LinkedIn, Twitter, email, or through the website.
Read more about Jonathan R. Danylko

Right arrow

Summary

In this chapter, we learned about several techniques, such as how to design an API by disconnecting from technology by becoming a user of the application, identifying the resources, and using the right HTTP verbs and correct status codes. We also learned how to create, test, and document APIs, along with why minimal APIs are important. After, we learned how to use the new Endpoints Explorer in Visual Studio 2022, as well as how to build an automated end-to-end test of our APIs in a CI/CD pipeline.

Once we understood the process of writing APIs, we examined what standards were used in the industry to create common and useful APIs, such as using the correct HTTP verbs and status codes, avoiding large URLs, how to use pagination with APIs, versioning our API, using DTOs instead of entities, and the optimal way to use HttpClient when making API calls from .NET.

In the next chapter, we’ll look at how to improve performance across various topics we’ve covered...

lock icon
The rest of the page is locked
Previous PageNext Chapter
You have been reading a chapter from
ASP.NET 8 Best Practices
Published in: Dec 2023Publisher: PacktISBN-13: 9781837632121

Author (1)

author image
Jonathan R. Danylko

Jonathan "JD" Danylko is an award-winning, full-stack ASP.NET architect. He's used ASP.NET as his primary way to build websites since 2002 and before that, Classic ASP. Jonathan contributes to his blog (DanylkoWeb) on a weekly basis, has built a custom CMS, is a founder of Tuxboard (an open-source ASP.NET dashboard library), has been on various podcasts, and guest posted on the C# Advent Calendar for 6 years. Jonathan has worked in various industries for small, medium, and Fortune 100 companies, but currently works as an Architect at Insight Enterprise. The best way to contact Jonathan is through GitHub, LinkedIn, Twitter, email, or through the website.
Read more about Jonathan R. Danylko