I have some questions regarding some DDD concepts:
In Evans' book about DDD, in section VALUE OBJECTS, he says to put attributes that make up a conceptual whole in VALUE OBJECTS like in his Address objects example. I can't seem to see the benefits of this than just leaving the attributes inside the Customer entity. What would I gain by moving it out of the Customer, making it a VALUE OBJECT, and then referencing the VALUE OBJECT back in the Customer? Please cite some practical example.
Can SPECIFICATIONS be used on VALUE OBJECTS too?
Are all properties of ENTITY OBJECTS either other ENTITY OBJECTS and/or VALUE OBJECTS? Or can they have primitives?
Browsing the internet, I've seen some saying that setters (and getters?) are evil, that they should be avoided and replaced by operations that makes sense for the domain object.
For example:
Account.Balance = 100; // set via property setter
Should be:
Account.DebitToAccount(100); // this would change the balance
In this example, I can understand what they are implying but what about for some common properties like FirstName, MiddleName, LastName? I think it's tedious and pointless to have methods for each property just to set them (like ChangeName()). And assuming that we've chosen to have a method like ChangeName(), what about for properties that have no other groupable property? For example, say Title? Should we have a ChangeTitle() too? (Title is just an example, please don't say that I can group Title to some other property)