All Questions
Tagged with value-object object-oriented-design
8 questions
0
votes
0
answers
82
views
DDD Value Objects: when is enough enough? [duplicate]
Where do you like to draw the line for modeling a single value as a Value Object v.s. a primitive? For example if I have an internal order number and a customer order number, would you model them both ...
3
votes
6
answers
163
views
How can I change my code to display information about failure of creation of a value object, when I want to process an array of such objects?
Consider class Crate that is a value object. Crate represents a valid 3-dimensional box.
In constructor I validate the given parameters, and I throw an exception, if supplied dimension parameters ...
0
votes
2
answers
176
views
ValueObject - too wordy?
So, I'm having some value objects in my domain, and when I'm using them in one of my builders it looks like this:
.withSomething(Id.of(123), Specifiers.of(MySpecifier.of("233"), MySpecifier.of("23423"...
6
votes
4
answers
658
views
Passing around large value objects vs converting to smaller value objects
Let's say I have a project that needs to do the following:
Multiple calls to read from the database where each call is a different query and returns back a value object (just has getters/setters). ...
0
votes
1
answer
398
views
Dealing with Complex Value Objects
I am working with Martin Fowler's definition as a working base.
I have a class called Condition that I am having trouble properly classifying.
What makes me think this might be a value object:
A ...
7
votes
1
answer
5k
views
Option<T> functional type implementation and scenarios
Have you ever being implementing Option<T> functional type? It is discussed here:
https://app.pluralsight.com/library/courses/tactical-design-patterns-dot-net-control-flow/table-of-contents
...
0
votes
1
answer
403
views
domain driven design value object behavior
I recently finished Steve Smith and Julie Lerman's excellent Pluralsight course on Domain Driven Design, and I'm applying the training to a project. I have what I think is a good candidate for a value ...
3
votes
3
answers
2k
views
Overriding equals() method in Java
Short question: Why does Java allow overriding equals(), why is it not final?
I am reading Effective Java 2nd edition by Joshua Bloch.
I am a bit baffled by the conclusion that
There is no way to ...