3 ms·
You seem to be fixated at knowing what objects consist of and you seem to stop at a fairly arbitrary level - primitives provided by the language (int, string et
by 3pm 4y ago
You seem to be fixated at knowing what objects consist of and you seem to stop at a fairly arbitrary level - primitives provided by the language (int, string etc). Why not go all the way down to bits? I find that a well designed Value object [0] makes me more productive because I specifically don't need to know how it is implemented internally, only the exposed interface. Examples:
ZonedDateTime
PhoneNumber
SocialSecurity
Guid
EmailAddress
Point
Url
ExpiredCoupon
Regarding one specific place, if I only need to know date time and its zone in one specific place, would you recommend Tuple<int, int, int, int, int, int, int, string> instead of ZonedDateTime?
[0] https://martinfowler.com/bliki/ValueObject.html https://martinfowler.com/bliki/ValueObject.html
[1] https://docs.oracle.com/javase/8/docs/api/java/time/ZonedDateTime.html https://docs.oracle.com/javase/8/docs/api/java/time/ZonedDat...