Questions tagged [ddd-service]

90 questions
2
votes
1 answer

Where does "Billing" belong in a DDD php project?

Im building a new SaaS app and am wanting to follow the DDD principles. Im at the stage where Im sketching ideas out and I came across this problem. Im hoping people can give me some thoughts. I dont think there's necessarily a right or wrong with…
Lee Overy
  • 437
  • 5
  • 13
2
votes
0 answers

Probabilistic domain service idempotency with HyperLogLog

I'm evaluating an approach to domain service idempotency using HyperLogLog [HLL]. Aim of this approach would be to provide generic way of ensuring idempotency without storing large amounts of useless information. Only requirement being tolerance…
Grzesiek
  • 120
  • 8
2
votes
1 answer

Where i need to place code related to storing a entity in a domain driven design

I am trying to design a application using domain driven design, i have a doubt regarding storage of an entity data. First i am creating an entity and applying business rules on the entity. Finally i want to store this data. I am using repository…
2
votes
3 answers

In DDD, should any class that is not an Entity or an Value Object be a Service?

In DDD, should any class that is not an Entity or an Value Object be a Service? For example, in libraries some classes are named FileReader (which read a File object), Cache interface that is implemented by MemcachedCache or FileCache, XXXManager,…
Matthieu Napoli
  • 48,448
  • 45
  • 173
  • 261
1
vote
2 answers

DDD Domain Entities using external Services

In DDD, you're strongly encouraged to have all business logic within the domain entities instead of separate from it. Which makes sense. You also have the idea of Domain Services to encapsulate certain pieces of logic. What I can't work out is how…
Graham
  • 4,095
  • 4
  • 29
  • 37
1
vote
1 answer

Domain Driven Design Calling Remote APIs

I am new to DDD and this is the first project for me to apply DDD and clean architecture, I have implemented some code in the domain layer and in the application layer but currently, I have a confusion now I have an API which is placeOrder and to…
tarek salem
  • 540
  • 1
  • 6
  • 20
1
vote
2 answers

AggregateRoot A validation needs informations from AggregateRoot B

I'm pretty new in a DDD world and I'm wondering how to handle a situation where I have one aggregate root (AggregateRootA) which needs some information from other aggregate root (AggregareRootB) to be able to do something (e.g. change state of…
1
vote
1 answer

DDD aggregate performance

I'm new to DDD. Now I've an aggregate Team and entities TeamMember: class Team { members: Map; add(member) { assert(!members.has(member.id), "Team Member is already exists"); this.members.set(member.id,…
1
vote
3 answers

How should services be implemented with domain driven design?

What is the best way to actually implement service classes when following domain driven design? For example say I want to have an AccountService which can be used to transfer funds from one account to another? Which of the following, if any, would…
Eric Anastas
  • 21,675
  • 38
  • 142
  • 236
1
vote
1 answer

Need help improving a design with aggregate roots

I have the follow scenario: You need to create a Request before it to become a Shop and to get a Owner Account. So one day you register a Request. 2 days after a manager reviews and approves your Request and it means that the system have to create…
1
vote
0 answers

Is there an interactive proactive tool to model any IT project in DDD (Domain driven design)?

Is there an interactive proactive tool to model any IT project in DDD? I've seen eventmodeling.org, event storming, I've seen all the great techniques for live workshops (they use miro if not live), but they are still "manual" tools. Is there any…
Fred Hors
  • 3,258
  • 3
  • 25
  • 71
1
vote
2 answers

Domain driven design for accounting System

I am following the DDD approach for the accounting system I am developing. There are two parts(see domain below): Create a transaction: A transaction(AccountingTransaction) is created as a parent(aggregate root) when cash is moved from Ledger to…
1
vote
1 answer

DDD how to Communicate for search service

I work on eCommerce app. I use micro-services with ddd. I have product service. It store title description etc. Pricing service store product prices and promotions. Category service store categories and product category. Shipment service store all…
1
vote
1 answer

Where does the logic go in DDD Aggregate to modify a child entity of the Aggregate Root?

I am using the Microsoft DDD Microservices example as the baseline of my question (https://learn.microsoft.com/en-us/dotnet/architecture/microservices/microservice-ddd-cqrs-patterns/microservice-domain-model). I understand that all external requests…
Mike Lenart
  • 767
  • 1
  • 5
  • 19
1
vote
1 answer

I have two different aggregates in the same bounded context and they both need to be created - should I use eventual consistency vs. Domain Service?

Say I have an Aggregate call JobSeeker and another one that is called ResumeBank that contains a collection of resumes and is associated with a JobSeeker. The business problem: When I create a JobSeeker I also need to create a ResumeBank that is…
Mike Lenart
  • 767
  • 1
  • 5
  • 19