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
3answers
96 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: ...
4
votes
0answers
56 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
0answers
44 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
1answer
201 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
1answer
78 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/...
3
votes
1answer
165 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
1answer
91 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
4answers
1k 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 ...
0
votes
0answers
179 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 ...
15
votes
1answer
2k 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
0answers
140 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
0answers
57 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
1answer
103 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
0answers
55 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 ...
2
votes
1answer
218 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 ...
4
votes
8answers
827 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 ...
0
votes
0answers
66 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 ...
4
votes
3answers
192 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
0answers
70 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
2answers
2k 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 ...
2
votes
0answers
100 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
0answers
58 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
1answer
935 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. ...
2
votes
1answer
242 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
2answers
160 views

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

Please see the code below: ...
2
votes
1answer
207 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: ...
7
votes
1answer
121 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 ...
2
votes
1answer
491 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 ...
4
votes
2answers
230 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
2answers
715 views

Event sourcing using functional programming

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

Check repository for a nested entity

I have a Product entity and a ProductCategory entity. Given the Product entity, my ...
2
votes
1answer
257 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
0answers
84 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
1answer
246 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
2answers
447 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
1answer
969 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
1answer
123 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? ...
1
vote
2answers
603 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
2answers
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,...
13
votes
3answers
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 ...
6
votes
1answer
526 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: ...