All Questions
3 questions
1
vote
1
answer
196
views
Can Value Objects create their own value?
Let's say you have a username value object which has formatting rules e.g.,
class Username
{
private $username;
public function __construct(string $username)
{
// thrown an ...
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"...
10
votes
2
answers
579
views
Should well-known business ID of an entity be represented with a dedicated type in DDD/OOP?
In practical terms it means using an custom (immutable) class over a string or some other primitive type.
Examples:
Publishing: International Standard Book Number.
Finance: International Securities ...