[TYPO3-dev] Your opinion please: ZF and T3

Christian Opitz - Netzelf christian.opitz at netzelf.de
Mon Jul 5 15:42:06 CEST 2010


Martin Kutschker schrieb:
> Am 02.07.2010 22:12, schrieb Christian Opitz - Netzelf:
>   
>> Hi Masi,
>>
>>     
>>> Why the DB-adapter? Do you propose to access TYPO3's DB through it? IMHO this is a dangerous course.
>>>       
>> Yes, actually i do that - i'm using the link from $GLOBALS['TYPO3_DB'] for that. You can see the
>> adapter here:
>> http://forge.typo3.org/projects/extension-zfext/repository/entry/trunk/zfext/library/Zend/Db/Adapter/Typo3.php
>>
>>
>> Why is that dangerous?
>>     
>
> You disable DBAL support for extensions, which is probably only a "defect" for public extensions on
> TER. Also it encourages users of your ZF extensions to bypass the DB API of TYPO3. This could have
> unwanted side effects when ZF doesn't have the same hooks as the regulat API has.
>
> So using ZF's DB access is not dangerous itself, but it least in the wrong direction.
>
> Masi
Ok, i understand your critics. To enable DBAL support i would have to 
rewrite the adapter to proxy all mysql_*-calls over the 
TYPO3-DB-instance - do i get that right?

My plan is not to encourage developers to bypass the TYPO3 DB API. 
Rather i would like to provide a proper adapter, that bridges between ZF 
DB API and that of TYPO3. This should provide devs the ability to use 
the M in MVC with ZF-DbTables.

On the other hand i don't disable the support - devs are free to use 
$GLOBALS['TYPO3_DB'] and Zfext_Plugin::getInstance() which returns the 
instance of the current tslib_pibase-class.

Cheers,
Christian




More information about the TYPO3-dev mailing list