[TYPO3-dev] SOLUTION (?) : Multiple XCLASS inheritance

Elmar Hinz elmar.DOT.hinz at team.MINUS.red.DOT.net
Wed Feb 8 22:41:02 CET 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michael Scharkow schrieb:
> Kasper Skårhøj wrote:
> 
>> Also, inheritance as a whole should be avoided in our future 
>> architecture, rather objects should be more atomic so we can use 
>> other patterns for pluggin in functionality/services etc 
>> ("strategies" et al). Hooks is the precursor for this idea.
> 
> 
> I beg to differ: Inheritance should be used more often in the future. If
> you build real objects with encapsulated methods and data, their
> instances *are* atomic. However, this makes only sense if you use
> classes for objects and not primarily as namesspaces. Of course, nobody
> can be interested in inheriting from TCEmain or t3lib_div ;)
> 
> The flexibility should come from advanced factory functions that know
> what to instanciate in what context. Kind of like makeinstance() on
> steroids.
> 

Hello,

I think you are both right in your own way. In the world of JAVA the interface
that needs to be implemented by inherited classes is a very usefull concept. It
gives a lot of flexibility if you can rely on and work with cleanly implemented
interfaces. You quickly can exchange one class against another. Interfaces are
the basicle principle of the AVALON framework.

On the other hand  -- I think that is the concern of Kasper -- large hierarchies
of inherited classes often tend to make development tenacious. Combining a few
readymade components is done more quickly then implementing new features into a
inheritd class.

/el


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFD6mVuO976RNoy/18RAjf5AKDVYpX5ltFFIcI03D9JTh9P3ZpVNACgrH6n
wcBfZBg1QkGT1pKrNHjm40Q=
=Yb3a
-----END PGP SIGNATURE-----




More information about the TYPO3-dev mailing list