[TYPO3-mvc] ValueObject against Entity

Federico Bernardin typo3list at bernardin.it
Tue Sep 4 17:48:13 CEST 2012


Hi Steffan,
You can say: 
when you change any object property and the object is completely different (it have to be destroyed and create again) this object is a value object.
If you change an object property but the object itself remain the same (in your repository) it's an entity.

A name or an address could be a value object but a customer or a person  (defined by many attributes) are entity. You can change address or telephone number of a person but it will not be changed (the id or identity of person remain unchanged), instead if you change the street of a value object (address) the address will be destroyed and recreate (this behavior depends by your domain analysis). 

regards
Federico

Il giorno 04/set/2012, alle ore 17:00, Stefan Frömken <firma at sfroemken.de> ha scritto:

> Hello MVC-Team,
> 
> I have to write a documentation for your/our Extbase-Team. But I have a problem to give the user a helping hand when he has to use entity or a value object.
> OK...there is a difference regarding the identity, but in my sample extension I just have created a new domain model based on a value object and all links have a GET-Parameter keeping the UID of the current record. So a value object has an identity, too.
> 
> So...what is the difference?
> 
> Stefan
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc



More information about the TYPO3-project-typo3v4mvc mailing list