Contents
Tabla de contenido
EDITION v2.0
Version
Purpose
Who should use this guide
How you can use this guide
Summary
Reference Application: eShopOnWeb
Cloud-Hosted and Scalable
Cross Platform
Modular and Loosely Coupled
Easily Tested with Automated Tests
Traditional and SPA Behaviors Supported
Simple Development and Deployment
Traditional ASP.NET and Web Forms
Summary
Project Templates
When to choose traditional web apps
When to choose SPAs
Decision table – Traditional Web or SPA
Summary
Common design principles
Separation of Concerns
Encapsulation
Dependency Inversion
Explicit Dependencies
Single Responsibility
Don’t Repeat Yourself (DRY)
Persistence Ignorance
Bounded Contexts
Summary
What is a monolithic application?
All-in-One applications
What are layers?
Traditional “N-Layer” architecture applications
Clean architecture
Organizing Code in Clean Architecture
Monolithic Applications and Containers
Monolithic application deployed as a container
Summary
HTML
CSS
CSS Preprocessors
JavaScript
Legacy Web Apps with jQuery
jQuery vs a SPA Framework
Angular SPAs
React
Choosing a SPA Framework
Summary
MVC and Razor Pages
Why Razor Pages?
When to use MVC
Mapping Requests to Responses
Working with Dependencies
Declare Your Dependencies
Structuring the Application
Feature Organization
Razor Pages
Cross-Cutting Concerns
Security
Authentication
Authorization
Claims
Securing Web APIs
Client Communication
Domain-Driven Design – Should You Apply It?
When Should You Apply DDD
When Shouldn’t You Apply DDD
Deployment
Summary
Entity Framework Core (for relational databases)
The DbContext
Configuring EF Core
Fetching and Storing Data
Fetching Related Data
Encapsulating Data
Resilient Connections
Execution strategies and explicit transactions using BeginTransaction and multiple DbContexts
EF Core or micro-ORM?
SQL or NoSQL
Azure Cosmos DB
Other Persistence Options
Caching
ASP.NET Core Response Caching
Data Caching
Summary
Kinds of Automated Tests
Unit Tests
Integration Tests
Functional Tests
Testing Pyramid
What to Test
Organizing Test Projects
Test Naming
Unit Testing ASP.NET Core Apps
Integration Testing ASP.NET Core Apps
Functional Testing ASP.NET Core Apps
Vision
Development environment for ASP.NET Core apps
Development tools choices: IDE or editor
Development workflow for Azure-hosted ASP.NET Core apps
Initial Setup
Workflow for developing Azure-hosted ASP.NET Core applications
Step 1. Local Dev Environment Inner Loop
Step 2. Application Code Repository
Step 3. Build Server: Continuous Integration. Build, Test, Package
Step 4. Build Server: Continuous Delivery
Step 5. Azure App Service. Web App.
Step 6. Production Monitoring and Diagnostics
References
Summary
Web Applications
App Service Web Apps
Containers and Azure Container Service
Azure Service Fabric
Azure Virtual Machines
Feature Comparison
Logical Processes
Data
Architecture Recommendations