Domain Objects are objects made for dealing with the domain logic at the Model layer. These objects generally simulate real (or virtual) items from real-life: Person, Post, Document, etc.
Questions tagged [domain-object]
98 questions
84
votes
4 answers
Differentiating between domain, model, and entity with respect to MVC
Can someone explain these 3 concepts and the differences between them with respect to an MVC framework along with an example. To me these appear almost equivalent, and it seems they are used interchangeably in some articles and not in others.

Martin Konecny
- 57,827
- 19
- 139
- 159
59
votes
4 answers
Difference between Transfer objects and Domain objects
Could you please explain the difference between Transfer objects and Domain objects in simple terms ? And if u could give a Java example, that would be great..

copenndthagen
- 49,230
- 102
- 290
- 442
41
votes
4 answers
Domain objects/services and the Business Logic Layer
What are domain objects and domain services in software architecture? I am not familiar with them or how they differ from the business logic layer?

aces.
- 3,902
- 10
- 38
- 48
33
votes
4 answers
How do one use ACL to filter a list of domain-objects according to a certain user's permissions (e.g. EDIT)?
When using the ACL implementation in Symfony2 in a web application, we have come across a use case where the suggested way of using the ACLs (checking a users permissions on a single domain object) becomes unfeasible. Thus, we wonder if there exists…

Aleksander Krzywinski
- 825
- 7
- 13
15
votes
1 answer
Symfony2: How to find the users that have permissions for a certain domain object?
In our application based on Symfony2 we would like to create a list of which of the users in the system that has permissions for a given domain object. We are using ACL and our immediate instinct was to look in the ACL-object returned from the…

Aleksander Krzywinski
- 825
- 7
- 13
15
votes
7 answers
What is the best way to refactor presentation code out of my domain objects in an ASP.NET MVC solution?
I have just taken over an ASP.NET MVC project and some refactoring is required, but I wanted to get some thoughts / advice for best practices.
The site has an SQL Server backend and here is a review of the projects inside the…

leora
- 188,729
- 360
- 878
- 1,366
15
votes
3 answers
Implementing a S.O.L.I.D Domain Object Model in the following project
I have the following example in which I tend to use a couple of classes, to create a simple web app.
The file hierarchy seems like this.
> cupid
- libs
- request
- router
- database
- view
-…

samayo
- 16,163
- 12
- 91
- 106
8
votes
3 answers
Domain Objects and Value Objects - are they equal?
By looking to the example of a Domain Object into Zend Quickstart tutorial, and other examples considering a DAO/VO patterns, they both seem to be very similar.
Can we deduce that to say "Value Object" is the same as to say "Domain Object" ?
If…

MEM
- 30,529
- 42
- 121
- 191
8
votes
3 answers
DDD, PHP. Domain Object and Business Logic
I've been very busy with trying to understand the concepts of ddd and Model layer lately. Read tons of articles, examples, Q and A's, spent many hours on it. And still I'm not sure if I got some principles right.
One of them is the answer to the…

hopsey
- 1,383
- 1
- 13
- 23
8
votes
4 answers
Are domain objects the same as JPA entities?
Are domain objects the same as JPA entities? If I have a value object (e.g. a dollar bill), how can I (or even should I) store that in the datastore as a reference object?
What are the subtleties of domain objects being entities in some cases and…

Kin Palindrome
- 153
- 1
- 7
7
votes
1 answer
Modify and validate a grails domain object without saving it
How do I use the GORM .get to retrieve an object o, modify some fields, and call o.validate() to find errors without Hibernate saving the object to the DB. discard by itself does not prevent the save. Neither does
…

cardenizen
- 113
- 1
- 5
7
votes
2 answers
Grails Domain Classes in Sets
Is it a bad practice to use domain objects in Sets or as keys in Maps?
In the past I've done things like this a lot
Set someBooks = [] as Set
someBooks.addAll (Book.findAllByAuthorLike('%hofstadter%'))
someBooks.add (Book.findByTitleLike…

Akusete
- 10,704
- 7
- 57
- 73
7
votes
2 answers
Where to put domain logic which needs to fetch data from database
I know that domain logic should be placed into domain objects. But what if my domain logic needs data from the database ? (e.g. checking unique value, computed values.. etc ) I think injecting repositories into my domain objects isn't the right…

user256034
- 4,289
- 5
- 37
- 44
6
votes
2 answers
DDD, PHP - where to perform the validation?
I started playing with DDD recently. Today I'm having a problem with placing validation logic in my application. I'm not sure what layer should I pick up. I searched over the internet and can't find an unified solution that solves my problem.
Let's…

hopsey
- 1,383
- 1
- 13
- 23
5
votes
3 answers
where should I do the conversion: Domain object<->DTO?
In Domain Layer or Data access layer?

Benny
- 8,547
- 9
- 60
- 93