
عنوان:
ASP.NET Core in Action, Third Edition
نویسنده:
Andrew Lock
انتشارات:
Manning Publications
تاریخ انتشار:
2023
حجم:
12.5MB
معرفی کتاب:" ASP.NET Core در عمل – ویرایش سوم "
کتاب ASP.NET Core in Action – ویرایش سوم، نوشتهی اندرو لاک (Andrew Lock)، برنامهنویس برجسته و Microsoft MVP، راهنمایی جامع و بهروز برای توسعهدهندگان میانردهی #C است تا بتوانند اپلیکیشنهای وب کراسپلتفرم، حرفهای و مدرن را با استفاده از ASP.NET Core پیادهسازی کنند.
در این نسخه جدید، مفاهیم نوین NET. مانند Minimal APIs و Minimal Hosting بهطور کامل پوشش داده شدهاند. حتی اگر تجربهی قبلی با ASP.NET نداشته باشید، این کتاب مسیر شما را هموار میکند.
ویژگیهای کلیدی کتاب:
- ساخت Minimal APIs برای ارسال دادههای JSON به کلاینت
- ایجاد صفحات داینامیک با Razor Pages
- پیادهسازی احراز هویت (Authentication) و سطحبندی دسترسی (Authorization)
- استفاده از Entity Framework Core برای کار با دیتابیس
- نوشتن تستهای واحد و تستهای یکپارچهسازی در پروژههای ASP.NET Core
- توسعه Middleware و کامپوننتهای سفارشی
درباره تکنولوژی:
ASP.NET Core یکی از محبوبترین فریمورکهای توسعه وب است که با بهرهگیری از ابزارها و کتابخانههای آماده، سرعت و کارایی توسعه را افزایش میدهد. این فریمورک امکان ساخت اپلیکیشنهایی با:
- APIهای مبتنی بر HTTP
- صفحات HTML رندرشده سمت سرور
- فرآیندهای طولانیمدت در بکاند
را تنها با یک ساختار یکپارچه فراهم میسازد.
نسخه 7.0 این فریمورک ویژگیهایی چون Minimal APIs سادهتر، بهبودهای عملکردی، و قابلیتهای جدید زبان C# را به همراه دارد.
فهرست مطالب
- inside front cover
- ASP.NET Core in Action
- Copyright
- Praise for the Second Edition
- contents
- front matter
- Chapter 1. Getting started with ASP.NET Core
- 1.1 What is ASP.NET Core?
- 1.2 What types of applications can you build?
- 1.3 Choosing ASP.NET Core
- 1.4 How does ASP.NET Core work?
- 1.5 What you’ll learn in this book
- Summary
- Part 1. Getting started with minimal APIs
- Chapter 2. Understanding ASP.NET Core
- 2.1 Using a web framework
- 2.2 Why ASP.NET Core was created
- 2.3 Understanding the many paradigms of ASP.NET Core
- 2.4 When to choose ASP.NET Core
- Summary
- Chapter 3. Your first application
- 3.1 A brief overview of an ASP.NET Core application
- 3.2 Creating your first ASP.NET Core application
- 3.3 Running the web application
- 3.4 Understanding the project layout
- 3.5 The .csproj project file: Declaring your dependencies
- 3.6 Program.cs file: Defining your application
- 3.7 Adding functionality to your application
- Summary
- Chapter 4. Handling requests with the middleware pipeline
- 4.1 Defining middleware
- 4.2 Combining middleware in a pipeline
- 4.3 Handling errors using middleware
- Summary
- Chapter 5. Creating a JSON API with minimal APIs
- 5.1 What is an HTTP API, and when should you use one?
- 5.2 Defining minimal API endpoints
- 5.3 Generating responses with IResult
- 5.4 Running common code with endpoint filters
- 5.5 Organizing your APIs with route groups
- Summary
- Chapter 6. Mapping URLs to endpoints using routing
- 6.1 What is routing?
- 6.2 Endpoint routing in ASP.NET Core
- 6.3 Exploring the route template syntax
- 6.4 Generating URLs from route parameters
- Summary
- Chapter 7. Model binding and validation in minimal APIs
- 7.1 Extracting values from a request with model binding
- 7.2 Binding simple types to a request
- 7.3 Binding complex types to the JSON body
- 7.4 Arrays: Simple types or complex types?
- 7.5 Making parameters optional with nullables
- 7.6 Binding services and special types
- 7.7 Custom binding with BindAsync
- 7.8 Choosing a binding source
- 7.9 Simplifying handlers with AsParameters
- 7.10 Handling user input with model validation
- Summary
- Part 2. Building complete applications
- Chapter 8. An introduction to dependency injection
- 8.1 Understanding the benefits of dependency injection
- 8.2 Creating loosely coupled code
- 8.3 Using dependency injection in ASP.NET Core
- 8.4 Adding ASP.NET Core framework services to the container
- 8.5 Using services from the DI container
- Summary
- Chapter 9. Registering services with dependency injection
- 9.1 Registering custom services with the DI container
- 9.2 Registering services using objects and lambdas
- 9.3 Registering a service in the container multiple times
- 9.4 Understanding lifetimes: When are services created?
- 9.5 Resolving scoped services outside a request
- Summary
- Chapter 10. Configuring an ASP.NET Core application
- 10.1 Introducing the ASP.NET Core configuration model
- 10.2 Building a configuration object for your app
- 10.3 Using strongly typed settings with the options pattern
- 10.4 Configuring an application for multiple environments
- Summary
- Chapter 11. Documenting APIs with OpenAPI
- 11.1 Adding an OpenAPI description to your app
- 11.2 Testing your APIs with Swagger UI
- 11.3 Adding metadata to your minimal APIs
- 11.4 Generating strongly typed clients with NSwag
- 11.5 Adding descriptions and summaries to your endpoints
- 11.6 Knowing the limitations of OpenAPI
- Summary
- Chapter 12. Saving data with Entity Framework Core
- 12.1 Introducing Entity Framework Core
- 12.2 Adding EF Core to an application
- 12.3 Managing changes with migrations
- 12.4 Querying data from and saving data to the database
- 12.5 Using EF Core in production applications
- Summary
- Part 3. Generating HTML with Razor Pages and MVC
- Chapter 13. Creating a website with Razor Pages
- 13.1 Your first Razor Pages application
- 13.2 Exploring a typical Razor Page
- 13.3 Understanding the MVC design pattern
- 13.4 Applying the MVC design pattern to Razor Pages
- Summary
- Chapter 14. Mapping URLs to Razor Pages using routing
- 14.1 Routing in ASP.NET Core
- 14.2 Convention-based routing vs. explicit routing
- 14.3 Routing requests to Razor Pages
- 14.4 Customizing Razor Page route templates
- 14.5 Generating URLs for Razor Pages
- 14.6 Customizing conventions with Razor Pages
- Summary
- Chapter 15. Generating responses with page handlers in Razor Pages
- 15.1 Razor Pages and page handlers
- 15.2 Selecting a page handler to invoke
- 15.3 Accepting parameters to page handlers
- 15.4 Returning IActionResult responses
- 15.5 Handler status codes with StatusCodePagesMiddleware
- Summary
- Chapter 16. Binding and validating requests with Razor Pages
- 16.1 Understanding the models in Razor Pages and MVC
- 16.2 From request to binding model: Making the request useful
- 16.3 Validating binding models
- 16.4 Organizing your binding models in Razor Pages
- Summary
- Chapter 17. Rendering HTML using Razor views
- 17.1 Views: Rendering the user interface
- 17.2 Creating Razor views
- 17.3 Creating dynamic web pages with Razor
- 17.4 Layouts, partial views, and _ViewStart
- Summary
- Chapter 18. Building forms with Tag Helpers
- 18.1 Catering to editors with Tag Helpers
- 18.2 Creating forms using Tag Helpers
- 18.3 Generating links with the Anchor Tag Helper
- 18.4 Cache-busting with the Append Version Tag Helper
- 18.5 Using conditional markup with the Environment Tag Helper
- Summary
- Chapter 19. Creating a website with MVC controllers
- 19.1 Razor Pages vs. MVC in ASP.NET Core
- 19.2 Your first MVC web application
- 19.3 Comparing an MVC controller with a Razor Page PageModel
- 19.4 Selecting a view from an MVC controller
- 19.5 Choosing between Razor Pages and MVC controllers
- Summary
- Chapter 20. Creating an HTTP API using web API controllers
- 20.1 Creating your first web API project
- 20.2 Applying the MVC design pattern to a web API
- 20.3 Attribute routing: Linking action methods to URLs
- 20.4 Using common conventions with [ApiController]
- 20.5 Generating a response from a model
- 20.6 Choosing between web API controllers and minimal APIs
- Summary
- Chapter 21. The MVC and Razor Pages filter pipeline
- 21.1 Understanding the MVC filter pipeline
- 21.2 The Razor Pages filter pipeline
- 21.3 Filters or middleware: Which should you choose?
- 21.4 Creating a simple filter
- 21.5 Adding filters to your actions and Razor Pages
- 21.6 Understanding the order of filter execution
- Summary
- Chapter 22. Creating custom MVC and Razor Page filters
- 22.1 Creating custom filters for your application
- 22.2 Understanding pipeline short-circuiting
- 22.3 Using dependency injection with filter attributes
- Summary
- Part 4. Securing and deploying your applications
- Chapter 23. Authentication: Adding users to your application with Identity
- 23.1 Introducing authentication and authorization
- 23.2 What is ASP.NET Core Identity?
- 23.3 Creating a project that uses ASP.NET Core Identity
- 23.4 Adding ASP.NET Core Identity to an existing project
- 23.5 Customizing a page in ASP.NET Core Identity’s default UI
- 23.6 Managing users: Adding custom data to users
- Summary
- Chapter 24. Authorization: Securing your application
- 24.1 Introduction to authorization
- 24.2 Authorization in ASP.NET Core
- 24.3 Using policies for claims-based authorization
- 24.4 Creating custom policies for authorization
- 24.5 Controlling access with resource-based authorization
- 24.6 Hiding HTML elements from unauthorized users
- Summary
- Chapter 25. Authentication and authorization for APIs
- 25.1 Authentication for APIs and distributed applications
- 25.2 Understanding bearer token authentication
- 25.3 Adding JWT bearer authentication to minimal APIs
- 25.4 Using the user-jwts tool for local JWT testing
- 25.5 Describing your authentication requirements to OpenAPI
- 25.6 Applying authorization policies to minimal API endpoints
- Summary
- Chapter 26. Monitoring and troubleshooting errors with logging
- 26.1 Using logging effectively in a production app
- 26.2 Adding log messages to your application
- 26.3 Controlling where logs are written using logging providers
- 26.4 Changing log verbosity with filtering
- 26.5 Structured logging: Creating searchable, useful logs
- Summary
- Chapter 27. Publishing and deploying your application
- 27.1 Understanding the ASP.NET Core hosting model
- 27.2 Publishing your app to IIS
- 27.3 Hosting an application in Linux
- 27.4 Configuring the URLs for your application
- Summary
- Chapter 28. Adding HTTPS to an application
- 28.1 Why do I need HTTPS?
- 28.2 Using the ASP.NET Core HTTPS development certificates
- 28.3 Configuring Kestrel with a production HTTPS certificate
- 28.4 Enforcing HTTPS for your whole app
- Summary
- Chapter 29. Improving your application’s security
- 29.1 Defending against cross-site scripting (XSS) attacks
- 29.2 Protecting from cross-site request forgery (CSRF) attacks
- 29.3 Calling your web APIs from other domains using CORS
- 29.4 Exploring other attack vectors
- Summary
- Part 5. Going further with ASP.NET Core
- Chapter 30. Building ASP.NET Core apps with the generic host and Startup
- 30.1 Separating concerns between two files
- 30.2 The Program class: Building a Web Host
- 30.3 The Startup class: Configuring your application
- 30.4 Creating a custom IHostBuilder
- 30.5 Understanding the complexity of the generic host
- 30.6 Choosing between the generic host and minimal hosting
- Summary
- Chapter 31. Advanced configuration of ASP.NET Core
- 31.1 Customizing your middleware pipeline
- 31.2 Using DI with OptionsBuilder and IConfigureOptions
- 31.3 Using a third-party dependency injection container
- Summary
- Chapter 32. Building custom MVC and Razor Pages components
- 32.1 Creating a custom Razor Tag Helper
- 32.2 View components: Adding logic to partial views
- 32.3 Building a custom validation attribute
- 32.4 Replacing the validation framework with FluentValidation
- Summary
- Chapter 33. Calling remote APIs with IHttpClientFactory
- 33.1 Calling HTTP APIs: The problem with HttpClient
- 33.2 Creating HttpClients with IHttpClientFactory
- 33.3 Handling transient HTTP errors with Polly
- 33.4 Creating a custom HttpMessageHandler
- Summary
- Chapter 34. Building background tasks and services
- 34.1 Running background tasks with IHostedService
- 34.2 Creating headless worker services using IHost
- 34.3 Coordinating background tasks using Quartz.NET
- Summary
- Chapter 35. Testing applications with xUnit
- 35.1 An introduction to testing in ASP.NET Core
- 35.2 Creating your first test project with xUnit
- 35.3 Running tests with dotnet test
- 35.4 Referencing your app from your test project
- 35.5 Adding Fact and Theory unit tests
- 35.6 Testing failure conditions
- Summary
- Chapter 36. Testing ASP.NET Core applications
- 36.1 Unit testing custom middleware
- 36.2 Unit testing API controllers and minimal API endpoints
- 36.3 Integration testing: Testing your whole app in-memory
- 36.4 Isolating the database with an in-memory EF Core provider
- Summary
- Appendix A. Preparing your development environment
- Appendix B. Useful references
- Index
- Inside back cover
مشخصات
نام کتاب
ASP.NET Core in Action, Third Edition
نویسنده
Andrew Lock
انتشارات
Manning Publications
تاریخ انتشار
2023
ISBN
9781633438620
چاپ
اول
تعداد صفحات
1895
زبان
انگلیسی
فرمت
حجم
12.5MB
موضوع
asp.net core