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
12
votes
7 answers

Domain Driven Design, Domain objects, attitude about Setters

Been watching some Greg Young videos lately and I'm trying to understand why there is a negative attitude towards Setters on Domain objects. I thought Domain objects were supposed to be "heavy" with logic in DDD. Are there any good examples online…
BuddyJoe
  • 69,735
  • 114
  • 291
  • 466
12
votes
3 answers

PHP Domain Model

I have been programming in PHP for several years and have in the past adopted methods of my own to handle data within my applications. I have built my own MVC in the past and have a reasonable understanding of OOP within php but I know my…
11
votes
4 answers

UML Domain Modeling

What is the difference between a domain model and a data model?
RoR
  • 15,934
  • 22
  • 71
  • 92
11
votes
3 answers

Is there a rich domain model example?

I'm looking for a simple example to illustrate the benefits of using a rich domain model. Ideally, I'd like a before and after code listing (which should be as short as possible). The before code listing should show the problem being solved using an…
Dónal
  • 185,044
  • 174
  • 569
  • 824
10
votes
1 answer

Difference between domain model, conceptual model and business model etc

I have a question about some terminology that's been confusing me for ages and I just can't seem to figure it out. Wikipedia tends to explain these things very formally which is very hard for me to understand... The terms I've been struggling to…
user1534664
  • 3,258
  • 8
  • 40
  • 66
10
votes
4 answers

Domain Model and Object Model

What is Domain Model? What is Object Model? Are Domain Model and Object Model the same thing? What is the difference between these two? Please explain with simple example. I'm new in this concepts. I searched a lot in Google. But I couldn't get…
Asish AP
  • 4,421
  • 2
  • 28
  • 50
10
votes
6 answers

Should we use foreign-key constraints when persisting Domain Models?

A while ago I had a discussion with my colleagues about the persistence of Domain Models and whether we should enforce foreign-key constraints at the database level. My first reaction was that the very use of a relational database implied the…
Saulo Silva
  • 1,219
  • 1
  • 20
  • 37
9
votes
2 answers

Seperation of models in a web api application

My team devolops a web api application using entity framework, The Gui is developed by a seperate team. My question is how should the models be defined? Should we have two projects - one for domain models (database entities) and one for Dtos which…
user5326354
9
votes
2 answers

Bestpractice - Mixing View Model with Domain Model

Is it reasonable to mix view models with domain models? So i.e. the view model object contains some domain model objects (not the other way around!)
Rookian
  • 19,841
  • 28
  • 110
  • 180
8
votes
0 answers

Rich domain model vs anemic domain model

Which is better practice in web development, an anemic domain model or rich domain model? Anemic domain model means entities are dumb POJOs mapped to some persitent storage. Getters and setters doesn't validate the state transition, but trust the…
Tuomas Toivonen
  • 21,690
  • 47
  • 129
  • 225
8
votes
2 answers

Using enum values in Domain Model with EF Code First approach

I use Entity Framework Code First approach in my MVC application and I have some entity classes for every table in the database. On the other hand, I need to use some lookup values i.e. gender, status for which I do not want to create a separate…
Jack
  • 1
  • 21
  • 118
  • 236
8
votes
2 answers

DDD, identifying the core domain

I am having difficulty in attempting to ascertain which domain within a given model can be considered the "core domain". It can be tricky especially if there are several domains which are core to the function of a business. I would like someone to…
Rijndael
  • 3,683
  • 2
  • 24
  • 26
8
votes
1 answer

Refactoring domain model with mutability and cyclical dependencies to work for Scala with good FP practices?

I come from an OO background(C#, javascript) and Scala is my first foray into FP. Because of my background I am having trouble realizing a domain model that fits my domain problem well and also complies with good practices for FP such as minimal…
8
votes
3 answers

Constraining string length in domain classes

I have a persistence ignorant domain model that uses abstract repositories to load domain objects. The concrete implementation of my repositories (the data access layer (DAL)) uses entity framework to fetch data from a sql server database. The…
Klaus Byskov Pedersen
  • 117,245
  • 29
  • 183
  • 222
8
votes
1 answer

What's the difference between domain model and conceptual model

According to wikipedia they seem to be the same thing, but they each have different pages. Domain Model Conceptual Model On the conceptual model page it says these two things: A Conceptual model in the field of computer science is also known as a…
user1534664
  • 3,258
  • 8
  • 40
  • 66
1
2
3
23 24