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.

E.g. if you are in retail, you would model the "things" (classes) that are relevant, such as Sale, Product, and SalesTransaction. Read more here

359 questions
5
votes
3 answers

UML Domain model - how to model multiple roles of association between two entities?

Suppose there is a scenario of Users having Tasks. Each User can either be a Watcher or Worker of a Task. Furthermore, a Worker can file the hours he has worked on a given Task. Would the following diagram be correct? I have looked around at…
Martin Melka
  • 7,177
  • 16
  • 79
  • 138
5
votes
1 answer

DDD: What goes into domain and what goes into application?

I find it difficult to decide whether something should be part of domain or application. Reading through this answer helps a lot with concepts like authorisation but I still find myself struggling with other things. To illustrate my confusion please…
Denis Pshenov
  • 11,157
  • 6
  • 42
  • 42
5
votes
2 answers

Techniques for dependency injection into a domain model

I have a domain model type. One of its numerous properties requires an ITranslationService to provide the ability to translate its return value into the appropriate language. Should I inject the ITranslationService into the constructor of the domain…
Ben Aston
  • 53,718
  • 65
  • 205
  • 331
5
votes
2 answers

Transactions crossing aggregate boundaries

I have the following domain modelling problem where I seem to end up either crossing consistency boundaries or creating a huge aggregate. Can someone help me break it up? There are two job types JobA, JobB. JobA is composed of tasks TaskA. JobB is…
341008
  • 9,862
  • 11
  • 52
  • 84
5
votes
1 answer

Can I create a poco class with private setter in EntityFramework

What am trying to achieve is to create a class as shown below. public class Purse { public decimal AvaliableBalance { get; protected set; } public decimal PendingBalance { get; protected set; } public decimal TotalBalance { get;…
Cizaphil
  • 490
  • 1
  • 6
  • 23
5
votes
3 answers

Domain Driven Design: How to model relations that are large but have few behaviors

Let's say I have two entities User and Item. The sole behavior in the domain between these two entities is that a user can like an item. Since there is no restriction on how many items a user can like, this many-to-many relation can be large. I…
Ziju Feng
  • 327
  • 1
  • 4
  • 13
5
votes
3 answers

Can value objects exist without Entities?

I have a value object LoginAuth which contains the User authentication data for my secondary login system. For every User it is optional to opt for the secondary login. So the User entity does not hold the LoginAuth value object but instead, the…
Kid Diamond
  • 2,232
  • 8
  • 37
  • 79
5
votes
2 answers

Where to put enumerations in a Java project?

We put entities in a domain package. Something like com.acme.domain or com.acme.model. Entities often have properties which represent codes, rather than free form strings. Something like a sort order code (ASC or DESC) or publish status code…
jacekn
  • 1,521
  • 5
  • 29
  • 50
5
votes
2 answers

Domain objects - "Smart object" vs POCO

By Smart object I consider any Domain object that knows its original property value if property is altered. Smart objects usually have a base class and implement properties by using GetPropertyValue/SetPropertyValue methods. On the other hand POCO…
5
votes
2 answers

Corrupting POCO Domain Model when creating LINQ Entity Classes?

Say I've got a domain model created from C# classes like this: public class MyClass { public string MyProperty { get; set; } } Along with the model, I have defined repository interfaces classes for IoC. Now, I'm trying to turn this POCO domain…
Paul
  • 6,188
  • 1
  • 41
  • 63
4
votes
2 answers

Domain Model Saving

Recently finished reading Eric Evans Domain Driven Design (very informative, very enjoyable) however come to first major project since completing the book and got the issue how to handle the domain model save? I appreciate the use of services /…
c00ke
  • 2,245
  • 5
  • 26
  • 34
4
votes
1 answer

What's the difference between Domain Model and OO Domain Model?

It is said that the Domain Model is used to capture the problem domain of an application. That's what are the requirements needed, etc. But often, these models are almost very close to what may turn out as classes during the implementation…
Carven
  • 14,988
  • 29
  • 118
  • 161
4
votes
1 answer

What's diference between entity-relationship and domain-model

According to StackOverflow, an entity-relationship model (ERM) is an abstract and conceptual representation of data, information aspects of a business domain or its process requirements. Ultimately ERM is being implemented in a database. A domain…
David Sousa
  • 120
  • 2
  • 8
4
votes
1 answer

Are these two uml arrows equivalent?

Are these two associations conceptually equivalent? My textbook uses the second type but my uml software is only able to generate the first type of associations. Thanks!
user1354784
  • 386
  • 4
  • 15
4
votes
2 answers

Understanding rich domain models and dependencies

I'm trying to get my head around rich domain models and how to build semantic functionality into domain entities, where the domain entities are not tightly coupled to objects that provide implementations for semantic behaviour For example, I want to…
Matthew Layton
  • 39,871
  • 52
  • 185
  • 313