Coding Clean, Reliable, and Safe REST APIs with ASP. NET Core 8: Develop Robust Minimal APIs With . NET 8
معرفی کتاب «Coding Clean, Reliable, and Safe REST APIs with ASP. NET Core 8: Develop Robust Minimal APIs With . NET 8» نوشتهٔ Anthony Giretti، منتشرشده توسط نشر Apress L. P. در سال 2023. این کتاب در 438 صفحه، فرمت pdf، زبان انگلیسی ارائه شده است. «Coding Clean, Reliable, and Safe REST APIs with ASP. NET Core 8: Develop Robust Minimal APIs With . NET 8» در دستهٔ برنامهنویسی قرار دارد.
Learn ASP.NET Core APIs delivered in its latest version of the Microsoft Framework: .NET 8. This book will show you how to develop APIs with ASP.NET Core 8. Author Anthony Giretti will reveal all you need to know about HTTP protocol, REST architecture style, and ASP.NET Core 8. You will learn what reflexes and mindset a developer must have to approach the development of an API of medium complexity. By performing CRUD operations on a SQL Server database, you will see how to set up a clean and reliable application with industry best practices (clean code, security, observability, optimization and testing). After completing Coding Clean, Reliable, and Safe REST APIs with ASP.NET Core 8, you will be able to develop many kinds of APIs that require a senior developer level of knowledge and provide your customers with high-quality APIs. What You Will Learn • Discover the latest version of ASP.NET Core 8 • Code REST APIs with minimal APIs • Become familiar with clean code principles • Optimize performances with caching, background tasks and more • Make APIs resilient by handling SQL and HttpClient transient errors • Understand the importance of observability • Implement Authentication and Authorization • Grasp OWASP principles • Protect sensitive data • Master unit testing best practices Who This Book Is For Beginner and intermediate professionals wishing to build clean, reliable and safe ASP.NET Core APIs and elevate their skills to a senior developer level. Table of Contents About the Author About the Technical Reviewer Acknowledgments Prerequisites Introduction Chapter 1: Introducing HTTP and REST Unveiling HTTP Behind the Web The Characteristics of HTTP HTTP Requests and Responses HTTP Implementation HTTP Verbs HTTP Status Codes Request and Response Headers Request Headers Controls Headers Conditional Headers Content Negotiation Headers Authentication Credentials Headers Request Context Headers Response Headers Control Data Headers Validator Header Fields Authentication Challenges Headers Response Context Headers URI, URL, and More URI URL And Others... Parameters Error Handling HTTPS, TLS, and HSTS Let’s Put the Pieces of the Puzzle Back Together Extend Your Talent on the Web with REST Architecture Style REST Constraints REST Good Practices Base URL Media Type URL Naming API Versioning API Documentation Summary Chapter 2: Introducing ASP.NET Core 8 ASP.NET Core Fundamentals ASP.NET Core Web API ASP.NET Core Minimal APIs Summary Chapter 3: Introduction to Application Development Best Practices Getting the Right Frame of Mind A Basic Understanding of the Business Problem-Solving Skills Understanding Programming Paradigms Logical and Structured Thinking Clean Architecture Fundamentals Clean Code Fundamentals General Coding Fundamentals Coding Style Fundamentals OWASP Principles Summary Chapter 4: Basics of Clean REST APIs Routing with ASP.NET Core 8 ASP.NET Core Routing Setting Up the Correct HTTP Verb Writing Routes Using Route Constraints RouteGroups Parameter Binding What’s Precisely Parameter Binding? Parameter Binding by Example Validating Inputs Object Mapping Managing CRUD Operations and HTTP Statuses Handling HTTP Statuses Creating the Services to Handle CRUD Operations Creating the Endpoints to Handle CRUD Operations MapPost("/countries", () => { }) MapGet("/countries/{id}", () => { }) MapDelete(“/countries/{id}”, () => { }) MapPut(“/countries/{id}”, () => { }) MapPatch(“/countries/{id}”, () => { }) Downloading and Uploading Files Downloading Files Uploading Files Uploading a Single File or Many Files Without Any Payload Uploading a Single File or Many Files with a Payload Validating an Uploaded File Streaming Content Handling CORS API Versioning Versioning by Headers Versioning by Route Documenting APIs Managing API Versions in Swagger Adding Comments on Endpoints Grouping Endpoints by Tag Other Customizations Hiding an Endpoint Deprecating an Endpoint Describing Endpoint Responses Summary Chapter 5: Going Further with Clean REST APIs Encapsulating Minimal Endpoint Implementation Implementing Custom Parameter Binding Example of Custom Parameter Binding from Headers Example of Custom Parameter Binding from the From Data Using Middlewares Using Action Filters Using Rate Limiting The Fixed Window Model The Sliding Window Model The Token Bucket Model The Concurrency Model Global Error Management Summary Chapter 6: Accessing Data Safely and Efficiently Introduction to Data Access Best Practices SQL-Type Data Access HTTP Data Access Architecturing Data Access Accessing Data with Entity Framework Core 8 Step 1: Creating the CountryEntity Class Step 2: Creating the EF Core Context Step 3: Configuring the CountryEntity Step 4: Generating the Database Model from C# Step 5: Enabling Resiliency with Entity Framework Core Step 6: Writing the Repository on Top of the CountryEntity Accessing Data with HttpClient and REST APIs Using IHttpClientFactory to Make HTTP Requests Using Refit to Make HTTP Requests Using Polly to Make HTTP Requests Resilient Summary Chapter 7: Optimizing APIs Asynchronous Programming Basics of Asynchronous Programming Using CancellationToken Long-Running Tasks with Background Services Paging JSON Streaming Caching Output Cache In-Memory Cache Distributed Cache Speeding Up HTTP Requests with HTTP/2 and HTTP/3 Summary Chapter 8: Introduction to Observability Basics of Observability Performing Logging Performing Tracing and Metrics Data Collection Implementing HealthCheck Liveness HealthCheck Readiness HealthCheck Summary Chapter 9: Managing Application Secrets Introduction to Application Secret Management Example with Azure Key Vault Summary Chapter 10: Secure Your Application with OpenID Connect Introduction to OpenID Connect Configuring Authentication and Authorization in ASP.NET Core Passing a JWT into Requests and Getting the User’s Identity Summary Chapter 11: Testing APIs Introduction to Testing Efficient Unit Testing Using the Right Tools Testing a SUT Step-by-Step Identify What to Test Create the Test Class Write the Test Write the Constructor Write the Arrange Section Write the Act Section Write the Assert Section Summary Index
دانلود کتاب Coding Clean, Reliable, and Safe REST APIs with ASP. NET Core 8: Develop Robust Minimal APIs With . NET 8