Architecting ASP.NET Core Applications 1st edition by Carl-Hugo Marcotte – Ebook PDF Instant Download/DeliveryISBN: 1805129309, 9781805129301
Full download Architecting ASP.NET Core Applications 1st edition after payment.
Product details:
ISBN-10 : 1805129309
ISBN-13 : 9781805129301
Author: Carl Hugo Marcotte
This unique ASP.NET Core book will fill in the gaps in your REST API and backend designs. Learn how to build robust, maintainable, and flexible apps using Gang of Four (GoF) design patterns and modern architectural principles. This new edition is updated for .NET 8 and focuses exclusively on the backend, with new content on REST APIs, the REPR pattern, and building modular monoliths. You’ll start by covering foundational concepts like REST, the SOLID principles, Minimal APIs, dependency injection in .NET, and other ASP.NET Core 8 mechanisms. Then, you’ll learn to develop components using design patterns, including many from the GoF. Finally, you’ll explore organizing your application code with patterns that vary from layers to feature-oriented vertical slice designs, covering CQS and a deep dive into microservices along the way.
Architecting ASP.NET Core Applications 1st Table of contents:
Section 1: Principles and Methodologies
Introduction
What is a design pattern?
Anti-patterns and code smells
Anti-patterns
Anti-pattern: God class
Code smells
Code smell: Control Freak
Code smell: long methods
Understanding the web: request/response
Getting started with .NET
.NET SDK versus runtime
.NET 5+ versus .NET Standard
The command-line interface versus Visual Studio Code versus Visual Studio
An overview of project templates
Running and building your program
Technical requirements
Summary
Questions
Further reading
Answers
Automated Testing
An overview of automated testing
Unit testing
Integration testing
End-to-end testing
Other types of tests
Finding the right balance
Enhancing code quality
Improving quality with refactoring
Managing technical debt
Testing approaches
TDD
ATDD
BDD
Testing techniques
White-box testing
Black-box testing
Gray-box testing
White-box vs. black-box vs. gray-box testing
Conclusion
Test case creation
Equivalence partitioning
Boundary value analysis
Decision table testing
State transition testing
Use case testing
Introducing the xUnit framework
How to create an xUnit test project
Key xUnit features
FactAttribute
Assertions
TheoryAttribute
Fixture
Arrange, Act, Assert
Organizing your tests
Unit tests
Namespaces
Test class names
Test code inside the test class
Integration tests
Writing ASP.NET Core integration tests
Classic web application
Minimal hosting
Workaround
Alternative to using fixtures
Creating a reusable test application
Important testing principles
Summary
Questions
Further reading
Answers
Architectural Principles
Separation of concerns (SoC)
Don’t repeat yourself (DRY)
Keep it simple, stupid (KISS)
You Aren’t Gonna Need It (YAGNI)
The SOLID principles
Single responsibility principle (SRP)
Project – Single Responsibility
Open/closed principle (OCP)
Project – Open Close
Liskov substitution principle (LSP)
The LSP explained
Covariance and contravariance
Project – Liskov Substitution
Conclusion
Interface segregation principle (ISP)
What is an interface?
Project – Interface Segregation
Conclusion
Dependency inversion principle (DIP)
Direct dependency
Inverted dependency
Direct subsystems dependency
Inverted subsystems dependency
Project – Dependency inversion
Conclusion
Summary
Questions
Further reading
Answers
REST APIs
REST and HTTP
HTTP methods
HTTP status codes
HTTP headers
Versioning
Default versioning strategy
Versioning strategy
Wrapping up
The Data Transfer Object (DTO) pattern
Goal
Design
Conceptual examples
Registering for an activity
Fetching activity registration details
Conclusion
API contracts
Code-first API contract
The first endpoint
The second endpoint
Wrapping up
Summary
Questions
Further reading
Answers
Section 2: Designing with ASP.NET Core
Minimal APIs
Top-level statements
Minimal hosting
Minimal APIs
Mapping a route to a delegate
Configuring endpoints
Inputs
Outputs
Metadata
Configuring JSON serialization
Leveraging endpoint filters
Leveraging the endpoint filter factory
Organizing endpoints
MapGroup
Creating a custom Map extension method
Class libraries
Using Minimal APIs with Data Transfer Objects
Goal
Design
Project – Minimal API
Raw CRUD endpoints
DTO-enabled endpoints
Conclusion
Summary
Questions
Further reading
Answers
Model-View-Controller
The MVC design pattern
Goal
Design
Anatomy of ASP.NET Core web APIs
The entry point
Directory structure
Controller
Returning values
Attribute routing
Conclusion
Using MVC with DTOs
Goal
Design
Project – MVC API
Raw CRUD controller
DTO controller
Conclusion
Summary
Questions
Further reading
Answers
Strategy, Abstract Factory, and Singleton Design Patterns
The Strategy design pattern
Goal
Design
Project – Strategy
Conclusion
The Abstract Factory design pattern
Goal
Design
Project – Abstract Factory
Project – the mid-range vehicle factory
Impacts of the Abstract Factory
Conclusion
The Singleton design pattern
Goal
Design
An alternative (better) way
Code smell – Ambient Context
Conclusion
Summary
Questions
Answers
Dependency Injection
What is dependency injection?
The composition root
Striving for adaptability
Understanding the use of the IoC container
The role of an IoC container
Code smell – Control Freak
Stable dependencies
Volatile dependencies
Conclusion
Object lifetime
What’s an object’s lifetime?
.NET object lifetime
Registering our dependencies
Registering your features elegantly
Project – Registering the demo feature
Using external IoC containers
Revisiting the Strategy pattern
Constructor injection
Property injection
Method injection
Project – Strategy
Shared building blocks
Control Freak controllers
Injecting an implementation in the controllers
Injecting an abstraction in the controller
Constructing the InjectAbstractionLocationsController
Conclusion
Revisiting the Singleton pattern
Project – Application state
First implementation
Second implementation
Using the implementations
Project – Wishlist
Conclusion
Understanding guard clauses
Understanding the Service Locator pattern
Project – ServiceLocator
Implementing method injection
Implementing constructor injection
Implementing a minimal API
Conclusion
Revisiting the Factory pattern
Project – Factory
Summary
Questions
Further reading
Answers
Application Configuration and the Options Pattern
Loading the configuration
Learning the options interfaces
IOptionsMonitor
IOptionsFactory
IOptionsSnapshot
IOptions
Exploring common usage scenarios
Manual configuration
Using the settings file
Injecting options
Named options
IOptionsFactory
IOptionsMonitor
IOptionsSnapshot
Bind options to an existing object
Reloading options at runtime
Learning options configuration
Creating the program
Configuring the options
Implementing a configurator object
Adding post-configuration
Using multiple configurator objects
Exploring other configuration possibilities
Validating our options objects
Eager validation
Data annotations
Validation types
Validating options using FluentValidation
Injecting options objects directly
Centralizing the configuration for easier management
Using the configuration-binding source generator
Using the options validation source generator
Using the ValidateOptionsResultBuilder class
Wrapping up
Summary
Questions
Further reading
Answers
Logging Patterns
What is logging?
Writing logs
Log levels
Logging providers
Configuring logging
Structured logging
Summary
Questions
Further reading
Answers
Section 3: Component Patterns
Structural Patterns
The Decorator design pattern
Goal
Design
Project – Adding behaviors
DecoratorA
DecoratorB
Project – Decorator using Scrutor
Conclusion
The Composite design pattern
Goal
Design
Project – BookStore
Conclusion
The Adapter design pattern
Goal
Design
Project – Greeter
Conclusion
The Façade design pattern
Goal
Design
Project – The façades
Opaque façade
Transparent façade
The program
Flexibility in action
Alternative façade patterns
Conclusion
Summary
Questions
Further reading
Answers
Behavioral Patterns
The Template Method pattern
Goal
Design
Project – Building a search machine
Unit tests
Conclusion
The Chain of Responsibility pattern
Goal
Design
Project – Message interpreter
Conclusion
Mixing the Template Method and Chain of Responsibility patterns
Project – Improved message interpreter
Project – A final, finer-grained design
Conclusion
Summary
Questions
Answers
Operation Result Pattern
The Operation Result pattern
Goal
Design
Project – Implementing different Operation Result patterns
The Program.cs file
The simplest form of the Operation Result pattern
A single error message
Adding a return value
Multiple error messages
Adding message severity
Sub-classes and factories
Project – Registration Application
Advantages and disadvantages
Advantages
Disadvantages
Conclusion
Summary
Questions
Further reading
Answers
Section 4: Application Patterns
Anti-pattern – Big Ball of Mud
Layering and Clean Architecture
Introducing layering
Classic layering model
Splitting the layers
Layers versus tiers versus assemblies
What is a tier?
What is a layer?
What is an assembly?
Responsibilities of the common layers
Presentation
Domain
Rich domain model
Anemic domain model
The Service layer
Data
Overview of the Repository pattern
Overview of the Unit of Work pattern
Abstract layers
Sharing the model
Clean Architecture
Implementing layering in real life
To be or not to be a purist?
Building a façade over a database
Summary
Questions
Further reading
Answers
Object Mappers
The Object Mapper pattern
Goal
Design
Project – Mapper
Conclusion
Code smell – too many dependencies
Overview of the Aggregate Services pattern
Implementing a mapping façade
Implementing a mapping service
Exploring AutoMapper
Project – AutoMapper
Exploring Mapperly
Project – Mapperly
Summary
Questions
Further reading
Answers
Mediator and CQS Patterns
A high-level overview of Vertical Slice Architecture
The Mediator pattern
Goal
Design
Project – Mediator (IMediator)
Project – Mediator (IChatRoom)
Conclusion
The CQS pattern
Goal
Design
Project – CQS
Conclusion
Code smell – Marker Interfaces
Metadata
Dependency identifier
Using MediatR as a mediator
Project – Clean Architecture with MediatR
Summary
Questions
Further reading
Answers
Getting Started with Vertical Slice Architecture
Vertical Slice Architecture
What are the advantages and disadvantages?
Advantages
Disadvantages
Downsides or upsides?
Project – Vertical Slice Architecture
Project organization
Exploring a feature
Testing
Continuing your journey – a few tips and tricks
Agile and DevOps synergy
Conclusion
Summary
Questions
Further reading
Answers
Request-EndPoint-Response (REPR)
The Request-EndPoint-Response (REPR) pattern
Goal
Design
Project – SimpleEndpoint
Feature: ShuffleText
Feature: RandomNumber
Feature: UpperCase
Conclusion
An e-commerce application—a slice of the real-world
Assembling our stack
Dissecting the code structure
Exploring the shopping basket
AddItem feature
Managing exception handling
Creating an exception handler middleware
Exception handling using ExceptionMapper
Leveraging exceptions to propagate errors
Gray-box testing
AddItemTest
Summary
Questions
Further reading
Answers
Introduction to Microservices Architecture
What are microservices?
Cohesive unit of business
Ownership of data
Microservice independence
An introduction to Event-Driven Architecture
Types of events
Domain events
Integration events
Application events
Enterprise events
Getting started with message queues
Overview of the Publish-Subscribe pattern
Message brokers
Overview of the Event Sourcing pattern
Example
Conclusion
Introducing Gateway patterns
Overview of the Gateway Routing pattern
Overview of the Gateway Aggregation pattern
Overview of the Backend for Frontend pattern
Mixing and matching gateways
People also search for Architecting ASP.NET Core Applications 1st:
architecting asp.net core applications
architecting asp.net core applications – third edition
architecting asp.net core applications github
architecting asp net core applications book
architecting asp net core applications free download
Tags:
Architecting,ASP NET,Core Applications,Carl Hugo Marcotte