3 ms·
... more like a "getPersonName()" method instead of a whole 'nother class, init?
by jdthedisciple 5y ago
... more like a "getPersonName()" method instead of a whole 'nother class, init?
- HelloNurse 5y agoThe 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.