Advanced Topics
When to start this
Section titled “When to start this”Take the advanced course after you have:
- Completed the capstone project
- Worked comfortably through all 8 basic weeks
- A goal of building production-ready, enterprise-grade APIs
- An interest in preparing for mid-level developer roles
Advanced Week 1: Code Organization
Section titled “Advanced Week 1: Code Organization”Move beyond everything in Program.cs. Learn patterns that make larger codebases maintainable.
Topics:
- Organizing endpoints into separate files with extension methods
- Repository pattern for data access
- Service layer separation
- DTOs (Data Transfer Objects) and mapping with AutoMapper
- Clean architecture principles
Resources:
Advanced Week 2: Advanced Authentication & Authorization
Section titled “Advanced Week 2: Advanced Authentication & Authorization”Go beyond “logged in or not” and add fine-grained access control.
Topics:
- Role-based authorization (Admin, User roles)
- Policy-based authorization
- Claims and custom authorization requirements
- Refresh tokens and token rotation
- ASP.NET Core Identity
Resources:
Advanced Week 3: Advanced Validation & Error Handling
Section titled “Advanced Week 3: Advanced Validation & Error Handling”Replace Data Annotations with a more powerful validation approach and standardize error responses.
Topics:
- FluentValidation for complex validation rules
- Custom validation attributes
- Global exception handling middleware
- Problem Details standard (RFC 7807)
- Consistent error response format
Resources:
Advanced Week 4: Complex Database Scenarios
Section titled “Advanced Week 4: Complex Database Scenarios”Go beyond simple one-to-many relationships and learn how to optimize database access.
Topics:
- Many-to-many relationships
- Database indexing for performance
- Raw SQL queries when EF Core is not sufficient
- Soft deletes and audit trails (CreatedAt, UpdatedAt, DeletedAt)
- Concurrency handling
Resources:
Advanced Week 5: Advanced Testing
Section titled “Advanced Week 5: Advanced Testing”Add unit tests with mocking and use real PostgreSQL containers in tests.
Topics:
- Unit testing with Moq for mocking dependencies
- Testcontainers — spin up a real PostgreSQL instance per test run
- Test organization and naming conventions
- Code coverage measurement
Resources:
Advanced Week 6: Production-Ready Features
Section titled “Advanced Week 6: Production-Ready Features”Add the features that real production APIs need.
Topics:
- Structured logging with Serilog (console and file sinks)
- Health check endpoints
- API versioning
- Rate limiting and throttling
- CORS advanced configuration
- Background jobs with Hangfire
Resources:
Advanced Week 7: Performance & Scalability
Section titled “Advanced Week 7: Performance & Scalability”Make your API fast and able to handle load.
Topics:
- In-memory caching and distributed caching with Redis
- Query performance optimization
- Cursor-based pagination for large datasets
- Async best practices and avoiding common pitfalls
- Response compression
Resources:
Advanced Week 8: DevOps, Deployment & Observability
Section titled “Advanced Week 8: DevOps, Deployment & Observability”Deploy to the cloud, automate your build and release process, and instrument your API with full observability using OpenTelemetry.
DevOps & deployment
Section titled “DevOps & deployment”Topics:
- Docker multi-stage builds for smaller images
- CI/CD pipelines with GitHub Actions
- Environment configuration strategies
- Secrets management
- Cloud deployment (Azure App Service or similar)
Resources:
OpenTelemetry
Section titled “OpenTelemetry”By this point in the course, students have used built-in ILogger
(basic course) and Serilog (Advanced Week 6). OpenTelemetry is the next
step — a vendor-neutral, industry-standard framework that unifies the
three pillars of observability into a single approach.
The three pillars:
| Pillar | What it answers | Example |
|---|---|---|
| Logs | What happened? | “User 42 failed to login at 14:03” |
| Traces | How did it flow, and how long did each step take? | Request → endpoint → EF Core query → response, with ms timing |
| Metrics | How is the system behaving over time? | Request rate, error rate, p99 latency |
Topics:
- What OpenTelemetry is and why it matters (vendor-neutral observability)
- Instrumentation: adding traces to your Minimal API and EF Core queries automatically
- Collecting metrics: request count, latency histograms, error rates
- Connecting Serilog logs to OpenTelemetry so all three pillars flow through one pipeline
- Running Jaeger (tracing backend) locally in Docker to visualize traces
- Running Prometheus and Grafana locally in Docker to visualize metrics
- Shipping telemetry to a cloud backend (Azure Monitor / Application Insights)
Local setup with Docker Compose:
Students extend their existing docker-compose skills by adding observability backends as additional services — a natural continuation of the Docker work from the basic course.
docker-compose.yml services: api (your .NET API) postgres (database) jaeger (trace visualization) prometheus (metrics collection) grafana (metrics dashboards)Learning progression:
| Stage | Tool | What it answers |
|---|---|---|
| Basic Week 8 | ILogger |
Is my app running? |
| Advanced Week 6 | Serilog | What exactly happened and when? |
| Advanced Week 8 | OpenTelemetry | How is my whole system performing? |
Resources:
- OpenTelemetry for .NET
- .NET OpenTelemetry Getting Started
- OpenTelemetry .NET on GitHub
- Jaeger (local tracing backend)
- Prometheus
- Grafana
- Azure Monitor OpenTelemetry
Additional topics to explore
Section titled “Additional topics to explore”Architecture patterns:
API design:
Security: