[TYPO3-mvc] @dontpersist

Franz Koch typo3.RemoveForMessage at elements-net.de
Wed Mar 23 18:00:26 CET 2011


Hey Steffen,

>> I suppose some controller. So
>> why doesn't the controller call the locationService and pass the address
>> of your model, perform some checks on the returned lat/long and only
>> then set them in the model in order to be persisted?
>
> Hmm. In the example, locationService is a domain service and implements
> model logic. Why put model logic into the controller?

Fetching geo-coordinates is in my eyes no domain logic - this could also 
be some foreign service. And it was just a suggestion. As I don't know 
the main purpose and implementation of this I can only give suggestions.

> I guess what Nico meant is, that the lat/lon property is only set from
> the BE via tcemain (without Extbase) and it is optional to enter a
> value.
> If it is not set, it should be calculated in the FE rendering
> process (Extbase) for each request. (right after the object was rebuild
> from the repository).
> So if I get it right, the property should stay in a transient state as
> long as the value is not set in the backend.

In that case I would use a private property and store the transient 
"location" coordinates there like suggested before.

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list