[TYPO3-mvc] "= new" vs "t3lib_div::makeInstance()" in Extbase

Jochen Rau jochen.rau at typoplanet.de
Wed Apr 7 12:23:50 CEST 2010


Hi.

On 07.04.10 12:05, Sebastian Kurfürst wrote:
>> 1) improve the makeInstance to be able to instanciate the "best"
>> implementation for an interface (maybe by adding a hook inside
>> makeInstance) and use makeInstance in the Extbase and Extension code.
>> The "best" implementation will be determined by configuration (cropping
>> "Interface" from the class name) and configuration (TypoScript).
> I'd rather right now not introduce a separate mechanism like this just
> in Extbase; as I feel this is somehow out of scope in Extbase.
 >
> If we'd implement such a mechanism, it should be a TYPO3 v4 Core
> feature, and not specific to extbase. Else, I fear that Extbase will
> become an "island of its own" more and more, and losing the tiers to the
> core. So, in general, I'd favor the following strategy:
>
> - backports of FLOW3 features should be made available mostly by extbase
> - In case a different solution for some problems (like extensibility)
> than in v5 is needed, we should rather go ahead and improve the general
> TYPO3 v4 mechanisms instead of just putting it into Extbase. Thus, more
> v4 parts can benefit from such mechanisms.

I fully agree. But maybe you misunderstood me. I proposed to make the 
way how to resolve the best implementation for a given class/interface 
name a v4 core feature by implementing the hook in makeInstance(). The 
usage of makeInstance inside Extbase extensions makes this explicit to a 
(future) v4->v5 porter.

The alternative would be to backport the Object Management mechanism of 
FLOW3 (which can be a "beast" ;-).

Extbase *is* an "island of its own" in the sense of being an system 
extension and of being a backport of "foreign" concepts.

We definitly have to draw a line between FLOW3 and Extbase. Here we are 
to discuss about where to draw this line.

Regards
Jochen





More information about the TYPO3-project-typo3v4mvc mailing list