Enterprise Application Development with C# 10 and .NET 6
โ Scribed by Ravindra Akella, Arun Kumar Tamirisa, Suneel Kumar Kunani, Bhupesh Guptha Muthiyalu
- Publisher
- Packt Publishing
- Year
- 2022
- Tongue
- English
- Leaves
- 587
- Edition
- 2
- Category
- Library
No coin nor oath required. For personal study only.
โฆ Synopsis
A comprehensive guide to every important component of C# and .NET 6 required to build robust enterprise web applications
Key Features
- Explore the advanced features of C# and .NET 6 to enhance your code and productivity
- Follow clear and easy instructions for building an end-to-end enterprise application
- Learn how to build scalable web applications and host them on the cloud
Book Description
Building production-ready enterprise applications can be a challenging task due to the overabundance of tools and their different versions that make app development complex. This book simplifies the process with an end-to-end road map for building enterprise applications from scratch using the latest features of .NET Core 6 and C# 10.
Throughout the book, you'll work on creating an enterprise app, adding a key component to the app with each chapter, before finally getting it ready for testing and deployment. You'll learn concepts relating to advanced data structures, the Entity Framework Core, parallel programming, and dependency injection. As you progress, you'll cover various authentication and authorization schemes provided by .NET Core to make your apps and APIs secure. The book then shows you how the latest Microsoft Visual Studio and C# 10 help you simplify developer tasks and shares tips and tricks in Visual Studio to improve your productivity. You'll discover various testing techniques, such as unit testing and performance testing, as well as different methods to deploy enterprise apps.
By the end of this book, you'll be able to create enterprise apps using the powerful features of .NET 6 and deploy them to the cloud while working with various cloud components using Azure.
What you will learn
- Design enterprise apps by making the most of the latest features of .NET 6
- Discover different layers of an app, such as the data layer, API layer, and web layer
- Explore end-to-end architecture by implementing an enterprise web app using .NET and C# 10 and deploying it on Azure
- Focus on the core concepts of web application development and implement them in .NET 6
- Integrate the new .NET 6 health and performance check APIs into your app
- Explore MAUI and build an application targeting multiple platforms - Android, iOS, and Windows
Who this book is for
If you are a developer, architect, or senior programmer, this book will show you how to leverage the features of .NET 6 and the C# language, as well as help you grasp essential techniques to build your skills.
Table of Contents
- Designing and Architecting the Enterprise Application
- Introducing .NET 6 Core and Standard
- Introducing C# 10
- Threading and Asynchronous Operations
- Dependency Injection in .NET 6
- Configuration in .NET 6
- Logging in .NET 6
- All You Need to Know about Caching
- Working with Data in .NET6
- Creating an ASP.NET 6 Web API
- Creating an ASP.NET 6 Web application
- Understanding Authentication
- Implementing Authorization in .NET 6
- Health and Diagnostics
- Testing
- Deploying the Application in Azure
โฆ Table of Contents
Cover
Title
Copyright and Credits
Table of Contents
Part 1: Fundamentals
Chapter 1: Designing and Architecting the Enterprise Application
A primer on common design principles and patterns
Design principles
Design patterns
Understanding common enterprise architectures
Common issues with monolithic apps
Separation of concerns/single-responsibility architecture
Stateless services architecture
Event-driven architecture
Resiliency architecture
Identifying enterprise application requirements (business and technical)
The application's business requirements
The application's technical requirements
Architecting an enterprise application
Solution structuring of the application
Summary
Questions
Chapter 2: Introducing .NET 6 Core and Standard
Technical requirements
Introducing .NET 6
Understanding the core features
Understanding application frameworks
Understanding the core components of .NET
Setting up the development environment
Understanding the CLI
Overview of global.json
What is .NET Standard?
Understanding the use of .NET 6 and .NET Standard
Understanding .NET 6 cross-platform and cloud application support
Cloud support
Summary
Questions
Further reading
Chapter 3: Introducing C# 10
Technical requirements
Simplification of the using directives
The global using directives
The implicit using directives
The record structs
Improvements to Lambda expressions
Inferring the expression type
Return types for Lambda expressions
Adding attributes to Lambda expressions
Enhancements to interpolated strings
Extended property patterns
Addition to the caller argument attributes
Summary
Questions
Part 2: Cross-Cutting Concerns
Chapter 4: Threading and Asynchronous Operations
Technical requirements
Understanding the jargon
Demystifying threads, lazy initialization, and ThreadPool
Working with System.Threading.Thread
ThreadPool
Lazy initialization
Understanding locks, semaphores, and SemaphoreSlim
The critical section and thread safety
Introducing locks
Mutex (Windows only)
Introducing semaphores and SemaphoreSlim
Choosing the right synchronization constructs
Introducing tasks and parallels
Introduction to Task and the TPL
Handling task exceptions
Implementing task cancellation
Implementing continuations
SynchronizationContext
TaskScheduler
Implementing data parallelism
Using Parallel LINQ (PLINQ)
Introducing async-await
The task-based asynchronous pattern
Principles of using async-await
Async streams with IAsyncEnumerable
ThreadPool starvation
Using concurrent collections for parallelism
ConcurrentDictionary
Producer-consumer concurrent collections
The BlockingCollection
Summary
Questions
Further reading
Chapter 5: Dependency Injection in .NET 6
Technical requirements
What is DI?
Types of DI
DI in ASP.NET Core 6
Understanding service lifetimes
Managing application services
DI in Razor Pages
Using third-party containers
Summary
Questions
Chapter 6: Configuration in .NET Core
Technical requirements
Understanding configuration
Default configuration
Adding configurations
Reading configurations
Leveraging built-in configuration providers
Azure Key Vault configuration provider
File configuration provider
Building a custom configuration provider
Configuration source
Configuration provider
Configuration extension
Summary
Questions
Further reading
Chapter 7: Logging in .NET 6
Technical requirements
Characteristics of good logging
Understanding the available logging providers
Built-in logging providers
Third-party logging providers
Working with Azure App Service
Enabling application logging in Azure App Service
Monitoring using metrics
Real-time telemetry in Azure Application Insights
Enabling application logging in Application Insights
Creating a .NET 6 logging class library
Summary
Questions
Chapter 8: All You Need to Know about Caching
Technical requirements
Introduction to caching
Client caching
Content Delivery Network (CDN)
Web server caching
Database caching
Application caching
Understanding the components of caching
Response caching
Distributed caching
Cache access patterns
Caching platforms
In-memory cache
Distributed cache
Designing a cache abstraction layer using distributed caching
Caching considerations
Summary
Questions
Further reading
Part 3: Developing Enterprise Applications
Chapter 9: Working with Data in .NET 6
Technical requirements
Introduction to data
Relational database management system (RDBMS)
NoSQL
SQL, Azure Cosmos DB, and Azure Storage
SQL Server
Azure Cosmos DB
Azure Storage
Working with EF Core
Configuration and querying
Code first versus database first
Designing a Data Access service using Azure Cosmos DB
Summary
Questions
Further reading
Chapter 10: Creating an ASP.NET Core 6 Web API
Technical requirements
Introduction to REST
The REST maturity model
Understanding the internals of an ASP.NET Core 6 web API
The Program class
Understanding middleware
Handling requests using controllers and actions
Understanding ASP.NET Core routing
Attribute-based routing
The ControllerBase class, the ApiController attribute, and the ActionResult class
Integration with the data layer
Creating DTOs
Service-class contracts
The mapper class using AutoMapper
HttpClient factory for service-to-service calls
Implementing service classes
Implementing action methods in the controller
Understanding gRPC
Building a gRPC server in .NET
Building a gRPC client in .NET
Testing gRPC services
Summary
Questions
Further reading
Chapter 11: Creating an ASP.NET Core 6 Web Application
Technical requirements
Introduction to frontend web development
Razor syntax
Exploring Razor Pages
Exploring the ASP.NET Core MVC website
Integrating APIs with the service layer
Creating the controller and actions
Creating a UI using ASP.NET Core MVC
Setting up AdminLTE, the layout page, and views
Understanding Blazor
Summary
Questions
Further reading
Part 4: Security
Chapter 12: Understanding Authentication
Technical requirements
Understanding the elements of authentication in .NET 6
Introduction to ASP.NET Core Identity
Sample implementation
Scaffolding
Integration with external login providers
Understanding OAuth 2.0
Tokens
Authorization grant types
Introduction to Azure AD
The Azure AD B2C setup
Integrating our e-commerce application with Azure AD B2C
Introduction to Windows Authentication
Understanding best practices to secure client and server applications
Summary
Questions
Further reading
Chapter 13: Implementing Authorization in .NET 6
Technical requirements
Back to a few basics
Understanding authorization
Simple authorization
Enabling authorization globally
Role-based authorization
Policy-based role authorization
Implementing role-based authorization
Claims-based authorization
Policy-based authorization
Requirements
Requirement handlers
Registering a policy
Custom authorization
Custom authorization attributes
Authorization in client and server applications
Assigning roles to users
User identity in views
Summary
Questions
Further reading
Part 5: Health Checks, Unit Testing, Deployment, and Diagnostics
Chapter 14: Health and Diagnostics
Technical requirements
Introducing health checks
The health check API in ASP.NET Core 6
Adding a health check endpoint
Monitoring dependent URIs
Building a custom health check
Monitoring the application with Application Insights
Live Metrics
Usage analysis with Application Insights
Smart Detection
Application availability
Search
Logs
Configuring the Snapshot Debugger
Performing remote debugging
Summary
Questions
Further reading
Chapter 15: Testing
Technical requirements
Introducing testing
Unit testing
Unit testing in Visual Studio
Code coverage
Functional testing
Automating functional test cases
Load testing
Load testing with JMeter
Summary
Questions
Chapter 16: Deploying Applications in Azure
Technical requirements
Introducing Azure DevOps
Boards
Repos
Pipelines
Test Plans
Artifacts
Understanding the CI pipeline
Understanding the flow and components of a pipeline
Understanding the CD pipeline
Continuous deployment versus CD
Deploying an ASP.NET 6 application
Creating a pipeline for CI and CD
Summary
Questions
Further reading
Index
๐ SIMILAR VOLUMES
Leverage the power of .NET Core and C# to build cross-platform enterprise apps effectively. Key Features - Get familiar with the software architecture for .NET applications. - Understand how design patterns are implemented in C# and .NET. - Build high-performance cross-platform apps using the
<p><span>Become a professional .NET developer by learning expert techniques for building enterprise-grade applications</span></p><h4><span>Key Features</span></h4><ul><li><span><span>Explore the advanced features of C# and .NET 5 to enhance your code and productivity</span></span></li><li><span><spa
<p><b>Become a professional .NET developer by learning expert techniques for building enterprise-grade applications</b></p><h4>Key Features</h4><ul><li>Explore the advanced features of C# and .NET 5 to enhance your code and productivity</li><li>Follow clear and easy instructions for building an end-
<p>APPLICATION DEVELOPMENT IS USUALLY faced with several critical factors: time to market, ever-increasing quality, and cost of development. Time to market is critical in that any project that an individual or company may have in mind is probably already in the works elsewhere. When that is the case