[TYPO3-mvc] non-db based value objects and embedded values - how to?

Martin Kutschker masi-no at spam-typo3.org
Thu Jun 10 23:07:35 CEST 2010


Jochen Rau schrieb:
> Hi Martin.
> 
> On 2010-06-10, Martin Kutschker <masi-no at spam-typo3.org> wrote:
>> Jochen Rau schrieb:
>>> FLOW3 has the concept of custom factories that fits your needs imo.
>>>
>>> http://flow3.typo3.org/documentation/manuals/flow3/flow3.objectframework/#id37778491
>> While I agree that they are nice, they are not what we need. Our problem is that there is only one
>> data mapper and that it cannot be augmented. The issue is that it know only a very limited set of
>> data types (PHP scalars, referenced/persisted TCA objects and DateTime). So we want either hhave a
>> way to add more types in general or to add more types on a per class/model/table base.
> 
> Sorry. I don't get the point here. If we invoke a factory class at time of reconstitution,
> we will have totally freedom to map the incoming data to the object properties.

Sorry. I didn't understand how you intended to to use the factory. But I don't think the object
factory should be mixed up with data mapping.

Looking at the data mapper I think it does too much in thawProperties(). If this code can be moved
to the data map, the data map factory can whip up a custom class for each table (if
required/configured).

But if you reread my first post you'll see that there are even more things that could be done. eg an
extension could provide a Money value object to be used by other extensions. Naturally you don't
want to create a custom data map just to use this field "type".

> Another ingredient will be dependency injection (Daniel P�tzinger is currently working on an
implementation for 4.x afaik).

Interesting.

> Do you participate in T3DD10?

Yes.

Masi


More information about the TYPO3-project-typo3v4mvc mailing list