Book Image

Hands-On Domain-Driven Design with .NET Core

By : Alexey Zimarev
5 (1)
Book Image

Hands-On Domain-Driven Design with .NET Core

5 (1)
By: Alexey Zimarev

Overview of this book

Developers across the world are rapidly adopting DDD principles to deliver powerful results when writing software that deals with complex business requirements. This book will guide you in involving business stakeholders when choosing the software you are planning to build for them. By figuring out the temporal nature of behavior-driven domain models, you will be able to build leaner, more agile, and modular systems. You’ll begin by uncovering domain complexity and learn how to capture the behavioral aspects of the domain language. You will then learn about EventStorming and advance to creating a new project in .NET Core 2.1; you’ll also and write some code to transfer your events from sticky notes to C#. The book will show you how to use aggregates to handle commands and produce events. As you progress, you’ll get to grips with Bounded Contexts, Context Map, Event Sourcing, and CQRS. After translating domain models into executable C# code, you will create a frontend for your application using Vue.js. In addition to this, you’ll learn how to refactor your code and cover event versioning and migration essentials. By the end of this DDD book, you will have gained the confidence to implement the DDD approach in your organization and be able to explore new techniques that complement what you’ve learned from the book.
Table of Contents (14 chapters)

Technical requirements

In this chapter, we will be using the Event Store (https://eventstore.org), which is an open source database.

The easiest way to run Event Store is to use Docker. We've used docker-compose in previous chapters, so it will be the same experience with the Event Store.

The code for this chapter contains a docker-compose.yml file that allows you to use Event Store by executing this command:

docker-compose up

Docker will pull the latest image from Docker Hub and start a named container. Two ports are mapped by this command from the container to your machine: 2113 and 1113. Port 2113 is used to access Event Store via HTTP, and 1113 is used for TCP connections.

After the container starts, you can check its status by opening http://localhost:2113 in your browser. You will get the following login prompt:

There, you need to enter the default credentials: admin...