Zend FrameWork: [fw-db] Something fishy with adapters in Zend_Db

OOP design of the adapters mecanism in Zend_Db. Since Zend_Db is not using
interfaces, we have Zend_Db_Adapter_Pdo_Ibm_Db2 which derives or
implements… nothing. We then have Zend_Db_Adapter_Pdo_Ibm which internally
creates a Zend_Db_Adapter_Pdo_Ibm_Db2 and wraps the methods, but doesn’t
really enforce any interface or base class. Zend_Db_Adapter_Pdo_Ibm is an
adapter which wraps fake adapters… and we can’t use
Zend_Db_Adapter_Pdo_Ibm_Db2 directly, since it doesn’t derive from anything
so we can’t pass it to Zend_Db_Table for example. We also can’t reuse code
or implement an interface in Zend_Db_Adapter_Pdo_Ibm_Db2.

I hope that Zend_Db interfaces will be added and enforced in Zend Framework
2.0, or we’ll be stuck with this frankensteinized OOP 😉

View this message in context: http://www.nabble.com/Something-fishy-with-adapters-in-Zend_Db-tp25388420p25388420.html
Sent from the Zend DB mailing list archive at Nabble.com.

Leave a Reply

Your email address will not be published. Required fields are marked *

To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image