[TYPO3-mvc] How to load a list of value objects?
Franz Kugelmann
franz.kugelmann at elementare-teilchen.de
Tue Apr 26 12:34:23 CEST 2011
Hi Francois,
i also thought about that issue in my current FLOW3-project.
In my opinion it depends on your project whether the elements in the
dropdown-list are value objects or entities.
If you attach the selected element (in my case a type of file:
certificate, documentation, marketing paper) to quite a few entities (in
my case "documents"), then there are two concepts of usage:
Think about what should happen if you change one of your dropdown elements
(ie: rename "certificate" to "certification")
1. value objects: the elements (in my case documents) having "certificate"
attached still have "certificate" attached (meaning you cannot really
rename but just add new elements)
2. entities: the elements now have the renamed "certification" attached
It is quite depending on your needs, if you have an entity or value
object, in my experience often at first glance objects are value objects
but then turn to be entities instead, because of the needed
"renaming"-possibility.
Value objects are (in my experience) often a good replacement for
attributes, which are not as simple as just an string or number.
Just my thoughts, but an important discussion!
Greets
Franz
> Hi Henjo,
>
>> If you really need to create lists of value object wouldn't they
>> actually be entities?
>>
>> Usually when I need to display 'value objects' without the relation to
>> an object I approach them as being entities.
>
> Thanks for your input.
>
> However Extbase clearly makes a difference between entities and value
> objects. Furthermore I read a book on Domain-Driven Design which clearly
> explains the difference and it seems that this was duly considered by
> the brains behind FLOW3/Extbase. So I would quite like to hear from them
> how value objects are supposed to be handled properly :-)
>
> Cheers
>
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
More information about the TYPO3-project-typo3v4mvc
mailing list