Questions tagged [ddd]

Domain driven design (abbreviated as DDD) is a design methodology that focuses on the domain. What is an object and what is an attribute is determined by their place in the real world.

Filter by
Sorted by
Tagged with
2 votes
2 answers
104 views

DDD architecture pattern

I'm trying to understand the DDD architecture pattern. I wrote a simple project in which I tried to use DDD arch. Here are my doubts after implementing it: Does it make sense to use an ORM for a DDD ...
0 votes
0 answers
116 views

A simple event sourcing application using postgres and kafka as an event store

I am creating a simple banking application using event sourcing and CQRS. The application uses postgres and kafka as an event store. The source code can be found at source. Currently, the application ...
1 vote
0 answers
77 views

Specification pattern vs Always valid domain model [closed]

Let's say we have two aggregates: ...
1 vote
2 answers
151 views

DDD: interaction between 2 objects in a RPG-game

Context PlayerHouse is a place where the Player (the game character) can refill its health, store its inventory, etc. like in a RPG-game. The user can upgrade it for example to refill player's health ...
2 votes
1 answer
494 views

A Stateless Immutable Event-Driven DDD Pattern in Kotlin

I've been interested in making fully repeatable, reproducible game states. This led me into the world of DDD, and specifically, the concept of Aggregates + Event Sourcing (although that's not ...
6 votes
3 answers
3k views

Representing a property with a non-nullable getter & a nullable setter

I have a class as follows, where I want the user of the class to know that setting the Slug property to null is supported, and its getter will still return a valid value: ...
3 votes
1 answer
206 views

DDD - Interaction between 2 entities

I've been taking a crack at Domain Driven Design, SOLID principles, and unit tests to write more maintainable code in the future. Though I tend to run into the same issue: While I have many classes/...
4 votes
0 answers
97 views

Is there a better way to unit test a repository for a large aggregate root?

In our project we use domain-driven design and our customer aggregate root is large. The unit tests for the aggregate root itself are simple (~50 or so tests), but I am struggling with the repository ...
1 vote
0 answers
96 views

DDD design: Tracking price calculation progress and fallback price calculation

I am pretty new to DDD, so any help/ideas will be appreciated. I will explain my initial design and problem below. The user can ask the system to generate products proposal, proposal is basically ...
2 votes
1 answer
261 views

Simple REST web service

I am a young computer science student programming mainly in Java. I wrote a simple RESTful web service using Spring Boot Framework and the DDD architecture pattern. The project is a library ...
3 votes
1 answer
192 views

Grouping low-level services together into a high-level service

I am working on an e-commerce website. What I need to do is to save an advertisement. The ad has some properties and some photos... properties should be save to DB and photos should be saved to file ...
2 votes
1 answer
98 views

OOP at the boundary

I'm trying to implement a simple service in the true OOP way. This means for me that the domain objects has no technical or non-business-related methods (in practice no getters/setters). Here are the ...
8 votes
4 answers
3k views

DDD Architecture for an e-commerce website (uploading images)

Problem Description I am working on an e-commerce website, when a user wants to sell a product, he would open the product page and he can upload up to 12 photos: Image Upload Process This is the ...
2 votes
1 answer
287 views

DDD model of a purchase in NodeJS

I already have some experience with Java and I'm used to modeling with a DDD approach. Therefore, now I'm beginning with JS and NodeJS and I'd like to know which is the best practice to design with a ...
15 votes
1 answer
3k views

Knowledge-based authentication using Domain-driven Design in C# [closed]

As part of an insurance claims system we have created, the claims managers can log incoming telephone calls relating to a claim. The claims manager must validate the caller by asking a number of '...
1 vote
0 answers
306 views

Design Web API with Command Handler

I'm setting up new API to Setup LocalAccounts and need your advice on how to design the API with CQS some background : LocalAccount Is Account that related to ...
1 vote
0 answers
87 views

Modeling the Aggregates in the following Bounded Context - Domain Driven Design

I'm currently developing an application in ASP.NET Core 2.2 with Domain Driven Design. What you see in here is a Unit Creation page. A Unit is composed of competences. A unit must have at least one ...
2 votes
1 answer
115 views

DDD modeling for a User Voice-like system

I've taken on the challenge of modeling a simple User Voice-like system. High-level description: It's a portal for some SaaS users; They come and leave feature requests, suggestions, etc.; They ...
2 votes
0 answers
67 views

Best approach to parse data from multiple APIs to Entities in PHP

I built an application that extracts and updates data from multiple ecommerces websites. Each eCommerce is either built using platforms/frameworks such as Shopify, Prestashop or WooCommerce. This ...
5 votes
8 answers
1k views

Value Object encapsulating different units of measure

I have a situation where I need to use person's height in different units. Some parts of the system use Inches/Feet some Meters/Centimeters. I was thinking of a Height value object which would ...
4 votes
3 answers
215 views

Web-app for tracking containers

Nowadays I am learning Domain Driven Design intensively. I am reading the book called Domain Driven Design by Eric Evans, and at the same time I try to apply the knowledge on a real life project I ...
2 votes
0 answers
99 views

Business Rule DSL for Values in Domain-Driven Design

Following the patterns from the book Domain Modeling Made Functional, I am implementing a single-case union for the simple values in my domain model instead of using primitives. The union cases have ...
0 votes
2 answers
3k views

Is it fine to use my domain model as DTO (Entity Framework Core)? [closed]

I was reading about anemic data models and rich domain models in DDD. I don't want to follow DDD completely but take rather pragmatic approach and just take some concepts out of it because clean ddd ...
1 vote
2 answers
168 views

Check repository for a nested entity

I have a Product entity and a ProductCategory entity. Given the Product entity, my ...
2 votes
0 answers
107 views

Centralized static factory methods with dependency injection

I am trying to make a small e-commerce backend in php. I centralized all the static factory methods in a class called EntityFactory. The main reason for that was to ...
1 vote
0 answers
66 views

Modeling domain layer for basic workflow system

As so far I've been mostly developing existing products and doing maintenance/engineering I feel in need to model something from time to time for fun and for self educational purposes. Attached code ...
4 votes
1 answer
2k views

Using a Generic Value Object in a DDD application

I am writing this question in the context of a DDD application. I found this code online on a number of blogs etc e.g. here and here. ...
13 votes
3 answers
1k views

First domain-driven User entity class

I'm still learning about domain driven design, and I have created my first entity class User. Is this fully compliant with the DDD principles? Particularly my ...
2 votes
1 answer
269 views

Service for querying resource availability, following DDD

I'm writing a service (asp.net core) in charge of determining availabilities of resources (rooms, desks...). I'm also trying to stick to the DDD principles to improve the quality of my code. I have ...
2 votes
1 answer
659 views

DDD Domain Objects, Factories, and Presenters

Aloha, I am working to understand some of the different pieces of domain driven design. In this particular case, I have a NameFactory that builds a Name domain object. I also have a NamePresenter ...
3 votes
1 answer
297 views

Designing domain models for hierarchical data (in DDD)

It is my first attempt in DDD and I'm trying to wrap my head about this concept. In my examples a lot of validation is omitted for simplicity. I have two types of InterfaceConfigurations: VistaLink: ...
2 votes
2 answers
184 views

Class that calls initiates the validation of itself and then initiates the assignment of offers

Please see the code below: ...
7 votes
1 answer
140 views

Domain driven designed game to play with city names

I am building a game where two players have to pronounce name of a city. The main rule is better to explain with the following example: computer starts with "New York" player tells "Kopenhagen", as ...
4 votes
2 answers
254 views

UnitOfWork for sending mail

Topic is about a LoB web application written in C# for ASP.Net Core. We're following the blue book DDD architecture. We're using SimpleInjector as dependency injection container. Every request opens a ...
5 votes
2 answers
1k views

Event sourcing using functional programming

Is this a satisfactory implementation of event sourcing using functional programming? ...
2 votes
1 answer
300 views

IEnumerable and Predicate sets in .NET

GitHub Repository Previously: Countable and uncountable sets in .NET (clean version). Thesis There is a full featured support of countable sets in .NET: ...
2 votes
0 answers
95 views

Countable and uncountable sets in .NET (set operators, demo)

Up-to-date version: IEnumerable and Predicate Sets in .NET (Complete, Explained). Previously: Countable and uncountable sets in .NET (clean version). Disclaimer: Please do not interpret my attempts ...
2 votes
1 answer
319 views

Countable and uncountable sets in .NET (clean version)

Sorry, it used to be some retired garbage in Countable and uncountable sets. Now and here it is clean. P.S. I would not like to say that this stuff is about to replace functional programming :) No, ...
3 votes
2 answers
580 views

Countable and uncountable sets in .NET (IEnumerable and Predicate)

There is a full featured support of countable sets in .NET: IEnumerable<T>. What about uncountable sets; sets defined by predicate? How can they be ...
3 votes
1 answer
1k views

Condition class

Up-to-date version: Countable and uncountable sets in .NET (IEnumerable and Predicate). Here is my own predicate class; it is equipped with some operators. Demo: ...
3 votes
1 answer
154 views

Querying the Google ads API

I have a method which relies heavily on object supplied by third party APIs. Below is my working code, is there any scope of improvement? ...
6 votes
1 answer
555 views

Implementing a domain model

My domain model consists mostly of simple DTOs, i.e. 'Data Transfer Objects' which this article distinguishes from 'Plain Old C# Objects', like this one: ...
2 votes
2 answers
823 views

Replacing an application service class with multiple command handlers

I have a Controller which uses an application service to accomplish its tasks. The service class is starting to grow big and developing multiple dependencies. So I am thinking of replacing the single ...
12 votes
2 answers
5k views

Logging strategy setup

I finally set up my logging infrastructure to work as desired, however I feel like I had to do quite a lot things just to fulfill a few requirements. Now I'm worried if my approach has major drawbacks,...