Questions tagged [domain-model]
A domain model is composed of the objects, behavior, relationships, and attributes that make up the industry that is the focus of development.
344 questions
0
votes
2
answers
198
views
Keeping the impact of changes low when moving shared domain objects into a library
I’m refactoring a microservice project where multiple services share the same domain objects. Over time, these objects have diverged across services, causing inconsistencies.
To solve this, I plan to ...
1
vote
2
answers
153
views
Dividing an HR Application into Bounded Contexts: Understanding How to Split a Domain into Multiple Models
I’m trying to understand bounded contexts by trying to apply them to an example HR application. According to a book called Patterns, Principles, and Practices of Domain-Driven Design (PPPDDD), context ...
2
votes
3
answers
308
views
DDD and Domain Models with a Web Api PUT / POST
The company I'm working at has strict policies that insist that all business logic is contained in Domain Models as part of DDD.
I can see how this approach could work well for something like a ...
3
votes
3
answers
230
views
Is it good DDD practice to hide all the aggregate methods behind domain services?
I'm working on a DDD-based system and was researching the best way to handle domain services and keep business logic consistent.
During my research, I came across this insightful quote from Steve ...
-1
votes
1
answer
76
views
Complex domain problem to be modeled with DDD
There is a case management application.
New requirements want to add statuses to cases.
The case will go through a series of statuses until completion.
Each case belongs to a case type. There are many ...
1
vote
2
answers
283
views
DDD Model to handle Localizations
I'm trying to refine my domain model for the internationalization feature, I wanted to get your input on the best approach to structuring Culture and Localization entities following Domain-Driven ...
1
vote
1
answer
131
views
Is providing a method of a domain entity with a data/ service provider object a bad design?
I have an entity called User, and it has a method to change the user's email address. I'm using a strongly typed object for representing the email address.
public class User: BaseEntity
{
// Some ...
1
vote
1
answer
86
views
Enforcing reasonable values when modeling one's domain
Should one enforce reasonable values when modeling one's domain?
Here's an example:
Assume that we have a scheduling application that schedules visits for people who require assistance and normally ...
0
votes
4
answers
421
views
Should I model constraints which are valid, but which have no current function in the domain?
When domain modelling, should a valid constraint - or "natural" constraint - be modelled, even if there are no current business processes which rely on the constraint being asserted.
As an ...
-2
votes
2
answers
466
views
Enumeration in every entity?
According to Eric's definition of entities: "An object that is not fundamentally defined by its attributes, but rather by a thread of continuity and identity"
Does that mean apart from all ...
0
votes
1
answer
144
views
Functional interfaces or decorator-like implementations [closed]
Consider Chess as an example. Say, we have a lot of domain objects that are alike, in this case chess pieces. I have two proposes to implementing the behaviour of chess pieces. Both uses the following ...
1
vote
2
answers
781
views
How to design an entity that has different fields depending on a type?
I have a specific domain entity that has a given type and some attributes. Based on the type, it can have another set of type-depending attributes. Normally, I would create a class for each type and ...
2
votes
3
answers
352
views
Is it necessary or "class obsession" (opposite to primitive obsession) to create classes for non-business fields?
I know there are some posts talk about primitive obsession : When is primitive obsession not a code smell?, Is "avoid the yo-yo problem" a valid reason to allow the "primitive obsession&...
2
votes
1
answer
700
views
Domain models: Can they be an abstract class
When talking about having a rich domain model successfully, in real applications, it needs to, somehow, access some abstraction of complex functionality (instead of being a row state calculator the ...
1
vote
1
answer
660
views
Does calling an external API a part of transactional boundary
I have the following requirements :
A player in an FPS Shooter game has health points, where he can take damage and regain health.
One of the ways to regain health is by using a Health Booster that ...