
The tools needed to develop the DDD applications
Explore software architecture foundations from monolithic and n-layer to clean architecture, and introduce domain-driven design with rich domain models, aggregates, and value objects. Assess scalability, modularity, and flexibility in systems.
An introduction to DDD and its architectural concepts
Explore the advantages and disadvantages of domain-driven design, contrasting it with clean architecture, and learn how ubiquitous language, entities, value objects, and aggregates shape a maintainable, business-aligned model.
The domain layer is the heart of the business software. This is where domain experts defines business rules and behaviors
Explore the repository pattern to abstract data access and support crud operations with a generic repository for any domain entity, and learn how the unit of work coordinates transactions.
Develop the infrastructure layer with Entity Framework Core for PostgreSQL to define persistence, configure the context and entities, and implement a generic repository with unit of work for domain layer.
Create the application layer as a web api project, add controllers, enable swagger, and replace the default minimal api with a test controller to expose endpoints.
Apply migrations to create the database and tables in a domain-driven .NET app, configure the infrastructure and domain layers with PostgreSQL, and seed data on first run.
Seed data for domain entities by creating migrations in the infrastructure layer, and adding departments and courses when none exist, then persist via a scoped DbContext during startup.
Learn how the CQRS pattern separates reads and writes, with side-effect-free reads via queries and state-changing commands, coordinated by a mediator and command handlers.
The application layer defines read-only queries against the domain and infrastructure layers, returning department names via a department response DTO using a generic repository and dependency injection.
Implement a department command and its handler using the mediator pattern in dotnet, dispatch it via mediator send from a controller, and persist with a repository and unit of work.
Apply domain events within a domain-driven design to let aggregates communicate, handle enrollments, and trigger domain event handlers via a mediator for actions like creating a student.
Publish domain events from the domain layer using Mediator and INotification to multiple handlers. Use an infrastructure extension to dispatch events on save changes and route them to application handlers.
Apply the query specification pattern in domain-driven design repositories to define reusable sorting, filtering, and paging logic, enabling eager loading of related entities via include.
Define and implement the query specification pattern in the domain layer to enable filtering, paging, sorting, and including related entities, keeping reads clean and testable.
Explore domain-driven design in .NET by building student controllers, implementing base specifications, and enabling jwt authentication to enroll in courses and browse departments.
Implement a login action in the student controller, create a login DTO with email and password, and authenticate via the service to return a JWT token for protected resources.
Enrich student enrollment by using a course controller with command domain events and specifications, build course aggregates with departments, and publish events to create to-dos for students.
Implement student-focused queries in the student controller of a .NET domain-driven design course, listing enrolled courses and to-dos, moving the to-do to the student aggregate, and refining repositories and specifications.
Explore solid principles, a mnemonic for five guidelines: single responsibility, open/closed, Liskov substitution principle, interface segregation, and dependency inversion, to guide domain driven design with maintainable, testable code.
Apply the single responsibility principle to ensure a class has one reason to change. Separate logging into its own class to reduce coupling and improve maintainability.
demonstrates the open/closed principle by using interfaces and the strategy design pattern to extend profiles without modifying existing code, boosting testability and reducing coupling.
Explore the Liskov substitution principle, showing how subtypes must be substitutable for base types without breaking client code, using a vehicle color example and interface-based designs.
Explore the interface segregation principle in .NET by splitting fat interfaces into smaller ones, enabling basic and advanced math implementations without forcing unused methods.
Explain the dependency inversion principle, showing how high level classes depend on abstractions rather than low level classes, via interfaces in C# and constructor injection in ASP.NET Core.
In this course, you'll gain a deep understanding of the technical aspects of Domain-Driven Design (DDD), learning how to build a DDD project from the ground up while exploring its core architectural concepts, including:
Layering in DDD: Designing and implementing the Domain, Infrastructure, and Application Layers.
Domain Models: Identifying and crafting domain models, including value objects, aggregates, and aggregate roots.
Domain Events: Leveraging the MediatR library to publish and handle domain events.
CQRS: Separating read and write operations to optimize your system's architecture.
MediatR: Integrating MediatR for effective communication within your application.
The Query Specification Pattern: Applying this pattern for precise and efficient querying.
SOLID Principles: Adhering to SOLID principles for maintainable and scalable code.
Advanced Repository and Unit of Work Patterns: Enhancing data management with improved repository and unit of work patterns.
Software Design Patterns: Utilizing essential design patterns to solve common software engineering challenges.
Microservices and DDD
You’ll also learn how DDD naturally complements Microservices architecture. We’ll cover:
Building independently deployable services based on aggregates and domain boundaries
Implementing communication between services using patterns like integration events and asynchronous messaging (e.g., RabbitMQ)
Ensuring resilience and eventual consistency in distributed systems
Applying strategic DDD patterns like context mapping to manage service relationships
This gives you a complete picture of how to evolve from a well-structured monolith to a scalable microservice system grounded in domain logic.
Whether you're new to DDD, seeking a hands-on, in-depth exploration of how it works, or aspiring to advance to a senior developer role, this course is designed for you. We'll also delve into various architectural styles that have shaped software development over the years, including:
Monolithic Architecture
Modular Monolith
N-Layer Architecture
Clean Architecture
Microservice Architecture
Throughout the course, you'll be assigned practical tasks to apply what you've learned. I'm available to answer any questions you may have along the way.
Additionally, I’ve included a link in the course where you can download the source code from GitHub, clone the repository, and explore it on your own.
I hope this course helps you excel in DDD, microservices, and modern architectural approaches, and I look forward to hearing your feedback.