[TYPO3-mvc] ValueObject against Entity

Stefan Frömken firma at sfroemken.de
Wed Sep 5 07:18:31 CEST 2012


Hello Federico,

this is the view out of DDD. There are 3 "features" a value object must 
consist of. I have read about it, but my problem is: What does TYPO3 do? 
Does TYPO3 delete any value object, too? Like defined by DDD? Is working 
with a value object faster or slower? Why is working with a value object 
more efficient than working with entities although there are no indexes 
over all cols of a MySQL table?

Stefan

Am 04.09.2012 17:48, schrieb Federico Bernardin:
> 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