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
1 vote
0 answers
44 views

Specification pattern vs Always valid domain model [closed]

Let's say we have two aggregates: ...
user avatar
1 vote
2 answers
130 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 ...
user avatar
  • 21
2 votes
1 answer
363 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 ...
user avatar
  • 187
1 vote
0 answers
99 views

Deleting a child of aggregate root in DDD

Consider this code, that uses EF Core wrapped inside the unitOfWork to manage the database: ...
user avatar
  • 111
6 votes
3 answers
2k 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: ...
user avatar
  • 201
4 votes
0 answers
70 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 ...
user avatar
1 vote
0 answers
66 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 ...
user avatar
2 votes
1 answer
244 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 ...
user avatar
3 votes
1 answer
175 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/...
user avatar
3 votes
1 answer
180 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 ...
user avatar
2 votes
1 answer
96 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 ...
user avatar
  • 121
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 ...
user avatar
0 votes
0 answers
485 views

Bank ATM App Mockup - Implementing Domain-Driven Design (DDD)

There is a follow-up on this question. I have created this bank ATM app mockup which I believe implement some Domain-Design Design layered architecture, repository pattern and uow pattern, if not ...
user avatar
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 '...
user avatar
1 vote
0 answers
247 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 ...
user avatar
  • 11
1 vote
0 answers
81 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 ...
user avatar
  • 213
2 votes
1 answer
111 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 ...
user avatar
2 votes
0 answers
58 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 ...
user avatar
  • 121
2 votes
1 answer
272 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 ...
user avatar
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 ...
user avatar
  • 151
0 votes
0 answers
75 views

Inject settings as a dependency, and serve them using a Web API

I used an opportunity to learn about Dependency Injection and DDD, therefore, althought any feedback is welcome, I am interested in feedback about those software design principles. I have a small ...
user avatar
  • 361
4 votes
3 answers
204 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 ...
user avatar
  • 289
2 votes
0 answers
90 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 ...
user avatar
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 ...
user avatar
  • 227
2 votes
0 answers
102 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 ...
user avatar
1 vote
0 answers
64 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 ...
user avatar
  • 111
4 votes
1 answer
1k 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. ...
user avatar
  • 713
2 votes
1 answer
259 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 ...
user avatar
  • 183
2 votes
2 answers
175 views

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

Please see the code below: ...
user avatar
  • 713
3 votes
1 answer
254 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: ...
user avatar
  • 231
7 votes
1 answer
131 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 ...
user avatar
  • 281
2 votes
1 answer
595 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 ...
user avatar
  • 31
4 votes
2 answers
242 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 ...
user avatar
5 votes
2 answers
977 views

Event sourcing using functional programming

Is this a satisfactory implementation of event sourcing using functional programming? ...
user avatar
1 vote
2 answers
161 views

Check repository for a nested entity

I have a Product entity and a ProductCategory entity. Given the Product entity, my ...
user avatar
  • 299
2 votes
1 answer
280 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: ...
user avatar
  • 6,113
2 votes
0 answers
93 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 ...
user avatar
  • 6,113
2 votes
1 answer
293 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, ...
user avatar
  • 6,113
3 votes
2 answers
542 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 ...
user avatar
  • 6,113
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: ...
user avatar
  • 6,113
3 votes
1 answer
137 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? ...
user avatar
  • 288
2 votes
2 answers
792 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 ...
user avatar
  • 125
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,...
user avatar
  • 221
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 ...
user avatar
  • 2,531
6 votes
1 answer
538 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: ...
user avatar