4 ms·
The various parts of a person's name should be encapsulated in a specific class, and one of these objects, rather than a loose last name and other concrete fiel
by HelloNurse 5y ago
The various parts of a person's name should be encapsulated in a specific class, and one of these objects, rather than a loose last name and other concrete fields, should be a mandatory attribute of a user object.
There should be only one place for name-handling logic, and since other people types besides users could appear in the domain model (commercial customer, social network "friend", relative, etc.) the user class isn't that place.