[TYPO3-mvc] Persistence of value objects
Bastian Waidelich
bastian at typo3.org
Thu Apr 19 18:01:11 CEST 2012
Jochen Rau wrote:
Hi Jochen, hope you had a safe trip home!
> I would like to propose a more radical approach: What if we drop the
> whole distinction between Entity and ValueObjects?
Wow, and that coming from you!? ;)
I'm not perfectly sure about the implications, but I have the feeling
that ValueObjects do make sense. And IMO it doesn't conflict with the
idea of having different representations of a VO.
With your example "#FF0000" could be just a different rendering of the
color "red": $color->renderAsHexCode() or
ColorToHexCodeConverter($color). Similar for the french label:
<f:translate key="colors.{color}" />
I know, the color is just a dump example but this probably applies to
more comples ValueObjects, too.
Well, I'm not a DDD expert. But we have finally fixed support for
ValueObjects in FLOW3 [1] and if we decide to drop that, this should be
discussed with both teams.
[1] https://review.typo3.org/#/c/9762/
--
Bastian Waidelich
TYPO3 Core Team Member
TYPO3 .... inspiring people to share!
Get involved: typo3.org
More information about the TYPO3-project-typo3v4mvc
mailing list