Questions tagged [ddd-service]

90 questions
1
vote
1 answer

Intermediate compute call before domain creation in DDD(Domain Driven Design)

I have a UI that takes visitor orders. After the visitor placing his order, UI has a button that calculates tax and gets back to the UI before placing the actual order.  I have DDD based order API with ADD, UPDATE, GET, GET ALL and DELETE endpoints.…
1
vote
1 answer

How to name the domain services in DDD

I'm new in DDD and I am getting an issue while writing a new project using DDD principles and it's about creating domain services. I always named my services with the corresponding domain object name prefix, such as UserService or OrderService and…
1
vote
3 answers

Service access Entity attributes

In oop we seek to encapsulation. We try not to expose internal state via getters or by public fields, only expose methods. So far so good. In situation when we would like to operate on multiple Entities we introduce Service. But how this service…
bastiat
  • 1,799
  • 2
  • 19
  • 38
1
vote
2 answers

A confusing situation on my way to understand DDD

Thank you in advance for your help and attentation! My project is dedicated only for learning purposes and I'm totally confused with DDD and have the following situation: There is the ubiquitous language of my domain where I have users and…
1
vote
1 answer

How can we treat different meanings of delete in our domain model

I have two questions related to Udi Dahan's article : Don’t Delete – Just Don’t Sometimes we do need delete, the user (domain expert) request the delete functionality(the real meaning) for wrong data, Say the HR user has a form to add employees and…
1
vote
2 answers

Best way to return error description to user

Suppose I need to register user in my system. Buisness rules are: email shoud be unique (a kind of identity); name shouldn't be blank. It looks like I need Service for it. Probably something like that: public interface RegistrationService { bool…
anoam
  • 127
  • 1
  • 7
1
vote
2 answers

Domain Driven Design (DDD): A Domain or Infrastructure Concern

I'm immersing myself in DDD and have a question regarding what belongs to the domain, and what is an infrastructure concern. A simplified example to describe the domain: One of the contexts in the App is regarding convenience functionality that…
1
vote
1 answer

Query remote rest service from ddd aggregate

I've read about the Double Dispatch pattern, which enables to pass service interfaces into aggregate methods: https://lostechies.com/jimmybogard/2010/03/30/strengthening-your-domain-the-double-dispatch-pattern/,…
David Szalai
  • 2,363
  • 28
  • 47
1
vote
2 answers

Infrastructure repository calling a domain service

I have an application service (AppService) and an infrastructure repository (InfraRepo) that reads data from an external data provider. The AppService calls InfraRepo and returns data to the client. I have the following requirement: I have some…
pantonis
  • 5,601
  • 12
  • 58
  • 115
1
vote
0 answers

How (and where) to construct an Entity with large number of params?

This is a DDD related question and I'm coding in php. A user submits a form which contains a large number of values. Some are optional but let's ignore that for now. So now in the Controller we validate the form data, and assuming the validation…
Lee Overy
  • 437
  • 5
  • 13
1
vote
3 answers

Encapsulating an external data source in a repository pattern

I am creating the high level design for a new service. The complexity of the service warrants using DDD (I think). So I did the conventional thing and created domain services, aggregates, repositories, etc. My repositories encapsulate the data…
1
vote
2 answers

SOA service vs other kinds of services

What is the difference between an SOA service and other kinds of services like an application or domain service ?
Rijndael
  • 3,683
  • 2
  • 24
  • 26
1
vote
1 answer

Use Infrastructure service or Repository in Entity

I have an entity, Exchange. Exchange needs to populate a list of a VOs, CurrencyPair, at startup. The collection of CurrencyPair is stored in database as master data, and has a repository called ICurrencyPairRepository to get all the available…
Syed Waqas
  • 2,576
  • 4
  • 29
  • 36
1
vote
1 answer

Is an emailExist method allowed in UserService?

I'm using domain driven design. I've got the following model (classes): User UserDAO UserRepository UserService I know that UserService is supposed to contain all the corresponding application logic. So I got methods like signUp(), logIn() and…
Kid Diamond
  • 2,232
  • 8
  • 37
  • 79
1
vote
2 answers

Is Domain Layer the suitable place for Mapped objects(DTO)?

I have some Mapped objects[Entities] in my domain-layer which needs to be used by my web service which exposes these mapped objects to outside world. Where is the correct place for these mapped object? How would you structure your mapped objects and…
MHOOS
  • 5,146
  • 11
  • 39
  • 74