[TYPO3-mvc] Using interfaces for dependency injection on domain models

Thomas "Thasmo" Deinhamer thasmo at gmail.com
Wed Mar 30 20:14:30 CEST 2011


Franz Koch wrote:
> It doesn't make sense to me to completely exchange domain specific
> models just for the sake to add one additional property. It might for
> sure be needed at some point to extend models with new properties to
> have them available in Fluid. But that's nothing I'd solve with using
> interfaces only because it might be the only way currently. I still plan
> to implement mixins in Extbase that would allow exactly that - but I
> can't name a date when this will be ready.

Hoi Franz!

Thanks for your feedback!

What would then be the purpose
for domain models using interfaces?

E.g. I got several "custom" methods
inside of some of the domain models,
which return not direct model properties,
but calculated data etc.

Wouldn't it make sense to use an
interface which defines those methods,
to ensure extended models will also
use those methods for compatibility?

Thanks a lot,
Thomas


More information about the TYPO3-project-typo3v4mvc mailing list