“Patterns always have two parts: the how and the when. Not just do you need to know how to implement them, you also have to know when to use them and when to leave them alone.” ~ Martin Fowler
Don’t reinvent the wheel: Standardy ● JSR 354: Money and Currency API ○ https://github.com/brick/money ● JSR 310: Date and Time API ○ https://github.com/brick/date-time
Value objects ● PHP nemá Time ani Date, má Datetime ○ Můžu si napsat vlastní ○ Nebo můžu použít Brick! :) ● EmailAddress ● PhoneNumber ● Url (Nette) ● DateRange, TimeRange, NumberRange ● PostalAddress ○ Může a nemusí být VO